#1688: RecursiveDirectoryIterator is OS-Specific - Causes Migrations to be
Performed Out of Order
-------------------------+--------------------------------------------------
Reporter: deefour | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone: 1.1.0
Component: Migrations | Version: 1.1-DEV
Resolution: | Keywords:
Has_test: 0 | Mystatus: Pending Core Response
Has_patch: 1 |
-------------------------+--------------------------------------------------
Comment (by anj):
Another solution:
Doctrine/Migration.php
Line about: 115
{{{
foreach ((array) $directory as $dir) {
$it = new RecursiveIteratorIterator(new
RecursiveDirectoryIterator($dir),
RecursiveIteratorIterator::LEAVES_ONLY);
// sort files by filename
$files = array();
foreach ($it as $file) {
$info = pathinfo($file->getFileName());
if (isset($info['extension']) && $info['extension'] ==
'php') {
$files[$info['filename']] = $file;
}
}
ksort($files);
foreach ($files as $file) {
$info = pathinfo($file->getFileName());
if (isset($info['extension']) && $info['extension'] ==
'php') {
require_once($file->getPathName());
$array = array_diff(get_declared_classes(), $classes);
$className = end($array);
if ($className) {
$this->loadMigrationClass($className,
$file->getPathName());
}
}
}
}
}}}
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1688#comment:4>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---