Uploaded image for project: 'Doctrine Common'
  1. Doctrine Common
  2. DCOM-210

ProxyFactory: Modes for NEVER, FILE_NOT_EXISTS, ALWAYS

    Details

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

      Activity

      beberlei Benjamin Eberlei created issue -
      ocramius Marco Pivetta made changes -
      Field Original Value New Value
      Summary ProxyFactory: Modes für NEVER, FILE_NOT_EXISTS, ALWAYS einbauen ProxyFactory: Modes for NEVER, FILE_NOT_EXISTS, ALWAYS
      ocramius Marco Pivetta made changes -
      Project Doctrine 2 - ORM [ 10032 ] Doctrine Common [ 10043 ]
      Key DDC-2597 DCOM-210
      Security All [ 10000 ]
      Hide
      ocramius Marco Pivetta added a comment -
      Show
      ocramius Marco Pivetta added a comment - Implemented in https://github.com/doctrine/common/pull/291 - ( DCOM-209 )
      ocramius Marco Pivetta made changes -
      Status Open [ 1 ] Resolved [ 5 ]
      Fix Version/s 2.4 [ 10327 ]
      Resolution Fixed [ 1 ]
      Hide
      mnapoli Matthieu Napoli added a comment -

      Any docs?

      It seems that it can't be used with Doctrine\ORM\Configuration

      Show
      mnapoli Matthieu Napoli added a comment - Any docs? It seems that it can't be used with Doctrine\ORM\Configuration
      Hide
      ocramius Marco Pivetta added a comment -

      I think this should work in v2.4.0: see https://github.com/doctrine/doctrine2/blob/v2.4.0/lib/Doctrine/ORM/EntityManager.php#L163

      I'll open an issue to document these new flags

      Show
      ocramius Marco Pivetta added a comment - I think this should work in v2.4.0: see https://github.com/doctrine/doctrine2/blob/v2.4.0/lib/Doctrine/ORM/EntityManager.php#L163 I'll open an issue to document these new flags
      Hide
      ocramius Marco Pivetta added a comment -

      Created DDC-2664

      Show
      ocramius Marco Pivetta added a comment - Created DDC-2664
      Hide
      mnapoli Matthieu Napoli added a comment -

      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
      mnapoli Matthieu Napoli added a comment - 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
      mnapoli Matthieu Napoli added a comment -

      Woops, commented at the same time, will copy my comment to the other ticket for better tracking.

      Show
      mnapoli Matthieu Napoli added a comment - Woops, commented at the same time, will copy my comment to the other ticket for better tracking.
      Hide
      doctrinebot Doctrine Bot added a comment -

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

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

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

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

      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={expand=changesets[0:20].revisions[0:29],reviews, query=DCOM-210}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

        People

        • Assignee:
          beberlei Benjamin Eberlei
          Reporter:
          beberlei Benjamin Eberlei
        • Votes:
          0 Vote for this issue
          Watchers:
          4 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: