From 134482f6c2b1ba3adb2c4fe47259aefca02c7d01 Mon Sep 17 00:00:00 2001 From: Patrick Webster Date: Sun, 25 Apr 2021 15:22:42 -0500 Subject: [PATCH] [ticket/16767] Report missing migration instead of dependency If a migration has an unfulfillable dependency, the migration causing the dependency to be unfulfillable is now shown in the error message instead of just the dependency. PHPBB3-16767 --- phpBB/phpbb/db/migrator.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php index 4ae068acbd..edaeab0522 100644 --- a/phpBB/phpbb/db/migrator.php +++ b/phpBB/phpbb/db/migrator.php @@ -339,9 +339,10 @@ class migrator $depend = $this->get_valid_name($depend); // Test all possible namings before throwing exception - if ($this->unfulfillable($depend) !== false) + $missing = $this->unfulfillable($depend); + if ($missing !== false) { - throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $depend); + throw new \phpbb\db\migration\exception('MIGRATION_NOT_FULFILLABLE', $name, $missing); } if (!isset($this->migration_state[$depend]) ||