Doctrine 1
  1. Doctrine 1
  2. DC-274

Doctrine_Parser_Yml: hardcoded require calls for sfYaml

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-BETA3
    • Fix Version/s: 1.2.0-RC1
    • Component/s: None
    • Labels:
      None

      Description

      In Doctrine_Parser_Yml the requires calls to sfYaml are hardcoded:
      if ( ! class_exists('sfYaml', false)) {
      require_once dirname(_FILE_) . '/../../vendor/sfYaml/sfYaml.php';
      require_once dirname(_FILE_) . '/../../vendor/sfYaml/sfYamlDumper.php';
      require_once dirname(_FILE_) . '/../../vendor/sfYaml/sfYamlInline.php';
      require_once dirname(_FILE_) . '/../../vendor/sfYaml/sfYamlParser.php';
      }

      This causes issues when one has already included sfYaml elsewhere. Either one needs to include the code for sfYaml twice or one needs to always load sfYaml before Doctrine parses any yaml files.

      A better approach to handling the fact that sfYaml does not adhere to the standard naming convention is to do these require calls inside the autoloader, but only using "include" in order to allow a fallback autoloader to also be able to load the code.

        Activity

        Hide
        Jonathan H. Wage added a comment -

        Thanks!

        Show
        Jonathan H. Wage added a comment - Thanks!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: