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

Commit 9c585ea

Browse files
committed
Merge branch 'hotfix/136' into develop
Forward port #136 Conflicts: CHANGELOG.md
2 parents c8bdc00 + 4404d4e commit 9c585ea

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ All notable changes to this project will be documented in this file, in reverse
2020

2121
- Nothing.
2222

23-
## 3.1.1 - TBD
23+
## 3.1.1 - 2016-07-15
2424

2525
### Added
2626

@@ -36,7 +36,10 @@ All notable changes to this project will be documented in this file, in reverse
3636

3737
### Fixed
3838

39-
- Nothing.
39+
- [#136](https://github.com/zendframework/zend-servicemanager/pull/136) removes
40+
several imports to classes in subnamespaces within the `ServiceManager`
41+
classfile, removing potential name resolution conflicts that occurred in edge
42+
cases when testing.
4043

4144
## 3.1.0 - 2016-06-01
4245

src/ServiceManager.php

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
use Zend\ServiceManager\Exception\InvalidArgumentException;
2323
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
2424
use Zend\ServiceManager\Exception\ServiceNotFoundException;
25-
use Zend\ServiceManager\Factory\AbstractFactoryInterface;
26-
use Zend\ServiceManager\Factory\DelegatorFactoryInterface;
27-
use Zend\ServiceManager\Initializer\InitializerInterface;
2825

2926
/**
3027
* Service Manager.
@@ -44,7 +41,7 @@
4441
class ServiceManager implements ServiceLocatorInterface
4542
{
4643
/**
47-
* @var AbstractFactoryInterface[]
44+
* @var Factory\AbstractFactoryInterface[]
4845
*/
4946
protected $abstractFactories = [];
5047

@@ -70,7 +67,7 @@ class ServiceManager implements ServiceLocatorInterface
7067
protected $creationContext;
7168

7269
/**
73-
* @var string[][]|DelegatorFactoryInterface[][]
70+
* @var string[][]|Factory\DelegatorFactoryInterface[][]
7471
*/
7572
protected $delegators = [];
7673

@@ -82,7 +79,7 @@ class ServiceManager implements ServiceLocatorInterface
8279
protected $factories = [];
8380

8481
/**
85-
* @var InitializerInterface[]
82+
* @var Initializer\InitializerInterface[]
8683
*/
8784
protected $initializers = [];
8885

@@ -475,7 +472,7 @@ public function addDelegator($name, $factory)
475472
/**
476473
* Add an initializer.
477474
*
478-
* @param string|callable|InitializerInterface $initializer
475+
* @param string|callable|Initializer\InitializerInterface $initializer
479476
*/
480477
public function addInitializer($initializer)
481478
{
@@ -507,7 +504,7 @@ public function setShared($name, $flag)
507504
/**
508505
* Instantiate abstract factories for to avoid checks during service construction.
509506
*
510-
* @param string[]|AbstractFactoryInterface[] $abstractFactories
507+
* @param string[]|Factory\AbstractFactoryInterface[] $abstractFactories
511508
*
512509
* @return void
513510
*/
@@ -518,7 +515,7 @@ private function resolveAbstractFactories(array $abstractFactories)
518515
$abstractFactory = new $abstractFactory();
519516
}
520517

521-
if ($abstractFactory instanceof AbstractFactoryInterface) {
518+
if ($abstractFactory instanceof Factory\AbstractFactoryInterface) {
522519
$this->abstractFactories[] = $abstractFactory;
523520
continue;
524521
}
@@ -553,7 +550,7 @@ private function resolveAbstractFactories(array $abstractFactories)
553550
/**
554551
* Instantiate initializers for to avoid checks during service construction.
555552
*
556-
* @param string[]|callable[]|InitializerInterface[] $initializers
553+
* @param string[]|callable[]|Initializer\InitializerInterface[] $initializers
557554
*
558555
* @return void
559556
*/
@@ -578,7 +575,7 @@ private function resolveInitializers(array $initializers)
578575
'which does not exist; please provide a valid function name or class ' .
579576
'name resolving to an implementation of %s',
580577
$initializer,
581-
InitializerInterface::class
578+
Initializer\InitializerInterface::class
582579
)
583580
);
584581
}
@@ -589,7 +586,7 @@ private function resolveInitializers(array $initializers)
589586
'An invalid initializer was registered. Expected a callable, or an instance of ' .
590587
'(or string class name resolving to) "%s", ' .
591588
'but "%s" was received',
592-
InitializerInterface::class,
589+
Initializer\InitializerInterface::class,
593590
(is_object($initializer) ? get_class($initializer) : gettype($initializer))
594591
)
595592
);

0 commit comments

Comments
 (0)