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

Commands are not listed by bin/magento for M2.4.1 #40

Closed
shochdoerfer opened this issue Feb 7, 2021 · 6 comments
Closed

Commands are not listed by bin/magento for M2.4.1 #40

shochdoerfer opened this issue Feb 7, 2021 · 6 comments

Comments

@shochdoerfer
Copy link

General

  • Module version: 3.3.0
  • Magento version: 2.4.1
  • PHP version: 7.4

Issue description

I created a new Magento 2.4.1 project and installed the semaio/magento2-configimportexport package afterward as described in the README file. When invoking bin/magento the commands exposed by the module are not listed and I cannot invoke them.

I could track things down to this:
Currently, the module is registering the commands with type Magento\Framework\Console\CommandList. When changing the type to Magento\Framework\Console\CommandListInterface the commands appear when invoking bin/magento .

This is also mentioned in the README file of the Console package: https://github.com/magento/magento2/blob/2.4-develop/lib/internal/Magento/Framework/Console/README.md

Happy to provide a PR if changing the type makes sense for you.

@ktomk
Copy link

ktomk commented Feb 7, 2021

Do you know if using the interface is backwards compatible to earlier Magento versions? @shochdoerfer

@shochdoerfer
Copy link
Author

The mentioned README.md file was last changed in April 2016 so I would assume the interface is available for quite a while now. The first commit forMagento\Framework\Console\CommandListInterface occurred in Sep 2015.

I could not really track a PR that changed the behaviour, at least no PR that explicitly states the change. The closest one seems this magento/magento2#29762

@therouv
Copy link
Contributor

therouv commented Feb 9, 2021

@shochdoerfer Happy to merge a PR for this if it's backwards compatible. Otherwise I'd set up separate release branches.

@shochdoerfer
Copy link
Author

@therouv sure, need to investigate. The issue was rather opened to see if I am doing something wrong or if other people ran in the same situation :)

@therouv
Copy link
Contributor

therouv commented Mar 13, 2021

@shochdoerfer I've changed it accordingly since Magento has a static test which discourages this behavior (see here).

However, I've tested with all 2.4 versions and the commands were always displayed without any issues:

configimportexport-command-list-m241

@shochdoerfer
Copy link
Author

Awesome! Thanks. Sorry, lost track of this issue ;(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants