diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-09-17 21:24:33 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-09-17 21:24:33 +0200 |
commit | 7729ae4ad0bb09256709af37f2998a0949fbad01 (patch) | |
tree | fd0621cb973723308effe1baa075886cdc9f77b0 | |
parent | 910cd5edbe1e7732dd3d19903f4131172f1a0a21 (diff) | |
download | forums-7729ae4ad0bb09256709af37f2998a0949fbad01.tar forums-7729ae4ad0bb09256709af37f2998a0949fbad01.tar.gz forums-7729ae4ad0bb09256709af37f2998a0949fbad01.tar.bz2 forums-7729ae4ad0bb09256709af37f2998a0949fbad01.tar.xz forums-7729ae4ad0bb09256709af37f2998a0949fbad01.zip |
[ticket/13064] Revert "[ticket/13064] Validate the migrations provided to ..."
This reverts commit 46a9fe93d797bf7d56fd9b1e204f3c0459270122.
PHPBB3-13064
-rw-r--r-- | phpBB/phpbb/db/migrator.php | 19 | ||||
-rw-r--r-- | tests/dbal/migrator_test.php | 10 |
2 files changed, 2 insertions, 27 deletions
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 43393a8935..44bea3c5d2 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -129,28 +129,11 @@ class migrator * Sets the list of available migration class names to the given array. * * @param array $class_names An array of migration class names - * @param bool $check_fulfillable If TRUE (default), we will check - * if all of the migrations are fulfillable after loading them. - * If FALSE, we will not check. You SHOULD check at least once - * to prevent errors. * @return null - * @throws \phpbb\db\migration\exception */ - public function set_migrations($class_names, $check_fulfillable = true) + public function set_migrations($class_names) { $this->migrations = $class_names; - - if ($check_fulfillable) - { - foreach ($this->migrations as $name) - { - $unfulfillable = $this->unfulfillable($name); - if ($unfulfillable !== false) - { - throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $unfulfillable); - } - } - } } /** diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php index 05e60a510b..10a9444d63 100644 --- a/tests/dbal/migrator_test.php +++ b/tests/dbal/migrator_test.php @@ -118,17 +118,9 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case $this->db_tools->sql_column_remove('phpbb_config', 'extra_column'); } - /** - * @expectedException \phpbb\db\migration\exception - */ - public function test_unfulfillable_exception() - { - $this->migrator->set_migrations(array('phpbb_dbal_migration_unfulfillable', 'phpbb_dbal_migration_dummy')); - } - public function test_unfulfillable() { - $this->migrator->set_migrations(array('phpbb_dbal_migration_unfulfillable', 'phpbb_dbal_migration_dummy'), false); + $this->migrator->set_migrations(array('phpbb_dbal_migration_unfulfillable', 'phpbb_dbal_migration_dummy')); while (!$this->migrator->finished()) { |