mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-22 08:30:26 +01:00
[ticket/16668] Use topological sort as a Trait
PHPBB3-16668
This commit is contained in:
parent
ea12db9bb4
commit
32a19c3306
@ -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",
|
||||
|
19
phpBB/composer.lock
generated
19
phpBB/composer.lock
generated
@ -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",
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user