phpstan / phpstan-symfony

Symfony extension for PHPStan
MIT License
698 stars 89 forks source link

Fix phpstan-src build errors #375

Closed staabm closed 8 months ago

staabm commented 8 months ago

before this PR

There was 1 failure:

1) PHPStan\Type\Symfony\ExtensionTest::testFileAsserts with data set "/home/runner/work/phpstan-src/phpstan-src/extension/tests/Type/Symfony/data/cache.php:12" ('type', '/home/runner/work/phpstan-src...he.php', PHPStan\Type\Constant\ConstantStringType Object (...), PHPStan\Type\Constant\ConstantStringType Object (...), 12)
Expected type string, got type '' in /home/runner/work/phpstan-src/phpstan-src/extension/tests/Type/Symfony/data/cache.php on line 12.
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'string'
+''''
ondrejmirtes commented 8 months ago

This is not the right fix. The failing test actually shows a real issue. PHPStan dynamic return type extension needs to be written instead.

ondrejmirtes commented 8 months ago

Thank you.