You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: Ambiguous class resolution, "Stringable" was found in both "/var/www/html/vendor/myclabs/php-enum/stubs/Stringable.php" and "/var/www/html/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php", the first will be used.
I'm not directly using this component, it is done through another one, but I suppose one can easily reproduce the issue by requiring both this component and symfony/polyfill-php80 in composer.
The text was updated successfully, but these errors were encountered:
fredericgboutin-yapla
changed the title
Stringable class definition introduce class resolution ambiguity when using symfony/polyfill-php80
Stringable class definition introduces class resolution ambiguity when using symfony/polyfill-php80
Oct 9, 2024
Context
I started using the new
--strict-ambiguous
switch incomposer
,And in PHP 7.4, I'm getting a warning,
See composer/composer#6221 (comment)
I'm not directly using this component, it is done through another one, but I suppose one can easily reproduce the issue by requiring both this component and
symfony/polyfill-php80
in composer.Workaround
I added a directive in my
composer.json
file,And the warning is gone.
Solution
I'm not sure 😅PHP 7.4 is EOL so 🤷
You really share the very same definition https://github.com/myclabs/php-enum/blob/master/stubs/Stringable.php as the one from https://github.com/symfony/polyfill-php80/blob/1.x/Resources/stubs/Stringable.php - I suppose it would be more honest to explicitly depend on the later?
I don't know.
The text was updated successfully, but these errors were encountered: