diff --git a/components/CookieUser.php b/components/CookieUser.php
index 7d46a74929..b01c4e3c03 100644
--- a/components/CookieUser.php
+++ b/components/CookieUser.php
@@ -10,7 +10,6 @@ class CookieUser
{
public string $userToken;
public string $name;
- private static ?CookieUser $userCache = null;
public static function getFromCookieOrCache(): ?CookieUser
{
@@ -20,8 +19,6 @@ public static function getFromCookieOrCache(): ?CookieUser
$cookieUser->name = trim($matches['name']);
return $cookieUser;
- } elseif (self::$userCache) {
- return self::$userCache;
} else {
return null;
}
diff --git a/components/HTMLTools.php b/components/HTMLTools.php
index 966838143d..6597f17a1e 100644
--- a/components/HTMLTools.php
+++ b/components/HTMLTools.php
@@ -144,7 +144,7 @@ public static function wrapOrphanedTextWithP(string $html): string
$dom = self::html2DOM($html);
$hasChanged = false;
- /** @var \DOMElement $wrapP */
+ /** @var \DOMElement|null $wrapP */
$wrapP = null;
for ($i = 0; $i < $dom->childNodes->length; $i++) {
$childNode = $dom->childNodes->item($i);
@@ -382,7 +382,7 @@ private static function explicitlySetLiValuesInt(\DOMElement $element, ?int $cou
if ($element->nodeName === 'ol' || $element->nodeName === 'ul') {
$liCount = 0;
$start = $element->getAttribute('start');
- if ($start !== null && $start > 0) {
+ if ($start > 0) {
$liCount = intval($start) - 1;
}
$formatting = self::OL_DECIMAL_DOT;
@@ -453,7 +453,7 @@ private static function sectionSimpleHTMLInt(\DOMElement $element, int &$paragra
$lino = 0;
if ($element->nodeName === 'ol') {
$start = $element->getAttribute('start');
- if ($start !== null && $start > 0) {
+ if ($start > 0) {
$lino = intval($start) - 1;
}
}
@@ -927,7 +927,6 @@ public static function renderDomToHtml(\DOMNode $node, bool $skipBody = false):
public static function getDomDebug(\DOMNode $node): array
{
if (is_a($node, \DOMElement::class)) {
- /** @var \DOMNode $node */
$nodeArr = [
'name' => $node->nodeName,
'classes' => '',
diff --git a/components/MotionNumbering.php b/components/MotionNumbering.php
index 03189672aa..ba5eea20cc 100644
--- a/components/MotionNumbering.php
+++ b/components/MotionNumbering.php
@@ -15,8 +15,10 @@ public static function getNewTitlePrefixInternal(string $titlePrefix): string
$new = \Yii::t('motion', 'prefix_new_code');
$newMatch = preg_quote($new, '/');
if (preg_match('/' . $newMatch . '/i', $titlePrefix)) {
- /** @var string[] $parts */
$parts = preg_split('/(' . $newMatch . '\s*)/i', $titlePrefix, -1, PREG_SPLIT_DELIM_CAPTURE);
+ if ($parts === false) {
+ return $titlePrefix . $new;
+ }
$last = (int)array_pop($parts);
$last = ($last > 0 ? $last + 1 : 2); // NEW BLA -> NEW 2
$parts[] = $last;
diff --git a/components/diff/Diff.php b/components/diff/Diff.php
index 27a6f78e4c..bf3ecb5e19 100644
--- a/components/diff/Diff.php
+++ b/components/diff/Diff.php
@@ -63,12 +63,19 @@ public static function tokenizeLine(string $line): array
$line = static::normalizeForDiff($line);
$htmlTag = '/(
\n+|<[^>]+>)/siu';
$arr = preg_split($htmlTag, $line, -1, PREG_SPLIT_DELIM_CAPTURE);
+ if ($arr === false) {
+ throw new \RuntimeException('Failed to parse line: ' . $line);
+ }
$out = [];
foreach ($arr as $arr2) {
if (preg_match($htmlTag, $arr2)) {
$out[] = $arr2;
} else {
- foreach (preg_split('/([ \-.:])/', $arr2, -1, PREG_SPLIT_DELIM_CAPTURE) as $tok) {
+ $tokens = preg_split('/([ \-.:])/', $arr2, -1, PREG_SPLIT_DELIM_CAPTURE);
+ if ($tokens === false) {
+ throw new \RuntimeException('Failed to parse line: ' . $arr2);
+ }
+ foreach ($tokens as $tok) {
if ($tok === ' ' || $tok === '-') {
if (count($out) == 0) {
$out[] = $tok;
@@ -410,8 +417,10 @@ public static function findFirstOccurrenceIgnoringTags(string $haystack, string
if ($firstTag === false || $firstTag > $first) {
return $first;
}
- /** @var string[] $parts */
$parts = preg_split('/(<[^>]*>)/', $haystack, -1, PREG_SPLIT_DELIM_CAPTURE);
+ if ($parts === false) {
+ throw new \RuntimeException('Failed to parse line: ' . $haystack);
+ }
$pos = 0;
for ($i = 0; $i < count($parts); $i++) {
if (($i % 2) === 0) {
@@ -437,8 +446,10 @@ public function getUnchangedPrefixPostfix(string $orig, string $new, string $dif
return ['', $orig, $new, $diff, ''];
}
- /** @var string[] $parts */
- $parts = preg_split('/###(INS|DEL)_(START|END)###/siuU', $diff);
+ $parts = preg_split('/###(INS|DEL)_(START|END)###/siuU', $diff);
+ if ($parts === false) {
+ throw new \RuntimeException('Failed to parse line: ' . $diff);
+ }
$prefix = $parts[0];
$postfix = $parts[(int)count($parts) - 1];
$prefixLen = (int)grapheme_strlen($prefix);
@@ -595,7 +606,10 @@ public function convertToWordArray(string $diff, ?int $amendmentId = null): arra
$words = [
0 => new DiffWord(),
];
- $diffPartArr = preg_split('/(###(?:INS|DEL)_(?:START|END)###)/siu', $diff, -1, PREG_SPLIT_DELIM_CAPTURE);
+ $diffPartArr = preg_split('/(###(?:INS|DEL)_(?:START|END)###)/siu', $diff, -1, PREG_SPLIT_DELIM_CAPTURE);
+ if ($diffPartArr === false) {
+ throw new \RuntimeException('Failed to parse line: ' . $diff);
+ }
$inDel = $inIns = false;
$originalWordPos = 0;
$pendingOpeningDel = false;
diff --git a/components/diff/DiffRenderer.php b/components/diff/DiffRenderer.php
index d5788f3a53..c34beeaf62 100644
--- a/components/diff/DiffRenderer.php
+++ b/components/diff/DiffRenderer.php
@@ -117,15 +117,6 @@ public static function nodeStartInsDel(\DOMNode $node): bool
return false;
}
- /**
- * @internal
- * @return string[]
- */
- public function splitTextByMarkers(string $text): array
- {
- return preg_split('/###(INS|DEL)_(START|END)###/siu', $text);
- }
-
public static function nodeToPlainText(\DOMNode $node): string
{
$text = $node->nodeValue;
@@ -232,6 +223,9 @@ public function textToNodes(string $text, ?string $inIns, ?string $inDel, ?\DOMN
while ($text !== '') {
if ($inIns !== null) {
$split = preg_split('/###INS_END###/siu', $text, 2);
+ if ($split === false) {
+ throw new \RuntimeException('Could not parse text: ' . $text);
+ }
if ($split[0] !== '') {
$newText = $this->nodeCreator->createTextNode($split[0]);
if ($lastIsIns) {
@@ -250,6 +244,9 @@ public function textToNodes(string $text, ?string $inIns, ?string $inDel, ?\DOMN
}
} elseif ($inDel !== null) {
$split = preg_split('/###DEL_END###/siu', $text, 2);
+ if ($split === false) {
+ throw new \RuntimeException('Could not parse text: ' . $text);
+ }
if ($split[0] !== '') {
$newText = $this->nodeCreator->createTextNode($split[0]);
if ($lastIsDel) {
@@ -267,8 +264,10 @@ public function textToNodes(string $text, ?string $inIns, ?string $inDel, ?\DOMN
$text = '';
}
} else {
- /** @var string[] $split */
$split = preg_split('/(###(?:INS|DEL)_START([^#]{0,20})###)/siu', $text, 2, PREG_SPLIT_DELIM_CAPTURE);
+ if ($split === false) {
+ throw new \RuntimeException('Could not parse text: ' . $text);
+ }
if (count($split) === 4) {
if ($split[0] !== '') {
$newText = $this->nodeCreator->createTextNode($split[0]);
diff --git a/composer.json b/composer.json
index dbf19443e9..f5837febfa 100644
--- a/composer.json
+++ b/composer.json
@@ -60,7 +60,7 @@
"codeception/module-yii2": "^1.1.8",
"codeception/lib-web": "dev-main#bc7c96a52e61cf636130caec77bd4668a2bc5969 as 1.0.6",
"phpmd/phpmd": "^2.13.0",
- "phpstan/phpstan": "^1.10.15",
+ "phpstan/phpstan": "^2.0",
"squizlabs/php_codesniffer": "^3.7.2",
"yiisoft/yii2-debug": "^2.1.23"
},
diff --git a/composer.lock b/composer.lock
index d644789020..8055662226 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "4766a046699135157aeeaf06f9e42ebf",
+ "content-hash": "58dbdc6898e3454c29be7cbf3a4b6387",
"packages": [
{
"name": "async-aws/core",
@@ -1869,16 +1869,16 @@
},
{
"name": "phpoffice/phpspreadsheet",
- "version": "3.3.0",
+ "version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
- "reference": "87ddd21eb0b6b7ad20a11d314348ef307475f547"
+ "reference": "eec07c20b51cc785295a6feef81ada7feda755e7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/87ddd21eb0b6b7ad20a11d314348ef307475f547",
- "reference": "87ddd21eb0b6b7ad20a11d314348ef307475f547",
+ "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/eec07c20b51cc785295a6feef81ada7feda755e7",
+ "reference": "eec07c20b51cc785295a6feef81ada7feda755e7",
"shasum": ""
},
"require": {
@@ -1967,9 +1967,9 @@
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
- "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/3.3.0"
+ "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/3.4.0"
},
- "time": "2024-09-29T07:04:07+00:00"
+ "time": "2024-11-10T10:10:41+00:00"
},
{
"name": "predis/predis",
@@ -3275,16 +3275,16 @@
},
{
"name": "symfony/http-client",
- "version": "v5.4.45",
+ "version": "v5.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
- "reference": "54118c6340dc6831a00f10b296ea6e80592ec89d"
+ "reference": "3b643b83f87e1765d2e9b1e946bb56ee0b4b7bde"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-client/zipball/54118c6340dc6831a00f10b296ea6e80592ec89d",
- "reference": "54118c6340dc6831a00f10b296ea6e80592ec89d",
+ "url": "https://api.github.com/repos/symfony/http-client/zipball/3b643b83f87e1765d2e9b1e946bb56ee0b4b7bde",
+ "reference": "3b643b83f87e1765d2e9b1e946bb56ee0b4b7bde",
"shasum": ""
},
"require": {
@@ -3346,7 +3346,7 @@
"http"
],
"support": {
- "source": "https://github.com/symfony/http-client/tree/v5.4.45"
+ "source": "https://github.com/symfony/http-client/tree/v5.4.47"
},
"funding": [
{
@@ -3362,7 +3362,7 @@
"type": "tidelift"
}
],
- "time": "2024-09-25T14:11:13+00:00"
+ "time": "2024-11-13T12:18:12+00:00"
},
{
"name": "symfony/http-client-contracts",
@@ -4468,16 +4468,16 @@
},
{
"name": "symfony/property-info",
- "version": "v5.4.45",
+ "version": "v5.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/property-info.git",
- "reference": "cec75362b20263758c9c7af4c2f9af82614195ae"
+ "reference": "4d77ab22c57ef56a943e3f5769b5fe66be546094"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/property-info/zipball/cec75362b20263758c9c7af4c2f9af82614195ae",
- "reference": "cec75362b20263758c9c7af4c2f9af82614195ae",
+ "url": "https://api.github.com/repos/symfony/property-info/zipball/4d77ab22c57ef56a943e3f5769b5fe66be546094",
+ "reference": "4d77ab22c57ef56a943e3f5769b5fe66be546094",
"shasum": ""
},
"require": {
@@ -4494,7 +4494,7 @@
"require-dev": {
"doctrine/annotations": "^1.10.4|^2",
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
- "phpstan/phpdoc-parser": "^1.0",
+ "phpstan/phpdoc-parser": "^1.0|^2.0",
"symfony/cache": "^4.4|^5.0|^6.0",
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
"symfony/serializer": "^4.4|^5.0|^6.0"
@@ -4539,7 +4539,7 @@
"validator"
],
"support": {
- "source": "https://github.com/symfony/property-info/tree/v5.4.45"
+ "source": "https://github.com/symfony/property-info/tree/v5.4.47"
},
"funding": [
{
@@ -4555,7 +4555,7 @@
"type": "tidelift"
}
],
- "time": "2024-09-25T14:11:13+00:00"
+ "time": "2024-11-07T14:13:13+00:00"
},
{
"name": "symfony/serializer",
@@ -4745,16 +4745,16 @@
},
{
"name": "symfony/string",
- "version": "v5.4.45",
+ "version": "v5.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
- "reference": "7f6807add88b1e2635f3c6de5e1ace631ed7cad2"
+ "reference": "136ca7d72f72b599f2631aca474a4f8e26719799"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/7f6807add88b1e2635f3c6de5e1ace631ed7cad2",
- "reference": "7f6807add88b1e2635f3c6de5e1ace631ed7cad2",
+ "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799",
+ "reference": "136ca7d72f72b599f2631aca474a4f8e26719799",
"shasum": ""
},
"require": {
@@ -4811,7 +4811,7 @@
"utf8"
],
"support": {
- "source": "https://github.com/symfony/string/tree/v5.4.45"
+ "source": "https://github.com/symfony/string/tree/v5.4.47"
},
"funding": [
{
@@ -4827,7 +4827,7 @@
"type": "tidelift"
}
],
- "time": "2024-09-25T14:11:13+00:00"
+ "time": "2024-11-10T20:33:58+00:00"
},
{
"name": "symfony/translation-contracts",
@@ -5665,7 +5665,7 @@
"type": "open_collective"
}
],
- "time": "2024-09-13T11:35:42+00:00"
+ "time": "2024-11-10T18:29:44+00:00"
},
{
"name": "codeception/lib-asserts",
@@ -5797,7 +5797,7 @@
"require": {
"ext-mbstring": "*",
"guzzlehttp/psr7": "^2.0",
- "php": "^8.0",
+ "php": "^8.1",
"phpunit/phpunit": "^9.5 | ^10.0 | ^11.0",
"symfony/css-selector": ">=4.4.24 <8.0"
},
@@ -5832,7 +5832,7 @@
"issues": "https://github.com/Codeception/lib-web/issues",
"source": "https://github.com/Codeception/lib-web/tree/main"
},
- "time": "2024-07-31T17:00:47+00:00"
+ "time": "2024-11-11T07:36:20+00:00"
},
{
"name": "codeception/module-asserts",
@@ -6120,16 +6120,16 @@
},
{
"name": "composer/pcre",
- "version": "3.3.1",
+ "version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
- "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4"
+ "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4",
- "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4",
+ "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
+ "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
"shasum": ""
},
"require": {
@@ -6139,8 +6139,8 @@
"phpstan/phpstan": "<1.11.10"
},
"require-dev": {
- "phpstan/phpstan": "^1.11.10",
- "phpstan/phpstan-strict-rules": "^1.1",
+ "phpstan/phpstan": "^1.12 || ^2",
+ "phpstan/phpstan-strict-rules": "^1 || ^2",
"phpunit/phpunit": "^8 || ^9"
},
"type": "library",
@@ -6179,7 +6179,7 @@
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
- "source": "https://github.com/composer/pcre/tree/3.3.1"
+ "source": "https://github.com/composer/pcre/tree/3.3.2"
},
"funding": [
{
@@ -6195,7 +6195,7 @@
"type": "tidelift"
}
],
- "time": "2024-08-27T18:44:43+00:00"
+ "time": "2024-11-12T16:29:46+00:00"
},
{
"name": "composer/xdebug-handler",
@@ -6265,16 +6265,16 @@
},
{
"name": "myclabs/deep-copy",
- "version": "1.12.0",
+ "version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c"
+ "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
- "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845",
+ "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845",
"shasum": ""
},
"require": {
@@ -6313,7 +6313,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0"
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1"
},
"funding": [
{
@@ -6321,7 +6321,7 @@
"type": "tidelift"
}
],
- "time": "2024-06-12T14:39:25+00:00"
+ "time": "2024-11-08T17:47:46+00:00"
},
{
"name": "nikic/php-parser",
@@ -6713,20 +6713,20 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.12.7",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0"
+ "reference": "ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
- "reference": "dc2b9976bd8b0f84ec9b0e50cc35378551de7af0",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d",
+ "reference": "ab4e9b4415a5fc9e4d27f7fe16c8bc9d067dcd6d",
"shasum": ""
},
"require": {
- "php": "^7.2|^8.0"
+ "php": "^7.4|^8.0"
},
"conflict": {
"phpstan/phpstan-shim": "*"
@@ -6767,7 +6767,7 @@
"type": "github"
}
],
- "time": "2024-10-18T11:12:07+00:00"
+ "time": "2024-11-11T15:43:04+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -8188,16 +8188,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.10.3",
+ "version": "3.11.1",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "62d32998e820bddc40f99f8251958aed187a5c9c"
+ "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c",
- "reference": "62d32998e820bddc40f99f8251958aed187a5c9c",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87",
+ "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87",
"shasum": ""
},
"require": {
@@ -8264,7 +8264,7 @@
"type": "open_collective"
}
],
- "time": "2024-09-18T10:38:58+00:00"
+ "time": "2024-11-16T12:02:36+00:00"
},
{
"name": "symfony/browser-kit",
@@ -8340,16 +8340,16 @@
},
{
"name": "symfony/config",
- "version": "v5.4.45",
+ "version": "v5.4.46",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "b9d94b0753da249439694c4a3847f57465b40d1d"
+ "reference": "977c88a02d7d3f16904a81907531b19666a08e78"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/b9d94b0753da249439694c4a3847f57465b40d1d",
- "reference": "b9d94b0753da249439694c4a3847f57465b40d1d",
+ "url": "https://api.github.com/repos/symfony/config/zipball/977c88a02d7d3f16904a81907531b19666a08e78",
+ "reference": "977c88a02d7d3f16904a81907531b19666a08e78",
"shasum": ""
},
"require": {
@@ -8399,7 +8399,7 @@
"description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/config/tree/v5.4.45"
+ "source": "https://github.com/symfony/config/tree/v5.4.46"
},
"funding": [
{
@@ -8415,20 +8415,20 @@
"type": "tidelift"
}
],
- "time": "2024-10-22T13:05:35+00:00"
+ "time": "2024-10-30T07:58:02+00:00"
},
{
"name": "symfony/console",
- "version": "v5.4.45",
+ "version": "v5.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "108d436c2af470858bdaba3257baab3a74172017"
+ "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/108d436c2af470858bdaba3257baab3a74172017",
- "reference": "108d436c2af470858bdaba3257baab3a74172017",
+ "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
+ "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
"shasum": ""
},
"require": {
@@ -8498,7 +8498,7 @@
"terminal"
],
"support": {
- "source": "https://github.com/symfony/console/tree/v5.4.45"
+ "source": "https://github.com/symfony/console/tree/v5.4.47"
},
"funding": [
{
@@ -8514,7 +8514,7 @@
"type": "tidelift"
}
],
- "time": "2024-10-08T07:27:17+00:00"
+ "time": "2024-11-06T11:30:55+00:00"
},
{
"name": "symfony/dependency-injection",
@@ -8821,16 +8821,16 @@
},
{
"name": "symfony/process",
- "version": "v5.4.45",
+ "version": "v5.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4"
+ "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4",
- "reference": "95f3f19d0f8f06e4253c66a0828ddb69f8b8ede4",
+ "url": "https://api.github.com/repos/symfony/process/zipball/5d1662fb32ebc94f17ddb8d635454a776066733d",
+ "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d",
"shasum": ""
},
"require": {
@@ -8863,7 +8863,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/process/tree/v5.4.45"
+ "source": "https://github.com/symfony/process/tree/v5.4.47"
},
"funding": [
{
@@ -8879,20 +8879,20 @@
"type": "tidelift"
}
],
- "time": "2024-09-25T14:11:13+00:00"
+ "time": "2024-11-06T11:36:42+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v6.4.13",
+ "version": "v6.4.15",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "2acb151474ed8cb43624e3f41a0bf7c4c8ce4f41"
+ "reference": "38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/2acb151474ed8cb43624e3f41a0bf7c4c8ce4f41",
- "reference": "2acb151474ed8cb43624e3f41a0bf7c4c8ce4f41",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80",
+ "reference": "38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80",
"shasum": ""
},
"require": {
@@ -8948,7 +8948,7 @@
"dump"
],
"support": {
- "source": "https://github.com/symfony/var-dumper/tree/v6.4.13"
+ "source": "https://github.com/symfony/var-dumper/tree/v6.4.15"
},
"funding": [
{
@@ -8964,7 +8964,7 @@
"type": "tidelift"
}
],
- "time": "2024-09-25T14:18:03+00:00"
+ "time": "2024-11-08T15:28:48+00:00"
},
{
"name": "symfony/yaml",
diff --git a/models/db/ConsultationUserGroup.php b/models/db/ConsultationUserGroup.php
index e2dbc50435..e4c1152aed 100644
--- a/models/db/ConsultationUserGroup.php
+++ b/models/db/ConsultationUserGroup.php
@@ -138,8 +138,8 @@ public static function loadGroupsByIdForConsultation(Consultation $consultation,
// Iterating over the userIds attached to a user group is faster than over the groupIds of a user,
// as there are way more users, and we would need to perform more queries that way.
// Note that this method should only be used for read-only operations, as the cache is not flushed yet.
- /** @var null|int[][] */
- private static ?array $userIdCache = [];
+ /** @var int[][] */
+ private static array $userIdCache = [];
public function getUserIds(): array
{
diff --git a/models/db/MotionSection.php b/models/db/MotionSection.php
index 86563fcf6f..dc3293da9f 100644
--- a/models/db/MotionSection.php
+++ b/models/db/MotionSection.php
@@ -144,9 +144,8 @@ public function getConsultation(): Consultation
if ($motion) {
return Consultation::findOne($motion->consultationId);
} else {
- /** @var Motion $motion */
- $section = ConsultationSettingsMotionSection::findOne($this->sectionId);
/** @var ConsultationSettingsMotionSection $section */
+ $section = ConsultationSettingsMotionSection::findOne($this->sectionId);
return $section->motionType->getConsultation();
}
}
diff --git a/models/db/User.php b/models/db/User.php
index 142abef515..b3bbe95506 100644
--- a/models/db/User.php
+++ b/models/db/User.php
@@ -313,7 +313,6 @@ public static function findIdentity($userId)
* @return IdentityInterface the identity object that matches the given token.
* Null should be returned if such an identity cannot be found
* or the identity is not in an active state (disabled, deleted, etc.)
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public static function findIdentityByAccessToken($token, $type = null)
{
diff --git a/models/forms/AdminMotionFilterForm.php b/models/forms/AdminMotionFilterForm.php
index 2db4116d56..18ab7833d6 100644
--- a/models/forms/AdminMotionFilterForm.php
+++ b/models/forms/AdminMotionFilterForm.php
@@ -617,7 +617,7 @@ public function getFilteredMotions(): array
$matches = false;
}
- if ($this->status !== null && $this->status !== '' && $motion->status !== $this->status) {
+ if ($this->status !== null && $motion->status !== $this->status) {
$matches = false;
}
@@ -756,7 +756,7 @@ public function getFilteredAmendments(array $filteredMotions): array
$matches = false;
}
- if ($this->status !== null && $this->status !== "" && $amend->status !== $this->status) {
+ if ($this->status !== null && $amend->status !== $this->status) {
$matches = false;
}
diff --git a/models/layoutHooks/StdHooks.php b/models/layoutHooks/StdHooks.php
index 82abaef648..8058035001 100644
--- a/models/layoutHooks/StdHooks.php
+++ b/models/layoutHooks/StdHooks.php
@@ -85,7 +85,7 @@ public function breadcrumbs(string $before): string
{
$out = '';
$showBreadcrumbs = (!$this->consultation || !$this->consultation->site || $this->consultation->site->getSettings()->showBreadcrumbs);
- if (is_array($this->layout->breadcrumbs) && $showBreadcrumbs) {
+ if (count($this->layout->breadcrumbs) > 0 && $showBreadcrumbs) {
$out .= '