[DDC-2664] Document new Proxy factory flags usage as of DCOM-210 Created: 09/Sep/13  Updated: 09/Sep/13  Resolved: 09/Sep/13

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: Documentation
Affects Version/s: 2.4
Fix Version/s: 2.4.1
Security Level: All

Type: Documentation Priority: Major
Reporter: Marco Pivetta Assignee: Marco Pivetta
Resolution: Fixed Votes: 1
Labels: proxy


 Description   

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.



 Comments   
Comment by Matthieu Napoli [ 09/Sep/13 ]

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.

Comment by Matthieu Napoli [ 09/Sep/13 ]

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

Comment by Matthieu Napoli [ 09/Sep/13 ]

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

Comment by Doctrine Bot [ 09/Sep/13 ]

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

Comment by Doctrine Bot [ 09/Sep/13 ]

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

Comment by Marco Pivetta [ 09/Sep/13 ]

Merged: https://github.com/doctrine/doctrine2/commit/4d51a0290bfbe5e038d0bec5224119eba0de6413

Generated at Mon Sep 01 07:56:44 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.