#1043: [PATCH] doctrine:build-model under Windows is broken
------------------------------+---------------------------------------------
Reporter: bschussek | Owner: jwage
Type: defect | Status: new
Priority: critical | Milestone: 0.11.2
Component: sfDoctrinePlugin | Version: 0.11
Keywords: |
------------------------------+---------------------------------------------
The task doctrine:build-model under Window does not work due to bad
handling of directory separators.
The erroneus code can be found in
sfDoctrinePlugin/lib/task/sfDoctrineBuildModelTask.class.php on line 69:
{{{
{
$plugin = str_replace(sfConfig::get('sf_plugins_dir') . '/', '',
$schema);
$e = explode('/', $plugin);
$plugin = $e[0];
$name = basename($schema);
}}}
The task will work if this code is changed to:
{{{
{
$schema = str_replace('/', DIRECTORY_SEPARATOR, $schema);
$plugin = str_replace(sfConfig::get('sf_plugins_dir') .
DIRECTORY_SEPARATOR, '', $schema);
$e = explode(DIRECTORY_SEPARATOR, $plugin);
$plugin = $e[0];
$name = basename($schema);
}}}
--
Ticket URL: <
http://trac.phpdoctrine.org/ticket/1043>
Doctrine <
http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper