View Issue Details

IDProjectCategoryView StatusLast Update
0007120OXID eShop (all versions)2.3. Extensions (modules, themes)public2021-04-20 13:51
Status acknowledgedResolutionopen 
Product Version6.2.0 
Target VersionFixed in Version 
Summary0007120: Custom Module Command breaks composer update
DescriptionThis is related to

When creating your own command inside of a module, composer update fails with

PHP Fatal error: Uncaught Error: Call to undefined method MyName\Importer\Commands\MyCommand::getDefaultName() in /var/www/html/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php:61

This happens only when in service.yaml command in tags is not defined:
So this works:
      - { name: 'console.command', command: 'my-name:my-module:my-command' }

But this should work without having to define command again, double to inside of Command class.


Seems this is some symfony/console version mismatch with composer.
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined



2020-04-17 12:50

administrator   ~0013187

Thanks for your report. This issue was known from the update component. Looks like it triggers also in your mentioned case. I acknowledge it as a bug, but want to say, that it does not block from using the module/command. The error message will be displayed during composer update, but the whole process works anyway.



2020-04-27 12:39

administrator   ~0013201

Last edited: 2020-04-27 12:48

View 2 revisions

I have to correct my note. Looks like we were lucky with the update component, but the error itself leads to a execution stop of the process. Therefore script won't be run and for example modules don't get copied or the module configuration won't be updated. This results in major issues.

Priority increased.

Please use the provided workaround: Adding the command to the services.yaml.



2020-09-03 11:39

reporter   ~0013286

I stumbled upon the same issue a few months ago, here's the reason: