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

Commit e455f1c

Browse files
committed
Merge branch 'hotfix/149' into release-2.7
Close #158 Close #149 Close #148
2 parents d374f7c + 98089e8 commit e455f1c

9 files changed

+235
-364
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ language: php
44

55
branches:
66
except:
7-
- /^release-.*$/
7+
- /^release-\d+\.\d+\.\d+.*$/
88
- /^ghgfk-.*$/
99

1010
cache:

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,37 @@
22

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

5+
## 2.7.9 - TBD
6+
7+
### Added
8+
9+
- [#149](https://github.com/zendframework/zend-mvc/pull/149) and
10+
[#158](https://github.com/zendframework/zend-mvc/pull/158) add a dependency
11+
on zendframework/zend-servicemanager-di in order to provide both backwards and
12+
forwards compatibility for the DI/ServiceManager integration.
13+
14+
### Deprecated
15+
16+
- [#158](https://github.com/zendframework/zend-mvc/pull/158) deprecates each of
17+
the following classes, which now have equivalents in the
18+
zend-servicemanager-di package (which is required by zend-mvc v2, but optional
19+
starting with zend-mvc v3):
20+
- `Zend\Mvc\Service\DiAbstractServiceFactoryFactory`
21+
- `Zend\Mvc\Service\DiFactory`
22+
- `Zend\Mvc\Service\DiServiceInitializerFactory`
23+
- `Zend\Mvc\Service\DiStrictAbstractServiceFactory`
24+
- `Zend\Mvc\Service\DiStrictAbstractServiceFactoryFactory`
25+
26+
### Removed
27+
28+
- Nothing.
29+
30+
### Fixed
31+
32+
- [#149](https://github.com/zendframework/zend-mvc/pull/149) and
33+
[#158](https://github.com/zendframework/zend-mvc/pull/158) fix an "undefined
34+
variable" issue with `Zend\Mvc\Service\DiAbstractServiceFactoryFactory`.
35+
536
## 2.7.8 - 2016-05-31
637

738
### Added

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"php": "^5.5 || ^7.0",
1717
"zendframework/zend-eventmanager": "^2.6.2 || ^3.0",
1818
"zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3",
19+
"zendframework/zend-servicemanager-di": "^1.0.1",
1920
"zendframework/zend-hydrator": "^1.1 || ^2.1",
2021
"zendframework/zend-form": "^2.7",
2122
"zendframework/zend-stdlib": "^2.7.5 || ^3.0",

composer.lock

Lines changed: 153 additions & 102 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Service/DiAbstractServiceFactoryFactory.php

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,17 @@
99

1010
namespace Zend\Mvc\Service;
1111

12-
use Interop\Container\ContainerInterface;
13-
use Zend\ServiceManager\Di\DiAbstractServiceFactory;
14-
use Zend\ServiceManager\FactoryInterface;
15-
use Zend\ServiceManager\ServiceLocatorInterface;
16-
use Zend\ServiceManager\ServiceManager;
12+
use Zend\ServiceManager\Di\DiAbstractServiceFactoryFactory as OriginalFactory;
1713

18-
class DiAbstractServiceFactoryFactory implements FactoryInterface
14+
/**
15+
* Since 2.7.9, this class now extends the version defined in zend-servicemanager-di,
16+
* ensuring backwards compatibility with zend-servicemanger v2 and forwards
17+
* compatibility with zend-servicemanager v3.
18+
*
19+
* @deprecated Since 2.7.9. The factory is now defined in zend-servicemanager-di,
20+
* and removed in 3.0.0. Use Zend\ServiceManager\Di\DiAbstractServiceFactoryFactory
21+
* from zend-servicemanager-di instead if you rely on this feature.
22+
*/
23+
class DiAbstractServiceFactoryFactory extends OriginalFactory
1924
{
20-
/**
21-
* Class responsible for instantiating a DiAbstractServiceFactory
22-
*
23-
* @param ContainerInterface $container
24-
* @param string $name
25-
* @param null|array $options
26-
* @return DiAbstractServiceFactory
27-
*/
28-
public function __invoke(ContainerInterface $container, $name, array $options = null)
29-
{
30-
$factory = new DiAbstractServiceFactory($container->get('Di'), DiAbstractServiceFactory::USE_SL_BEFORE_DI);
31-
32-
if ($serviceLocator instanceof ServiceManager) {
33-
$serviceLocator->addAbstractFactory($factory, false);
34-
}
35-
36-
return $factory;
37-
}
38-
39-
/**
40-
* Create and return DiAbstractServiceFactory instance
41-
*
42-
* For use with zend-servicemanager v2; proxies to __invoke().
43-
*
44-
* @param ServiceLocatorInterface $container
45-
* @return DiAbstractServiceFactory
46-
*/
47-
public function createService(ServiceLocatorInterface $container)
48-
{
49-
return $this($container, DiAbstractServiceFactory::class);
50-
}
5125
}

0 commit comments

Comments
 (0)