This repository has been archived by the owner on Feb 6, 2020. It is now read-only.
Releases: zendframework/zend-servicemanager
Releases · zendframework/zend-servicemanager
zend-servicemanager 3.4.0
zend-servicemanager 2.7.11
2.7.11 - 2018-06-22
Added
- Nothing.
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #269 fixes a
regression whereby using static Callable strings caused an undefined variable
notice.
zend-servicemanager 3.3.2
Added
- Nothing.
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
zend-servicemanager 2.7.10
Added
- Nothing.
Changed
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #210 fixes a regression whereby factories accepting creation options were receiving an empty array versus a
null
value when no options were present for a particular invocation; they now correctly receive anull
value.
zend-servicemanager 3.3.1
zend-servicemanager 2.7.9
Added
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #205 fixes how the
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.
zend-servicemanager 3.3.0
Added
-
#180 adds explicit support for PSR-11 (ContainerInterface) by requiring container-interop at a minimum version of 1.2.0, and adding a requirement on psr/container 1.0.
Zend\ServiceManager\ServiceLocatorInterface
now explicitly extends theContainerInterface
from both projects.Factory interfaces still typehint against the container-interop variant, as changing the typehint would break backwards compatibility. Users can duck-type most of these interfaces, however, by creating callables or invokables that typehint against psr/container instead.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- Nothing.
zend-servicemanager 3.2.1
Added
- #176 adds the options
-i
or--ignore-unresolved
to the shippedgenerate-deps-for-config-factory
command. This flag allows it to build configuration for classes resolved by theConfigAbstractFactory
that typehint on interfaces, which was previously unsupported.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #174 updates the
ConfigAbstractFactory
to allow theconfig
service to be either anarray
or anArrayObject
; previously, onlyarray
was supported.
zend-servicemanager 3.2.0
Added
- #146 adds
Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory
, which enables a configuration-based approach to providing class dependencies when all dependencies are services known to theServiceManager
. Please see the documentation for details. - #154 adds
Zend\ServiceManager\Tool\ConfigDumper
, which will introspect a given class to determine dependencies, and then create configuration forZend\ServiceManager\AbstractFactory\ConfigAbstractFactory
, merging it with the provided configuration file. It also adds a vendor binary,generate-deps-for-config-factory
, for generating these from the command line. - #154 adds
Zend\ServiceManager\Tool\FactoryCreator
, which will introspect a given class and generate a factory for it. It also adds a vendor binary,generate-factory-for-class
, for generating these from the command line. - #153 adds
Zend\ServiceManager\AbstractFactory\ReflectionBasedAbstractFactory
. This class may be used as either a mapped factory or an abstract factory, and will use reflection in order to determine which dependencies to use from the container when instantiating the requested service, with the following rules:- Scalar values are not allowed, unless they have default values associated.
- Values named
$config
type-hinted againstarray
will be injected with theconfig
service, if present. - All other array values will be provided an empty array.
- Class/interface typehints will be pulled from the container.
- #150 adds a "cookbook" section to the documentation, with an initial document detailing the pros and cons of abstract factory usage.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #106 adds detection of multiple attempts to register the same instance or named abstract factory, using a previous instance when detected. You may still use multiple discrete instances, however.
zend-servicemanager 3.1.2
Added
- Nothing.
Deprecated
- Nothing.
Removed
- Nothing.
Fixed
- #167 fixes how exception codes are provided to 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.