mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14434] Schema generator should ignore migration helpers
PHPBB3-14434
This commit is contained in:
parent
ad914a6880
commit
7d2a58e271
1 changed files with 11 additions and 1 deletions
|
@ -77,8 +77,18 @@ class schema_generator
|
|||
$check_dependencies = true;
|
||||
while (!empty($migrations))
|
||||
{
|
||||
foreach ($migrations as $migration_class)
|
||||
foreach ($migrations as $key => $migration_class)
|
||||
{
|
||||
if (class_exists($migration_class))
|
||||
{
|
||||
$reflector = new \ReflectionClass($migration_class);
|
||||
if (!$reflector->implementsInterface('\phpbb\db\migration\migration_interface') || !$reflector->isInstantiable())
|
||||
{
|
||||
unset($migrations[$key]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$open_dependencies = array_diff($migration_class::depends_on(), $tree);
|
||||
|
||||
if (empty($open_dependencies))
|
||||
|
|
Loading…
Add table
Reference in a new issue