Skip to content

Conversation

@come-nc
Copy link
Contributor

@come-nc come-nc commented Jun 16, 2025

Summary

Cleanup DIContainer class.
Also removed the @deprecated tag from the class as this class will not be removed, only the interface IAppContainer and associated methods should be removed.

Checklist

@come-nc come-nc added this to the Nextcloud 32 milestone Jun 16, 2025
@come-nc come-nc self-assigned this Jun 16, 2025
@come-nc come-nc added the 2. developing Work in progress label Jun 16, 2025
@come-nc come-nc force-pushed the fix/cleanup-dicontainer branch 3 times, most recently from f847eb6 to 8990f69 Compare June 24, 2025 14:16
@come-nc come-nc force-pushed the fix/cleanup-dicontainer branch 2 times, most recently from 356e4ad to 9fbc182 Compare July 1, 2025 08:50
come-nc added 10 commits July 8, 2025 13:32
Also removed deprecated tag from the class as this class will not be
 removed, only the interface IAppContainer and associated methods should
 be removed.

Signed-off-by: Côme Chilliet <[email protected]>
Some tests related to MiddlewareDispatcher are still failing.

Signed-off-by: Côme Chilliet <[email protected]>
…teCookieMiddleware injection

Signed-off-by: Côme Chilliet <[email protected]>
Cannot use an alias for this one, as it depends upon LoggerInterface so
 that creates an infinite loop.

Signed-off-by: Côme Chilliet <[email protected]>
Otherwise it gets resolved to \OC::$server.

Signed-off-by: Côme Chilliet <[email protected]>
This caused a call to logger too soon in init phase

Signed-off-by: Côme Chilliet <[email protected]>
Signed-off-by: Côme Chilliet <[email protected]>
In this case we do not want the application DI container because we are
 requesting classes from other applications, so it’s better to ask the
 server container. We use \OCP\Server::get for this.

Signed-off-by: Côme Chilliet <[email protected]>
…on container

This make sure that all middlewares get a logger scoped to the
 application id, among other things.

Signed-off-by: Côme Chilliet <[email protected]>
@come-nc come-nc force-pushed the fix/cleanup-dicontainer branch from d4fb88f to 2346a52 Compare July 8, 2025 11:32
@come-nc come-nc marked this pull request as ready for review July 8, 2025 12:42
@come-nc come-nc requested a review from a team as a code owner July 8, 2025 12:42
@come-nc come-nc requested review from ArtificialOwl, kesselb, leftybournes, provokateurin and susnux and removed request for a team July 8, 2025 12:42
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

Nice, maybe you could squash some of the commits to make bisecting easier in case any of the changes turn out to be problematic later on?

@come-nc
Copy link
Contributor Author

come-nc commented Jul 8, 2025

Nice, maybe you could squash some of the commits to make bisecting easier in case any of the changes turn out to be problematic later on?

But CI won’t be green anymore 😨

@come-nc
Copy link
Contributor Author

come-nc commented Jul 8, 2025

I often prefer detailed commits, because you can treat them by batch if you want, while once squashed there is no going back. I’m gonna merge this version to move forward with this. I’ll try to do less commits next time.

@come-nc come-nc merged commit b1e58ba into master Jul 8, 2025
214 of 218 checks passed
@come-nc come-nc deleted the fix/cleanup-dicontainer branch July 8, 2025 13:48
@skjnldsv skjnldsv mentioned this pull request Aug 19, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants