From 0cc61b05a49696f580d4f6e22234e196c9845575 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Sat, 26 Mar 2022 19:20:48 +0100 Subject: [PATCH 1/2] update gacela 0.15 --- composer.json | 6 +++--- composer.lock | 59 ++++++++++++++++++++++++++------------------------- 2 files changed, 33 insertions(+), 32 deletions(-) diff --git a/composer.json b/composer.json index be6e3f99..261551d6 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "require": { "ext-json": "*", "php": ">=8.0", - "gacela-project/gacela": "^0.14", + "gacela-project/gacela": "^0.15", "symfony/console": "^5.4", "phpunit/php-timer": "^5.0" }, @@ -23,8 +23,8 @@ "phpunit/phpunit": "^9.5", "vimeo/psalm": "^4.22", "symfony/var-dumper": "^5.4", - "friendsofphp/php-cs-fixer": "^3.7", - "phpmetrics/phpmetrics": "^2.7", + "friendsofphp/php-cs-fixer": "^3.8", + "phpmetrics/phpmetrics": "^2.8", "phpbench/phpbench": "^1.2" }, "autoload": { diff --git a/composer.lock b/composer.lock index 07cc3bc7..c8a83ce4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7df9ade1ba1dcf1c8c79e89e1ef6f54d", + "content-hash": "6994a3c63e5482e0e934cd640e40ea94", "packages": [ { "name": "gacela-project/gacela", - "version": "0.14.0", + "version": "0.15.0", "source": { "type": "git", "url": "https://github.com/gacela-project/gacela.git", - "reference": "8da83656d93096c67674ea7ab96fe32abf712540" + "reference": "4247559443b41f2c5b332b28c95ce8a624f4889a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/gacela-project/gacela/zipball/8da83656d93096c67674ea7ab96fe32abf712540", - "reference": "8da83656d93096c67674ea7ab96fe32abf712540", + "url": "https://api.github.com/repos/gacela-project/gacela/zipball/4247559443b41f2c5b332b28c95ce8a624f4889a", + "reference": "4247559443b41f2c5b332b28c95ce8a624f4889a", "shasum": "" }, "require": { @@ -26,10 +26,10 @@ "symfony/console": "^5.4" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.7", + "friendsofphp/php-cs-fixer": "^3.8", "phpbench/phpbench": "^1.2", - "phpmetrics/phpmetrics": "^2.7", - "phpstan/phpstan": "^1.4", + "phpmetrics/phpmetrics": "^2.8", + "phpstan/phpstan": "^1.5", "phpunit/phpunit": "^9.5", "symfony/var-dumper": "^5.4", "vimeo/psalm": "^4.22" @@ -70,9 +70,9 @@ ], "support": { "issues": "https://github.com/gacela-project/gacela/issues", - "source": "https://github.com/gacela-project/gacela/tree/0.14.0" + "source": "https://github.com/gacela-project/gacela/tree/0.15.0" }, - "time": "2022-03-14T18:10:11+00:00" + "time": "2022-03-26T17:19:41+00:00" }, { "name": "phpunit/php-timer", @@ -1322,16 +1322,16 @@ }, { "name": "composer/semver", - "version": "3.3.0", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "f79c90ad4e9b41ac4dfc5d77bf398cf61fbd718b" + "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/f79c90ad4e9b41ac4dfc5d77bf398cf61fbd718b", - "reference": "f79c90ad4e9b41ac4dfc5d77bf398cf61fbd718b", + "url": "https://api.github.com/repos/composer/semver/zipball/5d8e574bb0e69188786b8ef77d43341222a41a71", + "reference": "5d8e574bb0e69188786b8ef77d43341222a41a71", "shasum": "" }, "require": { @@ -1383,7 +1383,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.0" + "source": "https://github.com/composer/semver/tree/3.3.1" }, "funding": [ { @@ -1399,7 +1399,7 @@ "type": "tidelift" } ], - "time": "2022-03-15T08:35:57+00:00" + "time": "2022-03-16T11:22:07+00:00" }, { "name": "composer/xdebug-handler", @@ -1825,16 +1825,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.7.0", + "version": "v3.8.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "7705d5a985132a40282d18a176eb9a4a0497747c" + "reference": "cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/7705d5a985132a40282d18a176eb9a4a0497747c", - "reference": "7705d5a985132a40282d18a176eb9a4a0497747c", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3", + "reference": "cbad1115aac4b5c3c5540e7210d3c9fba2f81fa3", "shasum": "" }, "require": { @@ -1902,7 +1902,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.7.0" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.8.0" }, "funding": [ { @@ -1910,7 +1910,7 @@ "type": "github" } ], - "time": "2022-03-07T16:59:59+00:00" + "time": "2022-03-18T17:20:59+00:00" }, { "name": "myclabs/deep-copy", @@ -2646,16 +2646,16 @@ }, { "name": "phpmetrics/phpmetrics", - "version": "v2.7.4", + "version": "v2.8.1", "source": { "type": "git", "url": "https://github.com/phpmetrics/PhpMetrics.git", - "reference": "e6a7aee0e0948e363eb78ce9d58573cd5af2cdec" + "reference": "e279f7317390f642339941b693359e9a181817a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpmetrics/PhpMetrics/zipball/e6a7aee0e0948e363eb78ce9d58573cd5af2cdec", - "reference": "e6a7aee0e0948e363eb78ce9d58573cd5af2cdec", + "url": "https://api.github.com/repos/phpmetrics/PhpMetrics/zipball/e279f7317390f642339941b693359e9a181817a7", + "reference": "e279f7317390f642339941b693359e9a181817a7", "shasum": "" }, "require": { @@ -2671,7 +2671,8 @@ "require-dev": { "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14", "sebastian/comparator": ">=1.2.3", - "squizlabs/php_codesniffer": "^3.5" + "squizlabs/php_codesniffer": "^3.5", + "symfony/dom-crawler": "^3.0 || ^4.0 || ^5.0" }, "bin": [ "bin/phpmetrics" @@ -2707,9 +2708,9 @@ ], "support": { "issues": "https://github.com/PhpMetrics/PhpMetrics/issues", - "source": "https://github.com/phpmetrics/PhpMetrics/tree/master" + "source": "https://github.com/phpmetrics/PhpMetrics/tree/v2.8.1" }, - "time": "2020-06-30T20:33:55+00:00" + "time": "2022-03-24T10:19:51+00:00" }, { "name": "phpspec/prophecy", From b91a91c071f01f6ccf1488110293684e1995127f Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Sat, 26 Mar 2022 19:29:20 +0100 Subject: [PATCH 2/2] Update phel using the new SetupGacela in bootstrap --- phel | 10 ++++++---- src/php/Phel.php | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/phel b/phel index dca696bb..f7e02576 100755 --- a/phel +++ b/phel @@ -5,6 +5,7 @@ declare(strict_types=1); use Gacela\Framework\Config\GacelaConfigBuilder\ConfigBuilder; use Gacela\Framework\Gacela; +use Gacela\Framework\Setup\SetupGacela; use Phel\Build\BuildFacade; use Phel\Formatter\FormatterFacade; use Phel\Interop\InteropFacade; @@ -20,11 +21,12 @@ if (!file_exists($autoloadPath)) { require $autoloadPath; -Gacela::bootstrap($projectRootDir, [ - 'config' => static function (ConfigBuilder $configBuilder): void { +$setupGacela = (new SetupGacela()) + ->setConfig(static function (ConfigBuilder $configBuilder): void { $configBuilder->add('phel-config.php', 'phel-config-local.php'); - }, -]); + }); + +Gacela::bootstrap($projectRootDir, $setupGacela); $interopFacade = new InteropFacade(); $formatterFacade = new FormatterFacade(); diff --git a/src/php/Phel.php b/src/php/Phel.php index 718255e0..d22054b2 100644 --- a/src/php/Phel.php +++ b/src/php/Phel.php @@ -6,6 +6,7 @@ use Gacela\Framework\Config\GacelaConfigBuilder\ConfigBuilder; use Gacela\Framework\Gacela; +use Gacela\Framework\Setup\SetupGacela; use Phel\Run\RunFacade; final class Phel @@ -15,11 +16,12 @@ final class Phel */ public static function run(string $projectRootDir, string $namespace): void { - Gacela::bootstrap($projectRootDir, [ - 'config' => static function (ConfigBuilder $configBuilder): void { + $setupGacela = (new SetupGacela()) + ->setConfig(static function (ConfigBuilder $configBuilder): void { $configBuilder->add('phel-config.php', 'phel-config-local.php'); - }, - ]); + }); + + Gacela::bootstrap($projectRootDir, $setupGacela); $runFacade = new RunFacade(); $runFacade->runNamespace($namespace);