Closed kgoedecke closed 2 months ago
That is a comedy topic. We have to support multiple Magento versions at once. At the moment we are searching a solution to support the tool for Magento 2.3 where we face the same problem.
Thanks for getting back to me. Is there at least a branch which can be used with 3.x?
No. btw... I don't understand why so many ppl install n98-magerun with composer. One of the main ideas of the tool is that e.g. an admin can use it without any code or config change of the shop installation. We always recommend to use the phar version.
I don't understand why so many ppl install n98-magerun with composer.
Because there is a composer.json
file and the packages are published on https://packagist.org/ ? 😉
No worries, I understand the difficulties here, using the phar file directly is a better way to manage these kind of utilities then composer, even though composer is really easy for upgrading packages and not forgetting about upgrading them.
@hostep Yes, as we published the composer package, we was able to support the existing Magento versions. At the moment we have trouble to support every used Symfony version in the wild. If it is a solution, we could drop the composer support. How can we support Symfony 2.x, 3.x, 4.x, ... components at once?
btw... I don't understand why so many ppl install n98-magerun with composer.
FWIW, I install via composer in my local environment so I can have access to it within any project, and composer 'manages' it (executable paths, updates, etc).
It's more of a problem with composer then the magerun tool itself. Magerun and Magento are two separate things, even though magerun can communicate with Magento, it doesn't necessarily mean that dependencies of both products should be the same or compatible for that matter. Composer doesn't know how to deal with these kind of situations unfortunately.
There are however some composer plugins which can possibly deal with this a bit better, I tried those out about a year ago if I remember correctly, but there were some things I didn't quite like back then, maybe I should give them another try again, the ones I'm talking about are:
Not sure if this is really helpful in this thread.
How can we support Symfony 2.x, 3.x, 4.x, ... components at once?
Do you need to support all versions? 2.3 is EOL since mid 2017 (and should be replaced?)
I had confilcts with phpstan that uses symfony 3,2/4.0 components so i tried to change Magerun requirements to same ... and it seems there is only one (?) problem with a deprecated/removed "TableHelper" class ...
use Symfony\Component\Console\Helper\Table
: new $helperClass()
to: : new $helperClass(new ConsoleOutput)
... seems to work with symfony 4.x ... :)
Maybe someone can check this before i create a PR?
@sreichel Thanks for investigate that problem. I personally use the phar edition of n98-magerun. In the past we had a lot of issues to be compatible between several Magento releases. That's why we have this long list of travis jobs...
I use phar too, but it still would be nice if composer version would work with more recent setups :)
(same for phpunit 4.x)
I agree with @sreichel here, it would be nice if the latest version of magerun2 could have non-conflicting dependencies with the latest version of Magento2. That would mean it will be installable using composer again, but only on more recent versions of Magento2. Right now it's the opposite, it's only installable with composer on older versions of Magento2.
This would also have the benefit of using newer functionalities of newer versions of symfony components, should these come in handy. And would also mean you are using supported versions of these components.
Just a nice to have if it wouldn't take that much time to upgrade them, but I'm seeing @sreichel is already working on a pull request for this 👍
Update: sorry, just noticed this issue is about magerun1 and Magento1, my bad!
@sreichel @hostep I already started to update the dependencies. The next n98-magerun release will only be tested with latest OpenMage release. Then we can try to update the Symfony dependencies as well.
I already upgraded all tests to be compatible with PHPUnit 6.x. Next step is 8.x That's also needed to upgrade to the latest Symfony versions.
Think this can be closed. Develop branch uses symfony/xyz 5.4.
Can we please update
"symfony/console": "~2.3",
to at least version 3, I'm facing conflicts because other packages depend on 3.x.