-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
Using phpstan while having symfony/polyfill-php80 installed leads to this error:
<unknown location> Child process error (exit code 255): PHP Fatal error: Cannot declare interface Stringable, because the name is already in use in .../vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php on line 3
Fatal error: Cannot declare interface Stringable, because the name is already in use in .../vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php on line 3
In Stringable.php line 3:
[Symfony\Component\ErrorHandler\Error\FatalError]
Compile Error: Cannot declare interface Stringable, because the name is already in use
Exception trace:
at .../vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php:3
I added some dumps to see what defined the interface:
"phar://.../vendor/phpstan/phpstan/phpstan/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php"
Code snippet that reproduces the problem
Not completely sure but it might be enough to just add both symfony/polyfill-php80 and phpstan/phpstan to your composer.json and then run phpstan. I can try to create a reproducing minimal repo if you need it.
Expected output
No error expected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels