Skip to content

Commit c6fbf2e

Browse files
authored
Add command to services.yaml file (#131)
The symfony console first tries to load the command name [from the service-definition][1], if this fails it loads the command name via the [getDefaultName() method][2], which does not work sometimes. We saw this error lately in our logs: ``` [file /var/www/html/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php] [message Uncaught Error: Call to undefined method OxidCommunity\ModuleInternals\Command\ModuleFixCommand::getDefaultName() in /var/www/html/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php:61 [...] ``` [1]: https://github.com/symfony/console/blob/v3.4.15/DependencyInjection/AddConsoleCommandPass.php#L47-L53 [2]: https://github.com/symfony/console/blob/v3.4.15/DependencyInjection/AddConsoleCommandPass.php#L61
1 parent 76aae8a commit c6fbf2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ services:
22
oxid_community.moduleinternals.module.fix.command:
33
class: OxidCommunity\ModuleInternals\Command\ModuleFixCommand
44
tags:
5-
- { name: 'console.command' }
5+
- { name: 'console.command', command: 'module:fix', description: 'Fixes modules metadata states'}

0 commit comments

Comments
 (0)