Skip to content
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

Conflict with symfony #185

Open
dvdsndr opened this issue Feb 18, 2020 · 2 comments
Open

Conflict with symfony #185

dvdsndr opened this issue Feb 18, 2020 · 2 comments
Labels
composer v2 Issues and changes related to a switch to Composer Version 2

Comments

@dvdsndr
Copy link

dvdsndr commented Feb 18, 2020

Many Magento 1.9.X sites use composer and n98-magerun to manage their installations.

There is some conflict with the symfony framework using the latest php7.3 compatible magerun.

We get the following from n98-magerun:

PHP Fatal error: Uncaught Error: Call to undefined method Symfony\Component\Console\Command\HelpCommand::isHidden() in /var/www/magento/vendor/symfony/console/Descriptor/ApplicationDescription.php:108
Stack trace:

If rename the symfony folder loaded by compose-installer then the problem goes away. I can only assume that both composer-installer and magerun are using incompatible versions and the compose-installer Symfony version is already loaded thus magerun gets the wrong version.

@aadmathijssen
Copy link
Contributor

I encountered the same issue. Also, when I upgraded to the latest version of the Magento Composer Installer with all of its dependencies, most importantly Symfony Console 5, I got another error related to Symfony Console:

PHP Fatal error: Class 'Symfony\Contracts\EventDispatcher\Event' not found in /path/to/magento/vendor/symfony/console/Event/ConsoleEvent.php on line 24

It turns out that it is an issue in n98-magerun, which has been fixed in version 1.99.0. From the changelog:

Fix: Fatal error w/ Magento Composer Installer (by Luke Rodgers and Tom Klingenberg, #938)

More precisely, commit 6d42ba5 resolved the issue.

So, in order to fix the issue you need to upgrade n98-magerun to at least v1.99.0.

@Flyingmana Flyingmana added the composer v2 Issues and changes related to a switch to Composer Version 2 label Oct 28, 2020
@Flyingmana
Copy link
Contributor

I will reduce the possible dependency issues with the migration to composer V2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composer v2 Issues and changes related to a switch to Composer Version 2
Projects
None yet
Development

No branches or pull requests

3 participants