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

Deprecating using the WebspaceManger for getting webspaces #7222

Open
wants to merge 28 commits into
base: 2.6
Choose a base branch
from

Conversation

mamazu
Copy link
Contributor

@mamazu mamazu commented Dec 3, 2023

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Fixed tickets -
Related issues/PRs #7218
License MIT
Documentation PR -

What's in this PR?

  • Making the WebspaceCollection it's own service.
  • Deprecating repository like functions on the WebspaceManager
  • Adding constructor arguments to Webspace objects.

Why?

We want to split those huge services up. That way we reduce the amount of dependencies a class has.

Example Usage

OLD:

class SomeClass {
    public function __construct(
        private WebspaceManager $webspaceManager
    ) {}

    public function doSomething(): ?string 
    {
        return $this->webspaceManager->findWebspaceByKey('someKey')?->getName();
    }
}

NEW:

class SomeClass {
    public function __construct(
        private WebspaceCollection $webspaceCollection
    ) {}

    public function doSomething(): ?string 
    {
        return $this->webspaceCollection->getWebspace('someKey')?->getName();
    }
}

To Do

  • Create a documentation PR
  • Add breaking changes to UPGRADE.md

Comment on lines +116 to +117
private $key = null,
private $name = null,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically passing null to those parameters will be also removed in 3.0.

@mamazu mamazu changed the title Deprecating using the WebspaceManger for getting Webspaces Deprecating using the WebspaceManger for getting webspaces Dec 6, 2023
@mamazu
Copy link
Contributor Author

mamazu commented Jan 22, 2024

@alexander-schranz Can you have a look at this and merge if possible?

@mamazu mamazu force-pushed the deprecations_for_webspaces branch from f6a4853 to 2735eb8 Compare March 9, 2024 22:05
@mamazu mamazu force-pushed the deprecations_for_webspaces branch from cfc7584 to 5780b1c Compare April 24, 2024 11:25
@mamazu mamazu force-pushed the deprecations_for_webspaces branch from 09b2173 to 98cb783 Compare May 15, 2024 16:33
@mamazu mamazu added Technical Debt Impacts code quality, no or just small impact on end developers and users DX Affecting the end developer labels May 18, 2024
@mamazu mamazu force-pushed the deprecations_for_webspaces branch from 117bd49 to e102cb8 Compare May 18, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Affecting the end developer Technical Debt Impacts code quality, no or just small impact on end developers and users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant