nextcloud / nextcloud/server

Functions that return deprecated types should be deprecated, themselves

Open
#40,248 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage needs review technical debt
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

The following methods return deprecated types and should be deprecated, themselves:

OC\AppFramework\Bootstrap\BootContext::getAppContainer
OC\AppFramework\Bootstrap\BootContext::getServerContainer
OCP\AppFramework\Bootstrap\IBootContext::getAppContainer
OCP\AppFramework\Bootstrap\IBootContext::getServerContainer
OCP\AppFramework\App::getContainer
OC\ServerContainer::getAppContainer
OC\ServerContainer::getAppContainerForService
OC\ServerContainer::getRegisteredAppContainer

Should they be deprecated as of v28, or should they be "back-dated" and deprecated based on the version of the return type? For example, getRegisteredAppContainer returns a DIContainer, and that was deprecated in version 20.0.0. So, getRegisteredAppContainer SHOULD have been deprecated in version 20.0.0 as well, but it was not.

I'm happy to submit a PR - I just want to make sure about the versioning question.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the listed methods in the BootContext, IBootContext, App, and ServerContainer classes and inspect how deprecations are currently represented. Confirm the project’s versioning decision with maintainers, then ensure each method is deprecated consistently with that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend-api-design
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.