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

Commit d27e109

Browse files
committed
Merge branch 'feature/#103-allow-proxymanager-v2-installation' into develop
Close #103
2 parents 8129d6e + 9bb697b commit d27e109

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ matrix:
3535
- php: 7
3636
- php: hhvm
3737
allow_failures:
38-
- php: 7
3938
- php: hhvm
4039

4140
notifications:
@@ -48,7 +47,7 @@ before_install:
4847
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:^1.0 ; fi
4948

5049
install:
51-
- travis_retry composer install --no-interaction --ignore-platform-reqs
50+
- travis_retry composer install --no-interaction
5251

5352
script:
5453
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"container-interop/container-interop": "~1.0"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "~4.6",
22-
"ocramius/proxy-manager": "~1.0",
23-
"squizlabs/php_codesniffer": "^2.0@dev",
21+
"phpunit/phpunit": "^4.6 || ^5.2.10",
22+
"ocramius/proxy-manager": "^1.0 || ^2.0",
23+
"squizlabs/php_codesniffer": "^2.5.1",
2424
"phpbench/phpbench": "^0.10.0"
2525
},
2626
"suggest": {

src/ServiceManager.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
use Interop\Container\Exception\ContainerException;
1515
use ProxyManager\Configuration as ProxyConfiguration;
1616
use ProxyManager\Factory\LazyLoadingValueHolderFactory;
17+
use ProxyManager\FileLocator\FileLocator;
1718
use ProxyManager\GeneratorStrategy\EvaluatingGeneratorStrategy;
19+
use ProxyManager\GeneratorStrategy\FileWriterGeneratorStrategy;
1820
use Zend\ServiceManager\Exception\ContainerModificationsNotAllowedException;
1921
use Zend\ServiceManager\Exception\CyclicAliasException;
2022
use Zend\ServiceManager\Exception\InvalidArgumentException;
@@ -750,6 +752,10 @@ private function createLazyServiceDelegatorFactory()
750752

751753
if (! isset($this->lazyServices['write_proxy_files']) || ! $this->lazyServices['write_proxy_files']) {
752754
$factoryConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy());
755+
} else {
756+
$factoryConfig->setGeneratorStrategy(new FileWriterGeneratorStrategy(
757+
new FileLocator($factoryConfig->getProxiesTargetDir())
758+
));
753759
}
754760

755761
spl_autoload_register($factoryConfig->getProxyAutoloader());

0 commit comments

Comments
 (0)