diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-02-02 13:12:25 +0100 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-02-02 13:12:25 +0100 |
commit | 8e100f000ed5f67f329e597851d81652b4055a53 (patch) | |
tree | d49b061d43a0549904d75027a85a9e85faaa394d /phpBB/phpbb/db/migration | |
parent | 15e9367b5b9add3197ea13658499d60de14baa54 (diff) | |
parent | 27027deb9ce2076f64dbfdecba494efe1aa523dc (diff) | |
download | forums-8e100f000ed5f67f329e597851d81652b4055a53.tar forums-8e100f000ed5f67f329e597851d81652b4055a53.tar.gz forums-8e100f000ed5f67f329e597851d81652b4055a53.tar.bz2 forums-8e100f000ed5f67f329e597851d81652b4055a53.tar.xz forums-8e100f000ed5f67f329e597851d81652b4055a53.zip |
Merge pull request #4144 from VSEphpbb/ticket/14434
[ticket/14434] Allow non-migration files inside migrations folder (continued)
* VSEphpbb/ticket/14434:
[ticket/14434] Refactored to check migrations when setting them
[ticket/14434] Check migrations in the database updater task
[ticket/14434] Do not include non-migrations in CLI list
[ticket/14434] Remove redundant conditional
[ticket/14434] Fix whitespace mistakes
[ticket/14434] Remove recursion to simplify is_migration method
[ticket/14434] Extract migration check to a reusable method
[ticket/14434] Schema generator should ignore migration helpers
Diffstat (limited to 'phpBB/phpbb/db/migration')
-rw-r--r-- | phpBB/phpbb/db/migration/schema_generator.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/migration/schema_generator.php b/phpBB/phpbb/db/migration/schema_generator.php index 7003844bc4..c579e25824 100644 --- a/phpBB/phpbb/db/migration/schema_generator.php +++ b/phpBB/phpbb/db/migration/schema_generator.php @@ -77,8 +77,15 @@ class schema_generator $check_dependencies = true; while (!empty($migrations)) { - foreach ($migrations as $migration_class) + foreach ($migrations as $key => $migration_class) { + // Unset classes that are not a valid migration + if (\phpbb\db\migrator::is_migration($migration_class) === false) + { + unset($migrations[$key]); + continue; + } + $open_dependencies = array_diff($migration_class::depends_on(), $tree); if (empty($open_dependencies)) |