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

Closed
opened 2026-01-22 14:18:21 +01:00 by admin · 7 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 9, 2013).

Originally assigned to: @Ocramius on GitHub.

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.

Originally created by @doctrinebot on GitHub (Sep 9, 2013). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @ocramius: [DCOM-210](http://www.doctrine-project.org/jira/browse/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.
admin closed this issue 2026-01-22 14:18:21 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 9, 2013):

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 commented on GitHub (Sep 9, 2013): 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.
Author
Owner

@doctrinebot commented on GitHub (Sep 9, 2013):

Comment created by mnapoli:

PR for doc update (not phpdoc): https://github.com/doctrine/doctrine2/pull/782

@doctrinebot commented on GitHub (Sep 9, 2013): Comment created by mnapoli: PR for doc update (not phpdoc): https://github.com/doctrine/doctrine2/pull/782
Author
Owner

@doctrinebot commented on GitHub (Sep 9, 2013):

Comment created by mnapoli:

PR for phpdoc update: https://github.com/doctrine/doctrine2/pull/783

@doctrinebot commented on GitHub (Sep 9, 2013): Comment created by mnapoli: PR for phpdoc update: https://github.com/doctrine/doctrine2/pull/783
Author
Owner

@doctrinebot commented on GitHub (Sep 9, 2013):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-783] was closed:
https://github.com/doctrine/doctrine2/pull/783

@doctrinebot commented on GitHub (Sep 9, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-783] was closed: https://github.com/doctrine/doctrine2/pull/783
Author
Owner

@doctrinebot commented on GitHub (Sep 9, 2013):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-782] was closed:
https://github.com/doctrine/doctrine2/pull/782

@doctrinebot commented on GitHub (Sep 9, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-782] was closed: https://github.com/doctrine/doctrine2/pull/782
Author
Owner

@doctrinebot commented on GitHub (Sep 9, 2013):

Comment created by @ocramius:

Merged: 4d51a0290b

@doctrinebot commented on GitHub (Sep 9, 2013): Comment created by @ocramius: Merged: https://github.com/doctrine/doctrine2/commit/4d51a0290bfbe5e038d0bec5224119eba0de6413
Author
Owner

@doctrinebot commented on GitHub (Sep 9, 2013):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Sep 9, 2013): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3341