Skip to content

Upgrade to Symfony 7.3 & PHP 8.4 #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ x-base-php: &base-php
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
PHP_VERSION: ${PHP_VERSION:-8.2}
XDEBUG_VERSION: ${XDEBUG_VERSION:-3.2.0}
PHP_VERSION: ${PHP_VERSION:-8.4}
XDEBUG_VERSION: ${XDEBUG_VERSION:-3.4.5}
env_file: .env
volumes:
- ../:/var/www
Expand Down
2 changes: 1 addition & 1 deletion .docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PHP_VERSION=8.2
ARG PHP_VERSION=8.1
FROM php:${PHP_VERSION}-fpm-alpine AS php

ARG XDEBUG_VERSION=3.1.4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.4'
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.4'
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.4'
coverage: none
tools: composer:v2
- name: Install Composer dependencies (locked)
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ jobs:
php-version:
- '8.2'
- '8.3'
- '8.4'
dependencies: [highest]
allowed-to-fail: [false]
symfony-require: ['']
variant: [normal]
include:
- php-version: '8.1'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
Expand All @@ -35,8 +41,8 @@ jobs:
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.1.*
variant: symfony/symfony:"7.1.*"
symfony-require: 7.3.*
variant: symfony/symfony:"7.3.*"
- php-version: '8.3'
dependencies: highest
allowed-to-fail: false
Expand All @@ -45,8 +51,18 @@ jobs:
- php-version: '8.3'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.1.*
variant: symfony/symfony:"7.1.*"
symfony-require: 7.3.*
variant: symfony/symfony:"7.3.*"
- php-version: '8.4'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
- php-version: '8.4'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.3.*
variant: symfony/symfony:"7.3.*"

steps:
- name: Checkout
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
"phpunit/phpunit": "<10.0",
"rector/rector": "*",
"roave/security-advisories": "dev-latest",
"symfony/browser-kit": "^6.4|^7.1",
"symfony/css-selector": "^6.4|^7.1",
"symfony/debug-bundle": "^6.4|^7.1",
"symfony/browser-kit": "^6.4|^7.3",
"symfony/css-selector": "^6.4|^7.3",
"symfony/debug-bundle": "^6.4|^7.3",
"symfony/maker-bundle": "^1.31",
"symfony/web-profiler-bundle": "^6.4|^7.1"
"symfony/web-profiler-bundle": "^6.4|^7.3"
},
"scripts": {
"auto-scripts": {
Expand All @@ -58,7 +58,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "7.2.*"
"require": "7.3.*"
}
}
}
4 changes: 4 additions & 0 deletions config/packages/property_info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Uncomment following if you are using Symfony 7.3 or higher
#framework:
# property_info:
# with_constructor_extractor: true
19 changes: 6 additions & 13 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,20 @@

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\ValueObject\PhpVersion;

return RectorConfig::configure()
->withPhpVersion(PhpVersion::PHP_82)
->withPhpVersion(PhpVersion::PHP_84)
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
->withPhpSets(php82: true)
->withPhpSets(php81: true)
// here we can define, what prepared sets of rules will be applied
->withPreparedSets(
deadCode: true,
codeQuality: true
)
->withComposerBased(symfony: true)
->withPreparedSets(deadCode: true, codeQuality: true, doctrineCodeQuality: true, symfonyCodeQuality: true)
->withAttributesSets(symfony: true, doctrine: true)
->withSets([
LevelSetList::UP_TO_PHP_82,
SymfonySetList::SYMFONY_64,
SymfonySetList::SYMFONY_71,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
LevelSetList::UP_TO_PHP_81,
])
;
12 changes: 12 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@
"config/packages/monolog.yaml"
]
},
"symfony/property-info": {
"version": "7.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "7.3",
"ref": "dae70df71978ae9226ae915ffd5fad817f5ca1f7"
},
"files": [
"config/packages/property_info.yaml"
]
},
"symfony/routing": {
"version": "7.2",
"recipe": {
Expand Down
Loading