From a58a5acc8763bfd217aca0156481d4eff68fb905 Mon Sep 17 00:00:00 2001 From: Markus Gerdes Date: Wed, 24 Jul 2024 13:28:13 +0200 Subject: [PATCH 1/2] fix: import the fractor configuration if found in fractor.php file Otherwise there was an error: ```FRACTOR: Fatal error: Uncaught TypeError: a9f\Fractor\Configuration\FractorConfigurationBuilder::__invoke(): Argument #1 ($containerConfigurator) must be of type Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator, a9f\Fractor\Configuration\FractorConfigurationBuilder given, called in /var/www/html/lifter/vendor/a9f/lifter/res/run_fractor.php on line 19 and defined in /var/www/html/lifter/vendor/a9f/fractor/src/Configuration/FractorConfigurationBuilder.php:49``` --- res/run_fractor.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/res/run_fractor.php b/res/run_fractor.php index e05981a..3950f1a 100644 --- a/res/run_fractor.php +++ b/res/run_fractor.php @@ -14,9 +14,7 @@ if (!is_string($fractorConfigFile)) { throw new \RuntimeException('No file passed in env variable FRACTOR_CONFIG_FILE', 1712507292); } - $fractorConfigClosure = (require $fractorConfigFile); - Assert::isCallable($fractorConfigClosure, 'FRACTOR_CONFIG_FILE did not yield a callable'); - $fractorConfigClosure($fractorConfig); + $fractorConfig->import($fractorConfigFile); $lifterConfigFile = getenv('LIFTER_CONFIG_FILE'); if (!is_string($lifterConfigFile)) { From 9c3cb387d758c782a4f3a204a0296194a91122ed Mon Sep 17 00:00:00 2001 From: Markus Gerdes <107911221+mgerdes-atl@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:05:23 +0100 Subject: [PATCH 2/2] Update composer.json adjust composer dependency to allow a9f/fractor version ^0.4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 33d5173..f9ac32e 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ ], "require": { "php": "^8.2", - "a9f/fractor": "^0.3", + "a9f/fractor": "^0.3 || ^0.4", "rector/rector": "^1.0", "symfony/config": "^6.4 || ^7.0", "symfony/console": "^6.4 || ^7.0",