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

Commit 4367dc0

Browse files
committed
Add CHANGELOG for #275
1 parent bc72a30 commit 4367dc0

File tree

1 file changed

+42
-20
lines changed

1 file changed

+42
-20
lines changed

CHANGELOG.md

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,28 @@
22

33
All notable changes to this project will be documented in this file, in reverse chronological order by release.
44

5+
## 3.4.0 - TBD
6+
7+
### Added
8+
9+
- [#275](https://github.com/zendframework/zend-servicemanager/pull/275) Enables plugin managers to accept as a creation context PSR Containers not implementing Interop interface
10+
11+
### Changed
12+
13+
- Nothing.
14+
15+
### Deprecated
16+
17+
- Nothing.
18+
19+
### Removed
20+
21+
- Nothing.
22+
23+
### Fixed
24+
25+
- Nothing.
26+
527
## 3.3.2 - 2018-01-29
628

729
### Added
@@ -61,7 +83,7 @@ All notable changes to this project will be documented in this file, in reverse
6183
container-interop at a minimum version of 1.2.0, and adding a requirement on
6284
psr/container 1.0. `Zend\ServiceManager\ServiceLocatorInterface` now
6385
explicitly extends the `ContainerInterface` from both projects.
64-
86+
6587
Factory interfaces still typehint against the container-interop variant, as
6688
changing the typehint would break backwards compatibility. Users can
6789
duck-type most of these interfaces, however, by creating callables or
@@ -339,7 +361,7 @@ Documentation is now available at http://zend-servicemanager.rtfd.org
339361
(previously, it was the third).
340362

341363
Example:
342-
364+
343365
```php
344366
$sm = new \Zend\ServiceManager\ServiceManager([
345367
'factories' => [
@@ -348,7 +370,7 @@ Documentation is now available at http://zend-servicemanager.rtfd.org
348370
'MyClassC' => 'MyFactory' // This is equivalent as using ::class
349371
],
350372
]);
351-
373+
352374
$sm->get(MyClassA::class); // MyFactory will receive MyClassA::class as second parameter
353375
```
354376

@@ -367,7 +389,7 @@ Documentation is now available at http://zend-servicemanager.rtfd.org
367389
if ($instance instanceof \Zend\Validator\ValidatorInterface) {
368390
return;
369391
}
370-
392+
371393
throw new InvalidServiceException(sprintf(
372394
'Plugin manager "%s" expected an instance of type "%s", but "%s" was received',
373395
__CLASS__,
@@ -377,19 +399,19 @@ Documentation is now available at http://zend-servicemanager.rtfd.org
377399
}
378400
}
379401
```
380-
402+
381403
In version 3, this becomes:
382-
404+
383405
```php
384406
use Zend\ServiceManager\AbstractPluginManager;
385407
use Zend\Validator\ValidatorInterface;
386-
408+
387409
class MyPluginManager extends AbstractPluginManager
388410
{
389411
protected $instanceOf = ValidatorInterface::class;
390412
}
391413
```
392-
414+
393415
Of course, you can still override the `validate` method if your logic is more
394416
complex.
395417

@@ -433,17 +455,17 @@ changes, outlined in this section.
433455
service manager; you can pass the configuration array directly instead.
434456

435457
In version 2.x:
436-
458+
437459
```php
438460
$config = new \Zend\ServiceManager\Config([
439461
'factories' => [...]
440462
]);
441-
463+
442464
$sm = new \Zend\ServiceManager\ServiceManager($config);
443465
```
444-
466+
445467
In ZF 3.x:
446-
468+
447469
```php
448470
$sm = new \Zend\ServiceManager\ServiceManager([
449471
'factories' => [...]
@@ -472,7 +494,7 @@ changes, outlined in this section.
472494
argument if present.
473495

474496
For instance, here is a simple version 2.x factory:
475-
497+
476498
```php
477499
class MyFactory implements FactoryInterface
478500
{
@@ -482,9 +504,9 @@ changes, outlined in this section.
482504
}
483505
}
484506
```
485-
507+
486508
The equivalent version 3 factory:
487-
509+
488510
```php
489511
class MyFactory implements FactoryInterface
490512
{
@@ -514,23 +536,23 @@ changes, outlined in this section.
514536
through the interface.
515537

516538
In version 2.x, if a factory was set to a service name defined in a plugin manager:
517-
539+
518540
```php
519541
class MyFactory implements FactoryInterface
520542
{
521543
function createService(ServiceLocatorInterface $sl)
522544
{
523545
// $sl is actually a plugin manager
524-
546+
525547
$parentLocator = $sl->getServiceLocator();
526-
548+
527549
// ...
528550
}
529551
}
530552
```
531-
553+
532554
In version 3:
533-
555+
534556
```php
535557
class MyFactory implements FactoryInterface
536558
{

0 commit comments

Comments
 (0)