Doctrine 1
  1. Doctrine 1
  2. DC-91

Adjust file structure to make Doctrine more compatible with existing autoloaders via svn:externals

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-ALPHA2
    • Fix Version/s: 1.2.0-ALPHA3
    • Component/s: None
    • Labels:
      None

      Description

      The Doctrine.php class makes it very hard to pull in Doctrine via svn:externals in combination with an existing autoloader. The problem is the Doctrine.php this means you usually end up with something like Doctrine/Doctrine.php locally, which means you need to use the Doctrine autoloader or add another include path.

      One solution is to simply do two externals:
      http://svn.doctrine-project.org/branches/1.2/lib/
      http://svn.doctrine-project.org/branches/1.2/lib/Doctrine

      And then including Doctrine.php manually.
      The issue is of course that I cannot just do an external on the file because those only work on local repos. Svn also does not support sparse checkouts for externals.

      I see 2 solutions:
      1) Simple solution would be to provide a directory with just Doctrine.php via a separate url
      2) Move the code in Doctrine.php to Doctrine/Core.php and just extend that class from Doctrine.php for BC

        Activity

        Hide
        Lukas Kahwe added a comment -

        It might make sense to document inside the ticket what approach you took ..

        Show
        Lukas Kahwe added a comment - It might make sense to document inside the ticket what approach you took ..
        Hide
        Lukas Kahwe added a comment -

        It seems you forgot to set the ticket ID in your commits. If the following change is the reason for this ticket being marked as "fixed", then it didnt really solve my issue. the issue is simply one of not being able to checkout Doctrine in a way that is compatible with the pear naming convention without having to add Doctrine to the include path. the solution is to either kill Doctrine.php or to at least provide Doctrine.php as an external without any addition subdirectories .. maybe put Doctrine.php into Doctrine/Doctrine/Doctrine.php via an inter repository file only external.

          1. Added Doctrine::setPath()
            128
            129 Now you can specify the path to your Doctrine libraries if Doctrine.php is
            130 outside of the location of your libraries.
            131
            132 So if `Doctrine.php` is located at `/path/to/Doctrine.php` and the actual
            133 libraries are at `/path/to/the/doctrine/libs` you would need to do the
            134 following.
            135
            136 [php]
            137 Doctrine::setPath('/path/to/the/doctrine/libs');
        Show
        Lukas Kahwe added a comment - It seems you forgot to set the ticket ID in your commits. If the following change is the reason for this ticket being marked as "fixed", then it didnt really solve my issue. the issue is simply one of not being able to checkout Doctrine in a way that is compatible with the pear naming convention without having to add Doctrine to the include path. the solution is to either kill Doctrine.php or to at least provide Doctrine.php as an external without any addition subdirectories .. maybe put Doctrine.php into Doctrine/Doctrine/Doctrine.php via an inter repository file only external. Added Doctrine::setPath() 128 129 Now you can specify the path to your Doctrine libraries if Doctrine.php is 130 outside of the location of your libraries. 131 132 So if `Doctrine.php` is located at `/path/to/Doctrine.php` and the actual 133 libraries are at `/path/to/the/doctrine/libs` you would need to do the 134 following. 135 136 [php] 137 Doctrine::setPath('/path/to/the/doctrine/libs');

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Lukas Kahwe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: