Skip to content
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

refactor: cleaning up constructors #5602

Merged
merged 4 commits into from
Oct 13, 2021
Merged

refactor: cleaning up constructors #5602

merged 4 commits into from
Oct 13, 2021

Conversation

krzysztofrewak
Copy link

In general, constructors of Laravel Commands and Controllers should not be setting any values or services. Every (!) constructor is ran before some commands like artisan route:list, artisan env, artisan queue:work and others, so putting things into constructors just making the application slower.

I just moved unnecessary invocations to handlers or endpoint methods. It shouldn't change or break anything.

@CLAassistant
Copy link

CLAassistant commented Oct 11, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@asbiin asbiin left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!
see my comment

app/Http/Controllers/Contacts/ActivitiesController.php Outdated Show resolved Hide resolved
@asbiin asbiin merged commit d209313 into monicahq:master Oct 13, 2021
@asbiin
Copy link
Member

asbiin commented Oct 13, 2021

Thank you @krzysztofrewak

@github-actions
Copy link

🎉 This PR is included in version 3.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Nov 1, 2022

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants