-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
feat: useContainerCommandLoader parameter #2060
feat: useContainerCommandLoader parameter #2060
Conversation
Changed definition to one line to fix phpcs @szepeviktor all other failing checks seems not that change related to me. |
if ($this->useContainerCommandLoader) { | ||
$consoleApplication->setContainerCommandLoader(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we really need another config option? I think this can just be appended on the getApplication()
method below:
if ($this->application === null) {
$this->application = (new Application(app(Container::class), app(Dispatcher::class), app()->version()))
->setContainerCommandLoader();
}
This is essentially what the framework does, and I see no reason why anyone would want to disable this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well probably it makes sense, wanted to keep it without it to make sure we don't break anything but I will change it.
extension.neon
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to clean up these changes as well (same as the laravel-test.sh file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, othter github account :D
Hey @szepeviktor @calebdw when it can be merged? |
Not by me! |
Changes
ContainerCommandLoader
when resolving command options/arguments etc, so when using#[AsCommand]
attribute on commands it will work as expected and resolve options/arguments properlyBreaking changes
No breaking changes, added new parameter with false value