Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
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.
Thanks!