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

Use Dependency Injection in register_commands.php #43203

Merged
merged 8 commits into from
Feb 1, 2024

Conversation

come-nc
Copy link
Contributor

@come-nc come-nc commented Jan 30, 2024

Summary

Use DI for all commands from Core to stop relying on deprecated methods.

Checklist

@come-nc come-nc added the 2. developing Work in progress label Jan 30, 2024
@come-nc come-nc self-assigned this Jan 30, 2024
@come-nc come-nc added this to the Nextcloud 29 milestone Jan 30, 2024
@come-nc
Copy link
Contributor Author

come-nc commented Jan 30, 2024

There is a service named IntegrityCodeChecker which is not a class name and must be used for integrity commands to not mess up with installation.
It’s at

$this->registerService('IntegrityCodeChecker', function (ContainerInterface $c) {

Maybe it can be renamed to the class name so that DI can be used?

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
…service name

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc force-pushed the fix/cleanup-register-command-with-di branch from bb8c9e2 to 0e19317 Compare January 30, 2024 15:07
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc
Copy link
Contributor Author

come-nc commented Jan 30, 2024

Maybe it can be renamed to the class name so that DI can be used?

I pushed that solution, I think it should be fine.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Feb 1, 2024
@come-nc come-nc requested review from nickvergessen, ChristophWurst, a team, ArtificialOwl, icewind1991 and Altahrim and removed request for a team February 1, 2024 09:52
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

🧹😎

@nickvergessen nickvergessen merged commit 4993dac into master Feb 1, 2024
134 checks passed
@nickvergessen nickvergessen deleted the fix/cleanup-register-command-with-di branch February 1, 2024 13:44
@blizzz blizzz mentioned this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants