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

Cleanup Server.php (aliases & services) #12225

Open
rullzer opened this issue Nov 2, 2018 · 3 comments
Open

Cleanup Server.php (aliases & services) #12225

rullzer opened this issue Nov 2, 2018 · 3 comments
Labels
1. to develop Accepted and waiting to be taken care of good first issue Small tasks with clear documentation about how and in which place you need to fix things in. technical debt

Comments

@rullzer
Copy link
Member

rullzer commented Nov 2, 2018

As discussed with @MorrisJobke

We regsiter a lot of plain text aliases like

$this->registerAlias('CalendarManager', \OC\Calendar\Manager::class);

They should all die. Services should be queries properly using their servicename.

Ideally we also remove as much simple wrappers as possible like:

$this->registerService('TagMapper', function (Server $c) {
return new TagMapper($c->getDatabaseConnection());
});

The DI can handle that all perfectly by itself when it is actually needed.

@rullzer rullzer added 1. to develop Accepted and waiting to be taken care of technical debt labels Nov 2, 2018
@rullzer rullzer added this to the Nextcloud 16 milestone Nov 2, 2018
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #10744 (Update help.php), #829 (copyright in version.php), #6784 (Php error?), #4743 ("php occ trashbin:cleanup" removes files_trashbin/files from filesystem), and #4415 (Cleanup \OCP\Share).

@rullzer rullzer removed this from the Nextcloud 16 milestone Feb 25, 2019
@ChristophWurst
Copy link
Member

They should all die. Services should be queries properly using their servicename.

This is largely done via the deprecated aliases.

Ideally we also remove as much simple wrappers as possible like

Partly done, but still some left to do.

@joshtrichards
Copy link
Member

A lot of this work looks like it was covered in #19345 with #19347, #22202

registerAlias() plain text aliases:

  • appear all gone (done in the sense they only still exist by way of registerDeprecatedAlias() references)

registerService() simple wrappers:

TBD

@joshtrichards joshtrichards added the good first issue Small tasks with clear documentation about how and in which place you need to fix things in. label Sep 14, 2023
@joshtrichards joshtrichards changed the title Cleanup Server.php Cleanup Server.php (aliases & services) Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of good first issue Small tasks with clear documentation about how and in which place you need to fix things in. technical debt
Projects
None yet
Development

No branches or pull requests

4 participants