Skip to content

Commit b17c421

Browse files
chore: update to API Platform 4.1.18 + update all dependencies + upgrade to PHP 8.4 (#530)
1 parent 4d03ca0 commit b17c421

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1396
-850
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ jobs:
9494
-
9595
name: Run PHPStan
9696
run: docker compose exec -T php vendor/bin/phpstan --memory-limit=256M
97+
-
98+
name: Run Rector
99+
run: docker compose exec -T php vendor/bin/rector --dry-run
97100
-
98101
name: Check OpenAPI
99102
run: docker compose exec -T php bin/console api:openapi:export --yaml | docker run --rm -i -v $(pwd)/redocly.yaml:/spec/redocly.yaml redocly/cli lint /dev/stdin
@@ -207,34 +210,35 @@ jobs:
207210
recursive: true
208211

209212
# Lint API
210-
-
211-
name: PHP CS Fixer Cache
212-
uses: actions/cache@v4
213-
with:
214-
path: api/.php-cs-fixer.cache
215-
key: ${{ runner.OS }}-phpcsfixer-${{ github.sha }}
216-
restore-keys: |
217-
${{ runner.OS }}-phpcsfixer-
218-
-
219-
name: Get API changed files
220-
id: api-changed-files
221-
uses: tj-actions/changed-files@v46
222-
with:
223-
files: api/**/*.php
224-
-
225-
name: Get Extra Arguments for PHP-CS-Fixer
226-
id: phpcs-intersection
227-
run: |
228-
CHANGED_FILES=$(echo "${{ steps.api-changed-files.outputs.all_changed_and_modified_files }}" | tr ' ' '\n')
229-
if ! echo "${CHANGED_FILES}" | grep -qE "^api\/(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
230-
echo "PHPCS_EXTRA_ARGS<<EOF" >> $GITHUB_ENV
231-
echo "$EXTRA_ARGS" >> $GITHUB_ENV
232-
echo "EOF" >> $GITHUB_ENV
233-
-
234-
name: Lint API
235-
uses: docker://oskarstark/php-cs-fixer-ga
236-
with:
237-
args: --config=api/.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no ${{ env.PHPCS_EXTRA_ARGS }}"
213+
# todo Waiting for PHP CS Fixer to support PHP 8.4
214+
# -
215+
# name: PHP CS Fixer Cache
216+
# uses: actions/cache@v4
217+
# with:
218+
# path: api/.php-cs-fixer.cache
219+
# key: ${{ runner.OS }}-phpcsfixer-${{ github.sha }}
220+
# restore-keys: |
221+
# ${{ runner.OS }}-phpcsfixer-
222+
# -
223+
# name: Get API changed files
224+
# id: api-changed-files
225+
# uses: tj-actions/changed-files@v46
226+
# with:
227+
# files: api/**/*.php
228+
# -
229+
# name: Get Extra Arguments for PHP-CS-Fixer
230+
# id: phpcs-intersection
231+
# run: |
232+
# CHANGED_FILES=$(echo "${{ steps.api-changed-files.outputs.all_changed_and_modified_files }}" | tr ' ' '\n')
233+
# if ! echo "${CHANGED_FILES}" | grep -qE "^api\/(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
234+
# echo "PHPCS_EXTRA_ARGS<<EOF" >> $GITHUB_ENV
235+
# echo "$EXTRA_ARGS" >> $GITHUB_ENV
236+
# echo "EOF" >> $GITHUB_ENV
237+
# -
238+
# name: Lint API
239+
# uses: docker://oskarstark/php-cs-fixer-ga
240+
# with:
241+
# args: --config=api/.php-cs-fixer.dist.php -v --dry-run --stop-on-violation --using-cache=no ${{ env.PHPCS_EXTRA_ARGS }}"
238242

239243
# Lint PWA
240244
-

api/.php-cs-fixer.dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
$finder = (new PhpCsFixer\Finder())
3+
$finder = new PhpCsFixer\Finder()
44
->in(__DIR__)
55
->exclude('var')
66
;
77

8-
return (new PhpCsFixer\Config())
8+
return new PhpCsFixer\Config()
99
->setRiskyAllowed(true)
1010
->setRules([
1111
'@PhpCsFixer' => true,

api/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
# Versions
7-
FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream
7+
FROM dunglas/frankenphp:1-php8.4 AS frankenphp_upstream
88

99

1010
# The different stages of this Dockerfile are meant to be built into separate images

api/composer.json

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,63 @@
22
"type": "project",
33
"license": "MIT",
44
"require": {
5-
"php": ">=8.3",
5+
"php": ">=8.4",
66
"ext-ctype": "*",
77
"ext-iconv": "*",
8-
"api-platform/doctrine-orm": "^4.1.17",
9-
"api-platform/graphql": "^4.1.17",
10-
"api-platform/symfony": "^4.1.17",
8+
"api-platform/doctrine-orm": "^4.1.18",
9+
"api-platform/graphql": "^4.1.18",
10+
"api-platform/symfony": "^4.1.18",
1111
"doctrine/common": "^3.5",
12-
"doctrine/doctrine-bundle": "^2.14",
12+
"doctrine/doctrine-bundle": "^2.15",
1313
"doctrine/doctrine-fixtures-bundle": "^4.1",
14-
"doctrine/doctrine-migrations-bundle": "^3.4.1",
15-
"doctrine/orm": "^3.3.2",
14+
"doctrine/doctrine-migrations-bundle": "^3.4.2",
15+
"doctrine/orm": "^3.5.0",
1616
"doctrine/persistence": "^3.4",
1717
"myclabs/php-enum": "^1.8.5",
1818
"nelmio/cors-bundle": "^2.5",
1919
"runtime/frankenphp-symfony": "^0.2.0",
2020
"seld/jsonlint": "^1.11",
21-
"symfony/asset": "7.2.*",
22-
"symfony/clock": "7.2.*",
23-
"symfony/console": "7.2.*",
24-
"symfony/dotenv": "7.2.*",
25-
"symfony/expression-language": "7.2.*",
26-
"symfony/flex": "^2.5",
27-
"symfony/framework-bundle": "7.2.*",
28-
"symfony/http-client": "7.2.*",
21+
"symfony/asset": "7.3.*",
22+
"symfony/clock": "7.3.*",
23+
"symfony/console": "7.3.*",
24+
"symfony/dotenv": "7.3.*",
25+
"symfony/expression-language": "7.3.*",
26+
"symfony/flex": "^2.7.1",
27+
"symfony/framework-bundle": "7.3.*",
28+
"symfony/http-client": "7.3.*",
2929
"symfony/mercure-bundle": "^0.3.9",
3030
"symfony/monolog-bundle": "^3.10",
31-
"symfony/property-access": "7.2.*",
32-
"symfony/property-info": "7.2.*",
33-
"symfony/runtime": "7.2.*",
34-
"symfony/security-bundle": "7.2.*",
35-
"symfony/serializer": "7.2.*",
36-
"symfony/twig-bundle": "7.2.*",
37-
"symfony/uid": "7.2.*",
38-
"symfony/validator": "7.2.*",
39-
"symfony/yaml": "7.2.*",
31+
"symfony/property-access": "7.3.*",
32+
"symfony/property-info": "7.3.*",
33+
"symfony/runtime": "7.3.*",
34+
"symfony/security-bundle": "7.3.*",
35+
"symfony/serializer": "7.3.*",
36+
"symfony/twig-bundle": "7.3.*",
37+
"symfony/uid": "7.3.*",
38+
"symfony/validator": "7.3.*",
39+
"symfony/yaml": "7.3.*",
4040
"web-token/jwt-bundle": "^4.0.4",
4141
"webonyx/graphql-php": "^15.20",
42-
"zenstruck/foundry": "^2.3.10"
42+
"zenstruck/foundry": "^2.6.0"
4343
},
4444
"require-dev": {
4545
"dama/doctrine-test-bundle": "^8.3",
46-
"justinrainbow/json-schema": "^6.4.1",
46+
"justinrainbow/json-schema": "^6.4.2",
4747
"phpstan/extension-installer": "^1.4.3",
4848
"phpstan/phpdoc-parser": "^2.1",
49-
"phpstan/phpstan": "^2.1.11",
50-
"phpstan/phpstan-doctrine": "^2.0.2",
49+
"phpstan/phpstan": "^2.1.17",
50+
"phpstan/phpstan-doctrine": "^2.0.3",
5151
"phpstan/phpstan-phpunit": "^2.0.6",
52-
"phpstan/phpstan-symfony": "^2.0.4",
53-
"phpunit/phpunit": "^12.1.2",
54-
"symfony/browser-kit": "7.2.*",
55-
"symfony/css-selector": "7.2.*",
56-
"symfony/debug-bundle": "7.2.*",
57-
"symfony/maker-bundle": "^1.62.1",
58-
"symfony/stopwatch": "7.2.*",
59-
"symfony/var-dumper": "7.2.*",
60-
"symfony/web-profiler-bundle": "7.2.*"
52+
"phpstan/phpstan-symfony": "^2.0.6",
53+
"phpunit/phpunit": "^12.2.5",
54+
"rector/rector": "^2.1",
55+
"symfony/browser-kit": "7.3.*",
56+
"symfony/css-selector": "7.3.*",
57+
"symfony/debug-bundle": "7.3.*",
58+
"symfony/maker-bundle": "^1.63.0",
59+
"symfony/stopwatch": "7.3.*",
60+
"symfony/var-dumper": "7.3.*",
61+
"symfony/web-profiler-bundle": "7.3.*"
6162
},
6263
"config": {
6364
"optimize-autoloader": true,
@@ -112,7 +113,7 @@
112113
"extra": {
113114
"symfony": {
114115
"allow-contrib": false,
115-
"require": "7.2.*",
116+
"require": "7.3.*",
116117
"docker": false,
117118
"endpoint": [
118119
"https://api.github.com/repos/Spomky-Labs/recipes/contents/index.json?ref=main",

0 commit comments

Comments
 (0)