From 9b46e3b9c6421c5e5760edee4231e202e54f021f Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 13 Jun 2026 11:31:49 +0200 Subject: [PATCH 1/4] Bump phpstorm stubs --- composer.json | 2 +- composer.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index ce1237cd84..a3fb8379a4 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "hoa/compiler": "3.17.08.08", "hoa/exception": "^1.0", "hoa/file": "1.17.07.11", - "jetbrains/phpstorm-stubs": "dev-master#87940f228f9c3e6446e40d6cc3668f249fe871a5", + "jetbrains/phpstorm-stubs": "dev-master#709e512210784a7c0a677b3a89d35def844a59b9", "nette/bootstrap": "^3.0", "nette/di": "^3.1.4", "nette/neon": "3.3.4", diff --git a/composer.lock b/composer.lock index 50f10be61f..8202798205 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": "13e4d9e979c07e7c27e8d479ffa5b359", + "content-hash": "b7c9871087473973539d2887bd1dc7c7", "packages": [ { "name": "clue/ndjson-react", @@ -1632,12 +1632,12 @@ "source": { "type": "git", "url": "https://github.com/JetBrains/phpstorm-stubs", - "reference": "87940f228f9c3e6446e40d6cc3668f249fe871a5" + "reference": "709e512210784a7c0a677b3a89d35def844a59b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/87940f228f9c3e6446e40d6cc3668f249fe871a5", - "reference": "87940f228f9c3e6446e40d6cc3668f249fe871a5", + "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/709e512210784a7c0a677b3a89d35def844a59b9", + "reference": "709e512210784a7c0a677b3a89d35def844a59b9", "shasum": "" }, "require-dev": { @@ -1669,7 +1669,7 @@ "stubs", "type" ], - "time": "2026-05-16T11:58:25+00:00" + "time": "2026-06-12T13:19:10+00:00" }, { "name": "nette/bootstrap", From af47fc42a4c5a1c226859bcfc33326c5a5ac66e5 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 13 Jun 2026 12:00:53 +0200 Subject: [PATCH 2/4] Patch --- patches/dom_c.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/patches/dom_c.patch b/patches/dom_c.patch index 9e542c826d..5e5a7ec202 100644 --- a/patches/dom_c.patch +++ b/patches/dom_c.patch @@ -15,3 +15,12 @@ /** * Retrieves a node specified by name * @link https://php.net/manual/en/domnamednodemap.getnameditem.php +@@ -1779,7 +1787,7 @@ + * A DOMNamedNodeMap containing the attributes of this node (if it is a DOMElement) or NULL otherwise. + * @link https://php.net/manual/en/class.domnode.php#domnode.props.attributes + */ +- #[LanguageLevelTypeAware(['8.1' => 'DOMNamedNodeMap|null'], default: '')] ++ #[LanguageLevelTypeAware(['8.1' => 'DOMNamedNodeMap'], default: '')] + public $attributes; + + /** From ca423cf1783ec113c8caf98499515439de14e12c Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 13 Jun 2026 12:16:09 +0200 Subject: [PATCH 3/4] Fix --- resources/constantToFunctionParameterMap.php | 2 +- tests/PHPStan/Rules/Methods/data/overriding-variadics.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/constantToFunctionParameterMap.php b/resources/constantToFunctionParameterMap.php index 99de4015d1..7e0e047f90 100644 --- a/resources/constantToFunctionParameterMap.php +++ b/resources/constantToFunctionParameterMap.php @@ -1735,7 +1735,7 @@ ], 'DOMDocument::schemaValidate' => [ - 'options' => [ + 'flags' => [ 'type' => 'bitmask', 'constants' => $libxmlOptions, ], diff --git a/tests/PHPStan/Rules/Methods/data/overriding-variadics.php b/tests/PHPStan/Rules/Methods/data/overriding-variadics.php index b91bb38579..01ca9534a1 100644 --- a/tests/PHPStan/Rules/Methods/data/overriding-variadics.php +++ b/tests/PHPStan/Rules/Methods/data/overriding-variadics.php @@ -61,7 +61,7 @@ public function translate($message, $lang = 'cs'): string class ReflectionClass extends \ReflectionClass { - public function newInstance($arg = null, ...$args) + public function newInstance($arg = null, ...$args): object { } From f6d607b2c7f24de0ef7f5cb6454470da801e2f92 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sat, 13 Jun 2026 12:29:28 +0200 Subject: [PATCH 4/4] Skip on 7.4 --- tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php b/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php index 7da7028ce4..910ea477e0 100644 --- a/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php +++ b/tests/PHPStan/Rules/Methods/OverridingMethodRuleTest.php @@ -334,6 +334,7 @@ public function testBug3443(): void $this->analyse([__DIR__ . '/data/bug-3443.php'], []); } + #[RequiresPhp('>= 8.0.0')] public function testBug3478(): void { $this->phpVersionId = PHP_VERSION_ID;