-
-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double class declaration when generating Composer autoload files due to the PHP polyfills in version 1.10.52 #10387
Comments
This bug report is missing a link to reproduction at phpstan.org/try. It will most likely be closed after manual review. |
I can confirm a similar problem. Running composer show | grep phpstan yields phpstan/phpdoc-parser 1.25.0 PHPDoc parser with support for nullable, intersection and generic types
phpstan/phpstan 1.10.52 PHPStan - PHP Static Analysis Tool and running composer show | grep polyfill yields symfony/polyfill-ctype v1.28.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-grapheme v1.28.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-normalizer v1.28.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring v1.28.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php73 v1.28.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80 v1.28.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/polyfill-php81 v1.28.0 Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions Attempting to run tests with vendor/bin/phpunit --configuration=test/Unit/phpunit.xml
PHPUnit 9.6.15 by Sebastian Bergmann and contributors.
Runtime: PHP 7.4.33
Configuration: test/Unit/phpunit.xml
Random Seed: 1704457481
PHP Fatal error: Cannot declare class Symfony\Polyfill\Php81\Php81, because the name is already in use in phar:///Users/am/Sites/ergebnis/rector-rules/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/polyfill-php81/Php81.php on line 19
Fatal error: Cannot declare class Symfony\Polyfill\Php81\Php81, because the name is already in use in phar:///Users/am/Sites/ergebnis/rector-rules/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/polyfill-php81/Php81.php on line 19 For reference, see https://github.com/ergebnis/rector-rules/actions/runs/7421738763/job/20195703344. |
Please verify that https://github.com/phpstan/phpstan/releases/tag/1.10.53 fixes this for you. |
Yes, version 1.10.53 fixes this for me. Thanks for the quick fix and release, @ondrejmirtes! ❤️ |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
https://github.com/oliverklee/ext-seminars/actions/runs/7421448150/job/20194829356?pr=2883
Using PHPStan 1.10.52 together with the
symfony/polyfill-php80
package (in version 1.28.0) introduces a second declaration of the classSymfony\Polyfill\Php80\Php80
, which breaks the generation of the autoload files duringcomposer install
:Code snippet that reproduces the problem
No response
Expected output
No error during autoload file generation
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: