Deprecate Proxy auto-generation #5858

merged 9 commits into from Feb 26, 2014


None yet

4 participants


Supersedes #5198

Ping @blanchonvincent

@Ocramius Ocramius referenced this pull request Feb 23, 2014

ProxyManager bugfix #5198

@Maks3w Maks3w and 1 other commented on an outdated diff Feb 23, 2014
@@ -140,6 +140,42 @@ public function testRegistersAutoloader()
+ 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 Feb 23, 2014 Member

Should be this false?

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 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
Maks3w commented Feb 24, 2014

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


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


@Maks3w yes, verified. This PR can't have green on travis because the 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
@bakura10 bakura10 commented on the diff Feb 26, 2014
@@ -51,22 +55,7 @@ public function createService(ServiceLocatorInterface $serviceLocator)
$factoryConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy());
- if (isset($lazyServices['auto_generate_proxies'])) {
bakura10 Feb 26, 2014 Contributor

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

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

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…

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