diff --git a/.ddev/config.yaml b/.ddev/config.yaml index 3273e5c9..a1401463 100644 --- a/.ddev/config.yaml +++ b/.ddev/config.yaml @@ -1,7 +1,7 @@ name: frontend-asset-handler type: php docroot: "" -php_version: "8.1" +php_version: "8.4" webserver_type: nginx-fpm router_http_port: "80" router_https_port: "443" diff --git a/.github/workflows/cgl.yaml b/.github/workflows/cgl.yaml index 5bf6a342..e23a68af 100644 --- a/.github/workflows/cgl.yaml +++ b/.github/workflows/cgl.yaml @@ -19,6 +19,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: + # @todo Use PHP 8.4 once PHP-CS-Fixer supports PHP 8.4 php-version: 8.3 tools: composer:v2, composer-require-checker, composer-unused, cs2pr coverage: none diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 599f19e1..f6a8f647 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["8.1", "8.2", "8.3"] + php-version: ["8.1", "8.2", "8.3", "8.4"] dependencies: ["locked", "highest", "lowest"] steps: - uses: actions/checkout@v4 @@ -51,7 +51,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: 8.4 tools: composer:v2 coverage: pcov diff --git a/composer.json b/composer.json index 7efd2e30..7ee8c069 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-filter": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/composer.lock b/composer.lock index bb482da3..d73fd3de 100644 --- a/composer.lock +++ b/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": "b4a2eadeb4d74ac577a490eb3f15993f", + "content-hash": "a98f325cd2d1c5385e932160c1ae07e1", "packages": [ { "name": "ergebnis/json", @@ -6534,7 +6534,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "ext-filter": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/rector.php b/rector.php index c2c301d9..af925415 100644 --- a/rector.php +++ b/rector.php @@ -22,8 +22,6 @@ */ use Rector\Config\RectorConfig; -use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; -use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector; use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; use Rector\Set\ValueObject\LevelSetList; @@ -34,8 +32,6 @@ ]); $rectorConfig->skip([ - AddLiteralSeparatorToNumberRector::class, - JsonThrowOnErrorRector::class, NullToStrictStringFuncCallArgRector::class => [ __DIR__.'/src/Command/FetchAssetsCommand.php', __DIR__.'/src/Command/InspectAssetsCommand.php', diff --git a/src/Command/ConfigAssetsCommand.php b/src/Command/ConfigAssetsCommand.php index 604c149c..3d01b78d 100644 --- a/src/Command/ConfigAssetsCommand.php +++ b/src/Command/ConfigAssetsCommand.php @@ -286,7 +286,7 @@ private function doWrite(Config\Config $config, string $path, mixed $newValue): */ private function buildAndValidatePath(array $assetDefinitions, string $path): string { - $pathSegments = str_getcsv($path, '/'); + $pathSegments = str_getcsv($path, '/', escape: '\\'); $strictPath = is_numeric($pathSegments[0]); if (!$strictPath) { diff --git a/src/Helper/ArrayHelper.php b/src/Helper/ArrayHelper.php index a55e22e8..d61ae8bd 100644 --- a/src/Helper/ArrayHelper.php +++ b/src/Helper/ArrayHelper.php @@ -98,7 +98,7 @@ public static function setArrayValueByPath(array $array, string $path, mixed $va $node = &$array; // Assure required structure in array - foreach (str_getcsv($path, '/') as $segment) { + foreach (str_getcsv($path, '/', escape: '\\') as $segment) { if (!isset($node[$segment])) { $node[$segment] = []; }