Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1247

Implement AnnotationDriver::addExcludePath

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Git Master
    • Fix Version/s: 2.5
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None

      Description

      Hi,
      I've been having issues with AnnotationDriver crawling in my directories and loading files.
      I have a few classes that require specific libraries loaded, and I don't want the AnnotationDriver to load them.

      For example, I have my descendant of PHPUnit_Framework_TestCase in libs and the driver just dies, because PHPUnit is not loaded, and I don't want to load it, to be able to finish the process.

      Solution would be add method AnnotationDriver::addExcludePath, whose name speaks for itself

      Temporarily, I had to extend the AnnotationDriver and overload the crawling process, which is realy annoing, because I had to copy the whole method with all its exceptions and I would have to maintain it, till this will be in Doctrine. Can be viewed here https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Doctrine/Mapping/Driver/AnnotationDriver.php

      Thanks
      Filip

        Activity

        Filip Procházka created issue -
        Filip Procházka made changes -
        Field Original Value New Value
        Description Hi,
        I've been having issues with AnnotationDriver crawling in my directories and loading files.
        I have a few classes that require specific libraries loaded, and I don't want the AnnotationDriver to load them.

        For example, I have my descendant of PHPUnit_Framework_TestCase in libs and the driver just dies, because PHPUnit is not loaded, and I don't want to load it, to be able to finish the process.

        Solution would be add method {{AnnotationDriver::addExcludePath}}, whose name speaks for itself :)

        Temporarily, I had to extend the AnnotationDriver and overload the crawling process, which is realy annoing, because I had to copy the whole method with all its exceptions and I would have to maintain it, till this will be in Doctrine. Can be viewed here https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php

        Thanks
        Filip
        Hi,
        I've been having issues with AnnotationDriver crawling in my directories and loading files.
        I have a few classes that require specific libraries loaded, and I don't want the AnnotationDriver to load them.

        For example, I have my descendant of PHPUnit_Framework_TestCase in libs and the driver just dies, because PHPUnit is not loaded, and I don't want to load it, to be able to finish the process.

        Solution would be add method {{AnnotationDriver::addExcludePath}}, whose name speaks for itself :)

        Temporarily, I had to extend the AnnotationDriver and overload the crawling process, which is realy annoing, because I had to copy the whole method with all its exceptions and I would have to maintain it, till this will be in Doctrine. Can be viewed here https://github.com/Kdyby/Framework/blob/master/libs/Kdyby/Doctrine/Mapping/Driver/AnnotationDriver.php

        Thanks
        Filip
        Benjamin Eberlei made changes -
        Workflow jira [ 12784 ] jira-feedback [ 13943 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13943 ] jira-feedback2 [ 15807 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15807 ] jira-feedback3 [ 18063 ]
        Marco Pivetta made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.5 [ 10522 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Filip Procházka
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: