Running php composer.phar
with the latest version gives me:
PHP Fatal error: Cannot redeclare class Symfony\Component\Console\Helper\Helper in phar:/composer.phar/vendor/symfony/console/Symfony/Component/Console/Helper/Helper.php on line 19
What's up? Works fine locally, but on a Linux server.
This happens as soon as I try to run any commands or just the file directly. I can't self-update or anything. I've tried redownloading.
Most likely you have apc.enable_cli
set to 1, you can check with php -i | grep apc
.
Another way to check everything is fine to run composer is running the installer in check-only mode:
curl -s https://getcomposer.org/installer | php -- --check
APC completely breaks down with PHARs (at least in CLI mode), and it does not provide any caching anyway in CLI since every process is independent, so disabling it makes sense, the flag is just there for debugging purposes AFAIK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With