Deprecate Proxy auto-generation #5858

Merged
merged 9 commits into from Feb 26, 2014

Projects

None yet

4 participants

@Ocramius
Member

Supersedes #5198

Ping @blanchonvincent

@Ocramius Ocramius referenced this pull request Feb 23, 2014
Closed

ProxyManager bugfix #5198

@Maks3w Maks3w and 1 other commented on an outdated diff Feb 23, 2014
...erviceManager/Proxy/LazyServiceFactoryFactoryTest.php
@@ -140,6 +140,42 @@ public function testRegistersAutoloader()
spl_autoload_unregister($proxyAutoloader);
}
+ public function testDontAutoGenerateProxyFiles()
+ {
+ $serviceManager = new ServiceManager();
+ $namespace = 'ZendTestProxy' . uniqid();
+
+ $serviceManager->setService(
+ 'Config',
+ array(
+ 'lazy_services' => array(
+ 'class_map' => array('foo' => __CLASS__),
+ 'proxies_namespace' => $namespace,
+ 'write_proxy_files' => true,
+ 'auto_generate_proxies' => true,
Maks3w
Maks3w Feb 23, 2014 Member

Should be this false?

Ocramius
Ocramius Feb 23, 2014 Member

No, otherwise it would fallback to the eval() logic (and not write the file to disk). I probably need to fix the test method or see if it is not redundant

Ocramius
Ocramius Feb 23, 2014 Member

Yes, the test is redundant, as well as the config flag. Simply dropping them

@Maks3w Maks3w added this to the 2.3.0 milestone Feb 23, 2014
Member
Maks3w commented Feb 24, 2014

@Ocramius Please review the travis report. There is some problem with composer dependencies

Member

Saw that - cannot really fix as it seems, since it doesn't consider the dev branch of zf a 2.* (required by proxy-manager). I will diff the composer.json first

Member

@Maks3w yes, verified. This PR can't have green on travis because the packagist.org definitions still tell that the repository requires ocramius/proxy-manager:0.4.*.

This will get green once merged, the subtree split happened, and packagist updated its internal definitions

@Maks3w Maks3w merged commit b610d96 into zendframework:develop Feb 26, 2014

1 check failed

default The Travis CI build could not complete due to an error
Details
@bakura10 bakura10 commented on the diff Feb 26, 2014
...nd/ServiceManager/Proxy/LazyServiceFactoryFactory.php
@@ -51,22 +55,7 @@ public function createService(ServiceLocatorInterface $serviceLocator)
$factoryConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy());
}
- if (isset($lazyServices['auto_generate_proxies'])) {
bakura10
bakura10 Feb 26, 2014 Contributor

Some options seems to be gone. Can you update the doc ?

Ocramius
Ocramius Feb 26, 2014 Member

Doing that nao

@Ocramius Ocramius deleted the Ocramius:hotfix/proxy-auto-generation branch Feb 26, 2014
@Ocramius Ocramius referenced this pull request in zendframework/zf2-documentation Feb 26, 2014
Merged

Removing `auto_generate_proxies` from config example #1212

@gianarb gianarb pushed a commit to zendframework/zend-servicemanager that referenced this pull request May 15, 2015
@Maks3w Maks3w Merge pull request zendframework/zendframework#5858 from Ocramius/hot…
…fix/proxy-auto-generation

Deprecate Proxy auto-generation. Close zendframework/zendframework#5198
1a30196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment