Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laminas Servicemanager Laravel Package

laminas/laminas-servicemanager

Powerful dependency injection and service container for PHP. Manage factories, abstract factories, delegators, aliases, and shared services, with PSR-11 interoperability and robust configuration for complex applications.

View on GitHub
Deep Wiki
Context7

PSR-11 Support

container-interop/container-interop 1.2.0 modifies its codebase to extend interfaces from psr/container (the official interfaces for PSR-11). If you are on a pre-3.3.0 version of laminas-servicemanager, update your project, and receive container-interop 1.2, then laminas-servicemanager can already act as a PSR-11 provider!

laminas-servicemanager 3.3.0 requires at least version 1.2 of container-interop, and also requires psr/container 1.0 to explicitly signal that it is a PSR-11 provider, and to allow removal of the container-interop dependency later.

Version 4.0 will require only psr/container, and will update the various factory interfaces and exception implementations to typehint against the PSR-11 interfaces, which will require changes to any implementations you have. In the meantime, you can duck-type the following factory types:

  • Laminas\ServiceManager\Factory\FactoryInterface: use a callable with the following signature:

    function (
        \Psr\Container\ContainerInterface $container,
        string $requestedName,
        array $options = null
    )
    
  • Laminas\ServiceManager\Factory\DelegatorFactoryInterface: use a callable with the following signature:

    function (
        \Psr\Container\ContainerInterface $container,
        string $name,
        callable $callback,
        array $options = null
    )
    
  • Laminas\ServiceManager\Initializer\InitializerInterface: use a callable with the following signature:

    function (
        \Psr\Container\ContainerInterface $container,
        $instance
    )
    

Abstract factories can not be duck typed, due to the additional canCreate() method.

You can also leave your factories as-is for now, and update them once laminas-servicemanager v4.0 is released, at which time we will be providing tooling to help migrate your factories to PSR-11.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai