From af5921e46418da45816b98de4ef1e59c9eb4c5a7 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Fri, 16 Oct 2020 10:15:41 +0200 Subject: [PATCH] Fixed SimpleXMLElement bug --- composer.json | 2 +- composer.lock | 14 +++++++------- .../MissingMethodImplementationRuleTest.php | 5 +++++ tests/PHPStan/Rules/Methods/data/bug-3958.php | 7 +++++++ 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 tests/PHPStan/Rules/Methods/data/bug-3958.php diff --git a/composer.json b/composer.json index 1ee1fbc352..e14b5b34d9 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "nette/utils": "^3.1.3", "nikic/php-parser": "4.10.2", "ondram/ci-detector": "^3.4.0", - "ondrejmirtes/better-reflection": "4.3.36", + "ondrejmirtes/better-reflection": "4.3.37", "phpdocumentor/reflection-docblock": "4.3.4", "phpstan/php-8-stubs": "^0.1.4", "phpstan/phpdoc-parser": "^0.4.9", diff --git a/composer.lock b/composer.lock index 8c87d3f91d..f888f60e3b 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": "604f93798c69f1f5838dc5970099ec1a", + "content-hash": "41e28f01535eae7c4cef5fd5f13149e9", "packages": [ { "name": "clue/block-react", @@ -2073,16 +2073,16 @@ }, { "name": "ondrejmirtes/better-reflection", - "version": "4.3.36", + "version": "4.3.37", "source": { "type": "git", "url": "https://github.com/ondrejmirtes/BetterReflection.git", - "reference": "c254afa9ac7baddb5c56eab9541eeaf8ba67dcfd" + "reference": "2de61c19c975c8901597e6f3a8ef49b868a701f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ondrejmirtes/BetterReflection/zipball/c254afa9ac7baddb5c56eab9541eeaf8ba67dcfd", - "reference": "c254afa9ac7baddb5c56eab9541eeaf8ba67dcfd", + "url": "https://api.github.com/repos/ondrejmirtes/BetterReflection/zipball/2de61c19c975c8901597e6f3a8ef49b868a701f0", + "reference": "2de61c19c975c8901597e6f3a8ef49b868a701f0", "shasum": "" }, "require": { @@ -2141,9 +2141,9 @@ ], "description": "Better Reflection - an improved code reflection API", "support": { - "source": "https://github.com/ondrejmirtes/BetterReflection/tree/4.3.36" + "source": "https://github.com/ondrejmirtes/BetterReflection/tree/4.3.37" }, - "time": "2020-10-14T11:08:16+00:00" + "time": "2020-10-16T08:15:03+00:00" }, { "name": "phpdocumentor/reflection-common", diff --git a/tests/PHPStan/Rules/Methods/MissingMethodImplementationRuleTest.php b/tests/PHPStan/Rules/Methods/MissingMethodImplementationRuleTest.php index 401738ba9b..bdd6304f97 100644 --- a/tests/PHPStan/Rules/Methods/MissingMethodImplementationRuleTest.php +++ b/tests/PHPStan/Rules/Methods/MissingMethodImplementationRuleTest.php @@ -43,4 +43,9 @@ public function testBug3469(): void $this->analyse([__DIR__ . '/data/bug-3469.php'], []); } + public function testBug3958(): void + { + $this->analyse([__DIR__ . '/data/bug-3958.php'], []); + } + } diff --git a/tests/PHPStan/Rules/Methods/data/bug-3958.php b/tests/PHPStan/Rules/Methods/data/bug-3958.php new file mode 100644 index 0000000000..ffb351ba2f --- /dev/null +++ b/tests/PHPStan/Rules/Methods/data/bug-3958.php @@ -0,0 +1,7 @@ +