8000 Make console commands lazy by ERuban · Pull Request #11657 · Sylius/Sylius · GitHub
[go: up one dir, main page]

Skip to content

Make console commands lazy #11657

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
Jul 17, 2020
Merged

Make console commands lazy #11657

merged 1 commit into from
Jul 17, 2020

Conversation

ERuban
Copy link
Contributor
@ERuban ERuban commented Jul 16, 2020
Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets
License MIT

This commit is about of a little optimisation to avoid initialisation of all command services on each executing bin/console command.
Since Symfony 3.4 console commands can be lazy thanks to a static name property.
This change does not break BC because the BC layer is already in the base command's constructor.

@ERuban ERuban requested a review from a team as a code owner July 16, 2020 21:15
Copy link
Contributor
@lchrusciel lchrusciel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Eugene,

thanks for your proposal. Seems totally reasonable. Welcome to our community and my congratulation for your first PR ;)

@lchrusciel lchrusciel added the Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). label Jul 17, 2020
@lchrusciel lchrusciel merged commit 3e2845d into Sylius:master Jul 17, 2020
@lchrusciel
Copy link
Contributor

Thank you, Eugene! 🎉

@ERuban
Copy link
Contributor Author
ERuban commented Jul 17, 2020

Thank you too, for the great project! Glad to be helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0