You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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().
privatefunctionmakeInvokable(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.
The text was updated successfully, but these errors were encountered:
RFC
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 inlaminas-servicemanager
v3.0.0.The
Auryn
container assumes that if ainvokables
configuration is provided, that this means that theinvokable
must be invokable.So instead of instantiating the
invokable
, it checks if itis_callable()
.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.
The text was updated successfully, but these errors were encountered: