1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16668] Use topological sort as a Trait

PHPBB3-16668
This commit is contained in:
Máté Bartus
2021-01-04 22:36:55 +01:00
parent ea12db9bb4
commit 32a19c3306
3 changed files with 17 additions and 11 deletions

View File

@@ -20,13 +20,15 @@ use phpbb\db\driver\driver_interface;
use phpbb\db\migrator;
use phpbb\db\tools\tools_interface;
use UnexpectedValueException;
use function CHItA\TopologicalSort\topologicalSort;
use CHItA\TopologicalSort\TopologicalSort;
/**
* The schema generator generates the schema based on the existing migrations
*/
class schema_generator
{
use TopologicalSort;
/** @var config */
protected $config;
@@ -116,8 +118,7 @@ class schema_generator
try
{
require_once __DIR__ . '/../../../vendor/chita/topological_sort/src/TopologicalSort.php';
topologicalSort($migrations, $edges, true, $apply_for_each, $filter);
$this->topologicalSort($migrations, $edges, true, $apply_for_each, $filter);
}
catch (LogicException $e)
{