Skip to content

Remove excessive command creation #4

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

Merged
merged 1 commit into from
Oct 27, 2018
Merged

Remove excessive command creation #4

merged 1 commit into from
Oct 27, 2018

Conversation

igrybkov
Copy link
Contributor

\Enqueue\Magento2\Console\CommandList::getCommands has a mechanism which tries to prevent the creation of a command when a class of the command does not exist.
The problem is that the mechanism doesn't work because factories for these commands are received through DI and on this stage, you would definitely know whether a class exists or not.
And there shouldn't be a situation where a dependency is missing — it's a smell of an incorrect dependencies declaration.

This pull request drops all this broken logic and makes command creation flow clear.

@makasim makasim merged commit 3336784 into php-enqueue:master Oct 27, 2018
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

Successfully merging this pull request may close these issues.

2 participants