Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 1d87c88

Browse files
committed
Updated CHANGELOG for #31
1 parent b888982 commit 1d87c88

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

CHANGELOG.md

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -77,33 +77,6 @@ All notable changes to this project will be documented in this file, in reverse
7777

7878
- Integration with `Zend\Di` has been removed. It may be re-integrated later.
7979

80-
- The `invokables` configuration key no longer exists. It has been replaced by a
81-
built-in factory.
82-
83-
In versions 2.x:
84-
85-
```php
86-
return [
87-
'service_manager' => [
88-
'invokables' => [
89-
MyClass::class => MyClass:class,
90-
],
91-
],
92-
];
93-
```
94-
95-
In ZF 3.x:
96-
97-
```php
98-
return [
99-
'service_manager' => [
100-
'factories' => [
101-
MyClass::class => 'Zend\ServiceManager\Factory\InvokableFactory',
102-
],
103-
],
104-
];
105-
```
106-
10780
- `MutableCreationOptionsInterface` has been removed, as options can now be
10881
passed directly through factories.
10982

@@ -138,12 +111,24 @@ changes, outlined in this section.
138111
]);
139112
```
140113

114+
`Config` and `ConfigInterface` still exist, however, but primarily for the
115+
purposes of codifying and aggregating configuration to use.
116+
141117
- The ServiceManager is now immutable. Once configured, it cannot be altered.
142118
You need to create a new service manager if you need to change the
143119
configuration. This ensures safer and more aggressive caching. A new method,
144120
`withConfig()`, allows you to create a new instance that merges the provided
145121
configuration.
146122

123+
- `ConfigInterface` has two important changes:
124+
- `configureServiceManager()` now **must** return a service manager instance.
125+
Since the ServiceManager is now immutable, and the various methods for
126+
injecting services are gone, the expectation is that this method will pass
127+
configuration to `ServiceManager::withConfig()` and return the new instance.
128+
- A new method, `toArray()`, was added, to allow pulling the configuration in
129+
order to pass to a ServiceManager or plugin manager's constructor or
130+
`withConfig()` method.
131+
147132
- Interfaces for `FactoryInterface`, `DelegatorFactoryInterface` and
148133
`AbstractFactoryInterface` have changed. All are now directly invokable. This
149134
allows a number of performance optimization internally.
@@ -227,6 +212,9 @@ changes, outlined in this section.
227212
- `PluginManager` now enforces the need for the main service locator in its
228213
constructor. In v2.x, people often forgot to set the parent locator, which led
229214
to bugs in factories trying to fetch dependencies from the parent locator.
215+
Additionally, plugin managers now pull dependencies from the parent locator by
216+
default; if you need to pull a peer plugin, your factories will now need to
217+
pull the corresponding plugin manager first.
230218

231219
- It's so fast now that your app will fly!
232220

0 commit comments

Comments
 (0)