Skip to content

Conversation

@vladsf
Copy link
Contributor

@vladsf vladsf commented Sep 27, 2021

Here is an example command I trying to add to a release of Eventum, but I get
the error:

[eventumtest Command]$ /eventum/bin/console.php eventum:example:hello
  There are no commands defined in the "eventum:example" namespace.
..

Not sure I understand how to add custom console commands.
Also there is discussion for this case.

@glensc
Copy link
Member

glensc commented Sep 28, 2021

You needed to run cache:clear:

$ ./bin/console.php cache:clear
[...]
$ ./bin/console.php eventum:example:hello
Hello world!

docs:

@glensc
Copy link
Member

glensc commented Sep 28, 2021

In other words, you need to clear the cache for the dependency injection:

ps: cross-link this PR and your discussion for other people!

@glensc glensc changed the title Add example command Add example command for extension Sep 28, 2021
@glensc glensc marked this pull request as ready for review September 28, 2021 04:57
@glensc
Copy link
Member

glensc commented Sep 28, 2021

I've refactored the class to move it to extension, so this can be merged.

@glensc glensc merged commit a9ab07f into eventum:master Sep 28, 2021
@glensc
Copy link
Member

glensc commented Sep 28, 2021

@vladsf by crosslink I mean that both have links to each other, right now PR does not have a link to the discussion.

@vladsf vladsf deleted the add-example-cmd branch September 28, 2021 12:56
@glensc glensc added this to the 3.10.7 milestone Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants