mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
[ticket/14434] Schema generator should ignore migration helpers
PHPBB3-14434
This commit is contained in:
parent
ad914a6880
commit
7d2a58e271
@ -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…
x
Reference in New Issue
Block a user