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

Commit f27c1a5

Browse files
committed
Merge branch 'hotfix/152' into release-2.7
Close #152
2 parents ad01dbf + a638d22 commit f27c1a5

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ All notable changes to this project will be documented in this file, in reverse
2222
- `Zend\Mvc\Service\DiServiceInitializerFactory`
2323
- `Zend\Mvc\Service\DiStrictAbstractServiceFactory`
2424
- `Zend\Mvc\Service\DiStrictAbstractServiceFactoryFactory`
25+
- [#152](https://github.com/zendframework/zend-mvc/pull/152) formally marks the
26+
`ControllerLoaderFactory` as deprecated via annotation (though it has been
27+
noted as such in the documentation for several years). Use
28+
`Zend\Mvc\Service\ControllerManagerFactory` instead.
2529

2630
### Removed
2731

src/Service/ControllerLoaderFactory.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
use Zend\ServiceManager\FactoryInterface;
1414
use Zend\ServiceManager\ServiceLocatorInterface;
1515

16+
/**
17+
* @see \Zend\Mvc\Service\ControllerManagerFactory
18+
* @deprecated please use Zend\Mvc\Service\ControllerManagerFactory instead;
19+
* this class will be removed in release 3.0
20+
*/
1621
class ControllerLoaderFactory implements FactoryInterface
1722
{
1823
/**
@@ -33,8 +38,13 @@ class ControllerLoaderFactory implements FactoryInterface
3338
*/
3439
public function createService(ServiceLocatorInterface $serviceLocator)
3540
{
36-
$controllerLoader = new ControllerManager();
37-
$controllerLoader->setServiceLocator($serviceLocator);
41+
trigger_error(sprintf(
42+
'%s is deprecated; please use %s instead',
43+
__CLASS__,
44+
ControllerManagerFactory::class
45+
), E_USER_DEPRECATED);
46+
47+
$controllerLoader = new ControllerManager($serviceLocator);
3848
$controllerLoader->addPeeringServiceManager($serviceLocator);
3949

4050
$config = $serviceLocator->get('Config');

0 commit comments

Comments
 (0)