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

[RFC]: Removal of Auryn container #53

Closed
boesing opened this issue Sep 24, 2021 · 2 comments · Fixed by #60
Closed

[RFC]: Removal of Auryn container #53

boesing opened this issue Sep 24, 2021 · 2 comments · Fixed by #60
Labels
Milestone

Comments

@boesing
Copy link
Member

boesing commented Sep 24, 2021

RFC

Q A
Proposed Version(s) 3.11.0
BC Break? No

Goal

The current implementation (https://packagist.org/packages/northwoods/container) seems to be unmaintained.
Last release was in 2018 (3 years ago) and it has an invalid implementation regarding invokables.

Current unit tests are failing due to a change in mezzio regarding PSR-17 response factories.

Background

Invokables in a mezzio/laminas context are usually instantiated with the InvokableFactory which was introduced in laminas-servicemanager v3.0.0.

The Auryn container assumes that if a invokables configuration is provided, that this means that the invokable must be invokable.
So instead of instantiating the invokable, it checks if it is_callable().

private function makeInvokable(string $name, $factory): callable
{
    if (is_callable($factory)) {
        return $factory;
    }

    if ($this->isValidClass($factory)) {
        $factory = new $factory();
    }

    if (is_callable($factory) === false) {
        throw ContainerException::expectedInvokable($name);
    }

    return $factory;
}

Considerations

We could provide a patch to that container but due to the lack of time, I would rather drop it. Even if we would provide a patch for this, there is no guarantee that it is still maintained.

Proposal(s)

I would like to drop the Auryn container support with one of the next versions. Existing projects keep working, just freshly created projects are not able to select that container during installation.

Appendix

None so far.

@boesing boesing added the RFC label Sep 24, 2021
@geerteltink
Copy link
Contributor

I agree, if containers are not maintained they should be removed. It blocks us from upgrading to newer versions.

Besides that, there is the option to install alternative packages which are not listed https://github.com/mezzio/mezzio-skeleton#installing-alternative-packages.

@lukaslangen
Copy link
Contributor

Can be closed as #60 removed it.

@Ocramius Ocramius added this to the 3.11.0 milestone Dec 23, 2021
@Ocramius Ocramius linked a pull request Dec 23, 2021 that will close this issue
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 a pull request may close this issue.

5 participants