aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2016-01-26 11:45:06 -0800
committerMatt Friedman <maf675@gmail.com>2016-01-26 11:45:06 -0800
commit7d2a58e27100e5c776b44223e2cc6837c293db02 (patch)
treedf4be9357644e599f1671f580077bee8e6b18cc7 /phpBB/phpbb/db/migration
parentad914a68807e3bf3335614a09414635eb932f147 (diff)
downloadforums-7d2a58e27100e5c776b44223e2cc6837c293db02.tar
forums-7d2a58e27100e5c776b44223e2cc6837c293db02.tar.gz
forums-7d2a58e27100e5c776b44223e2cc6837c293db02.tar.bz2
forums-7d2a58e27100e5c776b44223e2cc6837c293db02.tar.xz
forums-7d2a58e27100e5c776b44223e2cc6837c293db02.zip
[ticket/14434] Schema generator should ignore migration helpers
PHPBB3-14434
Diffstat (limited to 'phpBB/phpbb/db/migration')
-rw-r--r--phpBB/phpbb/db/migration/schema_generator.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/migration/schema_generator.php b/phpBB/phpbb/db/migration/schema_generator.php
index 7003844bc4..55ab4452ed 100644
--- a/phpBB/phpbb/db/migration/schema_generator.php
+++ b/phpBB/phpbb/db/migration/schema_generator.php
@@ -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))