Polyfill Error when composer installing
mo-kalaleeb opened this issue · comments
Hello
So what I've been struggling with Ployfill not a folder nor a file folder.
I'm using PHP 7.2 but the error seems to be in Polufill73/Resources/stubs
The error happend when trying to install behat and when trying to install spryker which they depend on Symfony for this kinda works
Please any fixes?
This is the log error
Writing lock file Generating autoload files Installation failed, reverting ./composer.json to its original content. [RuntimeException] Could not scan for classes inside "E:\Servers\behat001\vendor/symfony/polyfill-php73/Resources/stubs" which does not appear to be a file nor a folder require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no -dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-l owest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]
That's an issue with behat's discovery logic, please report the issue there.
Behat ? That's an output from composer, not Behat
OK :)
Still, we cannot reproduce.
I had the same issues, having php70 stubs on PHP 7.2 machine.
Caused by class_alias()
that used this stub (due to box)
Possible solution (trying out now): https://ayesh.me/composer-replace-polyfills
What do you mean by due to box
?
https://github.com/humbug/box + https://github.com/humbug/php-scoper
But class_alias()
is the point of failure
I think the polyfill packages must be excluded from the scoping. By definition of polyfilling, they must use class names that are the PHP ones anyway.
This is better
https://ayesh.me/composer-replace-polyfills
Also, polyfills should be conflicting with never
PHP version. If they are really polyfills