Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2664

Document new Proxy factory flags usage as of DCOM-210

    Details

    • Type: Documentation Documentation
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4.1
    • Component/s: Documentation
    • Security Level: All
    • Labels:

      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.

        Activity

        Marco Pivetta created issue -
        Hide
        Matthieu Napoli added a comment -

        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.

        Show
        Matthieu Napoli added a comment - 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.
        Hide
        Matthieu Napoli added a comment -

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

        Show
        Matthieu Napoli added a comment - PR for doc update (not phpdoc): https://github.com/doctrine/doctrine2/pull/782
        Hide
        Matthieu Napoli added a comment -
        Show
        Matthieu Napoli added a comment - PR for phpdoc update: https://github.com/doctrine/doctrine2/pull/783
        Hide
        Doctrine Bot added a comment -

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

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-783] was closed: https://github.com/doctrine/doctrine2/pull/783
        Hide
        Doctrine Bot added a comment -

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

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-782] was closed: https://github.com/doctrine/doctrine2/pull/782
        Show
        Marco Pivetta added a comment - Merged: https://github.com/doctrine/doctrine2/commit/4d51a0290bfbe5e038d0bec5224119eba0de6413
        Marco Pivetta made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.4.1 [ 10528 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-2664, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Marco Pivetta
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: