DDC-2664: Document new Proxy factory flags usage as of DCOM-210 #3401

Closed
doctrinebot opened this Issue Sep 9, 2013 · 7 comments

2 participants

@doctrinebot

Jira issue originally created by user @ocramius:

DCOM-210 introduced new proxy factory flags that can be used to manipulate how proxies are generated/loaded.

Documentation for those flags is currently missing.

@doctrinebot

Comment created by mnapoli:

Copy of my comment on related ticket:

Actually found it, it's not documented and not really foolproof:

$doctrineConfig = new Doctrine\ORM\Configuration();
$doctrineConfig->setAutoGenerateProxyClasses(AbstractProxyFactory::AUTOGENERATE_EVAL);

However* it will not work if the proxy autoloader is registered (which was necessary before, so if you forget to remove it, you'll get confusing errors that the proxy file can't be found), *and you need to set a proxy dir else there's an exception:

exception 'Doctrine\Common\Proxy\Exception\InvalidArgumentException' with message 'You must configure a proxy directory. See docs for details'
$doctrineConfig->setProxyDir('/tmp/proxies');

The docs needs updating, both in code and on the website. If I find some time today I'll try to do it.

@doctrinebot

Comment created by mnapoli:

PR for doc update (not phpdoc): #782

@doctrinebot

Comment created by mnapoli:

PR for phpdoc update: #783

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-783] was closed:
#783

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-782] was closed:
#782

@doctrinebot

Comment created by @ocramius:

Merged: 4d51a02

@doctrinebot

Issue was closed with resolution "Fixed"

@Ocramius Ocramius was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.4.1 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment