All notable changes to this project will be documented in this file, in reverse chronological order by release.
null
value when no options were present for a
particular invocation; they now correctly receive a null
value.AbstractPluginManager
handles repeated retrievals of the same
service when instance options are provided and the service is marked as
"shared". Previously, it incorrectly would return the first instance
retrieved; with this release, no instance created with instance options is
ever shared.InvokableFactory
, ensuring it checks
for a class matching the $requestedName
prior to the $canonicalName
; this
also is more in line with version 3, which only has access to the requested
name.InvokableFactory
deals with creation options. Prior to this release,
absence of options led to setting the creation options to an empty array,
which, because it was non-null, led to breakage in plugins that treated an
empty array differently than null. This patch ensures that the original
behavior is restored.ServiceNotCreatedException
. Previously,
the code was provided as-is. However, some PHP internal exception classes,
notably PDOException
, can sometimes return other values (such as strings),
which can lead to fatal errors when instantiating the new exception. The patch
provided casts exception codes to integers to prevent these errors.AbstractPluingManager
handles $options
arrays passed when
retrieving a plugin when that plugin resolves to the InvokableFactory
,
ensuring subsequent calls with different options are created correctly.ServiceLocatorInterface
to extend container-interop's ContainerInterface
,
as the definitions are compatible. This change will mean that implementing
ServiceLocatorInterface
will provide a ContainerInterface
implementation.Zend\ServiceManager\Test\CommonPluginManagerTrait
, which allows you to test
that your plugin manager is forwards compatible with v3.InvokableFactory
to add the setCreationOptions()
method, allowing
the InvokableFactory
to accept $options
when triggered.InvokableFactory
implementation can work.InvokableFactory
. In v2, this allows plugin managers to pass
construction options to the factory to use during instantiation of the
requested service class, emulating the behavior of build()
in v3.Zend\ServiceManager\Exception\InvalidServiceException
for forwards
compatibility with v3.InvokableFactory
to throw InvalidServiceException
instead of
InvalidServiceNameException
, for forwards compatibility with v3.InvokableFactory
when invoked after resolving an alias.AbstractPluingManager
and introduces
InvokableFactory
to help forward migration to version 3.ServiceManager::setFactory()
to remove
references to abstract factories.ServiceManager
to implement the container-interop interface,
allowing interoperability with applications that consume that interface.$this
in a closure is the invoking object when created within a method). It
also removes several @requires PHP 5.4.0
annotations.