diff --git a/phpBB/composer.json b/phpBB/composer.json index 61fe8d7bad..3667791bbd 100644 --- a/phpBB/composer.json +++ b/phpBB/composer.json @@ -29,7 +29,7 @@ "ext-json": "*", "ext-mbstring": "*", "bantu/ini-get-wrapper": "~1.0", - "chita/topological_sort": "^2.0", + "chita/topological_sort": "^3.0", "composer/composer": "^2.0", "composer/installers": "^1.9", "composer/package-versions-deprecated": "^1.11", diff --git a/phpBB/composer.lock b/phpBB/composer.lock index 282220cf23..739d9f2f7e 100644 --- a/phpBB/composer.lock +++ b/phpBB/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "28a6c105dc6e78c65f88c1926eb8b1b7", + "content-hash": "5039b83cb8ee1def8a7f60edcf6b6890", "packages": [ { "name": "bantu/ini-get-wrapper", @@ -42,16 +42,16 @@ }, { "name": "chita/topological_sort", - "version": "v2.0.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/CHItA/TopologicalSort.git", - "reference": "34ed1f8459b597ec49bf6dd04a6f837691bb2d5d" + "reference": "9e0401c712d0c7cf012f264cc105669844d2479e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CHItA/TopologicalSort/zipball/34ed1f8459b597ec49bf6dd04a6f837691bb2d5d", - "reference": "34ed1f8459b597ec49bf6dd04a6f837691bb2d5d", + "url": "https://api.github.com/repos/CHItA/TopologicalSort/zipball/9e0401c712d0c7cf012f264cc105669844d2479e", + "reference": "9e0401c712d0c7cf012f264cc105669844d2479e", "shasum": "" }, "require": { @@ -61,6 +61,11 @@ "phpunit/phpunit": "^7.0" }, "type": "library", + "autoload": { + "psr-4": { + "CHItA\\TopologicalSort\\": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -74,9 +79,9 @@ "description": "Topological sort function", "support": { "issues": "https://github.com/CHItA/TopologicalSort/issues", - "source": "https://github.com/CHItA/TopologicalSort/tree/v2.0.1" + "source": "https://github.com/CHItA/TopologicalSort/tree/v3.0.1" }, - "time": "2021-01-03T12:12:53+00:00" + "time": "2021-01-04T21:31:59+00:00" }, { "name": "composer/ca-bundle", diff --git a/phpBB/phpbb/db/migration/schema_generator.php b/phpBB/phpbb/db/migration/schema_generator.php index 6db12d4b69..dfbbf3ccbb 100644 --- a/phpBB/phpbb/db/migration/schema_generator.php +++ b/phpBB/phpbb/db/migration/schema_generator.php @@ -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) {