Skip to content

Commit 357ce21

Browse files
Bump Symfony 8 to PHP >= 8.4
1 parent 0b19b91 commit 357ce21

File tree

186 files changed

+214
-205
lines changed

Some content is hidden

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

186 files changed

+214
-205
lines changed

.github/build-packages.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
$mergeBase = trim(shell_exec(sprintf('git merge-base "%s" HEAD', array_shift($dirs))));
1616
$version = array_shift($dirs);
1717

18+
if ('8.0' === $version) {
19+
$version = '7.4'; // to be removed once deps allow ^8.0
20+
}
21+
1822
$packages = [];
1923
$flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
2024
$preferredInstall = json_decode(file_get_contents(__DIR__.'/composer-config.json'), true)['config']['preferred-install'];

.github/workflows/integration-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
strategy:
2525
matrix:
26-
php: ['8.2']
26+
php: ['8.4']
2727
fail-fast: false
2828

2929
services:
@@ -228,6 +228,7 @@ jobs:
228228
COMPOSER_HOME="$(composer config home)"
229229
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
230230
export COMPOSER_ROOT_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+').x-dev
231+
export COMPOSER_ROOT_VERSION=7.4.x-dev # to be removed once deps allow ^8.0
231232
echo COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION >> $GITHUB_ENV
232233
233234
echo "::group::composer update"
@@ -269,7 +270,7 @@ jobs:
269270
PGBOUNCER_HOST: localhost:6432
270271

271272
#- name: Run HTTP push tests
272-
# if: matrix.php == '8.2'
273+
# if: matrix.php == '8.4'
273274
# run: |
274275
# [ -d .phpunit ] && mv .phpunit .phpunit.bak
275276
# wget -q https://github.com/symfony/binary-utils/releases/download/v0.1/vulcain_0.1.3_Linux_x86_64.tar.gz -O - | tar xz && mv vulcain /usr/local/bin

.github/workflows/intl-data-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ jobs:
6363
coverage: "none"
6464
extensions: "zip,intl-${{env.SYMFONY_ICU_VERSION}}"
6565
ini-values: "memory_limit=-1"
66-
php-version: "8.2"
66+
php-version: "8.4"
6767

6868
- name: Install dependencies
6969
run: |
7070
COMPOSER_HOME="$(composer config home)"
7171
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
7272
export COMPOSER_ROOT_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+').x-dev
73+
export COMPOSER_ROOT_VERSION=7.4.x-dev # to be removed once deps allow ^8.0
7374
echo COMPOSER_ROOT_VERSION=$COMPOSER_ROOT_VERSION >> $GITHUB_ENV
7475
7576
echo "::group::composer update"

.github/workflows/phpunit-bridge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: shivammathur/setup-php@v2
3333
with:
3434
coverage: "none"
35-
php-version: "7.2"
35+
php-version: "8.1"
3636

3737
- name: Lint
3838
run: find ./src/Symfony/Bridge/PhpUnit -name '*.php' | grep -v -e /Tests/ -e /Attribute/ -e /Extension/ -e /Metadata/ -e ForV7 -e ForV8 -e ForV9 -e ConstraintLogicTrait -e SymfonyExtension | parallel -j 4 php -l {}

.github/workflows/psalm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-24.04
2121

2222
env:
23-
php-version: '8.2'
23+
php-version: '8.4'
2424
steps:
2525
- name: Setup PHP
2626
uses: shivammathur/setup-php@v2
@@ -42,6 +42,7 @@ jobs:
4242
COMPOSER_HOME="$(composer config home)"
4343
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
4444
export COMPOSER_ROOT_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+').x-dev
45+
export COMPOSER_ROOT_VERSION=7.4.x-dev # to be removed once deps allow ^8.0
4546
composer remove --dev --no-update --no-interaction symfony/phpunit-bridge
4647
composer require --no-progress --ansi --no-plugins psalm/phar:@stable phpunit/phpunit:^9.6 php-http/discovery psr/event-dispatcher mongodb/mongodb jetbrains/phpstorm-stubs
4748

.github/workflows/unit-tests.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ jobs:
2626
strategy:
2727
matrix:
2828
include:
29-
- php: '8.2'
30-
- php: '8.2'
29+
- php: '8.4'
30+
- php: '8.4'
3131
mode: high-deps
32-
- php: '8.2'
32+
- php: '8.4'
3333
mode: low-deps
34-
- php: '8.3'
3534
- php: '8.4'
3635
# brotli and zstd extensions are optional, when not present the commands will be used instead,
3736
# we must test both scenarios
@@ -142,7 +141,8 @@ jobs:
142141
143142
echo SYMFONY_VERSION=$SYMFONY_VERSION >> $GITHUB_ENV
144143
echo COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev >> $GITHUB_ENV
145-
echo SYMFONY_REQUIRE=">=$([ '${{ matrix.mode }}' = low-deps ] && echo 5.4 || echo $SYMFONY_VERSION)" >> $GITHUB_ENV
144+
echo COMPOSER_ROOT_VERSION=7.4.x-dev >> $GITHUB_ENV # to be removed once all deps allow ^8.0
145+
echo SYMFONY_REQUIRE=">=$([ '${{ matrix.mode }}' = low-deps ] && echo 6.4 || echo $SYMFONY_VERSION)" >> $GITHUB_ENV
146146
[[ "${{ matrix.mode }}" = *-deps ]] && mv composer.json.phpunit composer.json || true
147147
148148
- name: Install dependencies
@@ -156,19 +156,19 @@ jobs:
156156
echo "::endgroup::"
157157
158158
- name: Patch return types
159-
if: "matrix.php == '8.2' && ! matrix.mode"
159+
if: "matrix.php == '8.4' && ! matrix.mode"
160160
run: |
161161
patch -sp1 < .github/expected-missing-return-types.diff
162162
git add .
163163
composer install -q --optimize-autoloader || composer install --optimize-autoloader
164-
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.2' php .github/patch-types.php
164+
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.4' php .github/patch-types.php
165165
git checkout src/Symfony/Contracts/Service/ResetInterface.php
166-
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.2' php .github/patch-types.php # ensure the script is idempotent
166+
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.4' php .github/patch-types.php # ensure the script is idempotent
167167
git checkout src/Symfony/Contracts/Service/ResetInterface.php
168168
git diff --exit-code
169169
170170
- name: Check return types
171-
if: "matrix.php == '8.2' && ! matrix.mode"
171+
if: "matrix.php == '8.4' && ! matrix.mode"
172172
run: |
173173
php .github/patch-types.php lint
174174
@@ -214,12 +214,13 @@ jobs:
214214
# get a list of the patched components (relies on .github/build-packages.php being called in the previous step)
215215
PATCHED_COMPONENTS=$(git diff --name-only src/ | grep composer.json || true)
216216
217-
# for 6.4 LTS, checkout and test previous major with the patched components (only for patched components)
218-
if [[ $PATCHED_COMPONENTS && $SYMFONY_VERSION = 6.4 ]]; then
217+
# for 7.4 LTS, checkout and test previous major with the patched components (only for patched components)
218+
if [[ $PATCHED_COMPONENTS && $SYMFONY_VERSION = 7.4 ]]; then
219219
export FLIP='^'
220220
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
221221
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
222222
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
223+
export COMPOSER_ROOT_VERSION=7.4.x-dev # to be removed once deps allow ^8.0
223224
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
224225
git fetch --depth=2 origin $SYMFONY_VERSION
225226
git checkout -m FETCH_HEAD
@@ -240,12 +241,12 @@ jobs:
240241
script -e -c './phpunit --group tty' /dev/null
241242
242243
- name: Run tests with SIGCHLD enabled PHP
243-
if: "matrix.php == '8.2' && ! matrix.mode"
244+
if: "matrix.php == '8.4' && ! matrix.mode"
244245
run: |
245246
mkdir build
246247
cd build
247-
wget -q https://github.com/symfony/binary-utils/releases/download/v0.1/php-8.2.0-pcntl-sigchild.tar.bz2
248-
tar -xjf php-8.2.0-pcntl-sigchild.tar.bz2
248+
wget -q https://github.com/symfony/binary-utils/releases/download/v0.1/php-8.4.0-pcntl-sigchild.tar.bz2
249+
tar -xjf php-8.4.0-pcntl-sigchild.tar.bz2
249250
cd ..
250251
251252
mkdir -p /opt/php/lib

.github/workflows/windows.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ jobs:
4343
run: |
4444
$env:Path = 'c:\php;' + $env:Path
4545
mkdir c:\php && cd c:\php
46-
iwr -outf php-8.2.0-Win32-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php-8.2.0-Win32-vs16-x86.zip
47-
7z x php-8.2.0-Win32-vs16-x86.zip -y >nul
46+
iwr -outf php.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php-8.4.0-Win32-vs17-x86.zip
47+
7z x php.zip -y >nul
4848
cd ext
49-
iwr -outf php_apcu-5.1.22-8.2-ts-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.22-8.2-ts-vs16-x86.zip
50-
7z x php_apcu-5.1.22-8.2-ts-vs16-x86.zip -y >nul
51-
iwr -outf php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip
52-
7z x php_redis-6.0.0-dev-8.2-ts-vs16-x86.zip -y >nul
49+
iwr -outf php_apcu.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_apcu-5.1.24-8.4-ts-vs17-x86.zip
50+
7z x php_apcu.zip -y >nul
51+
iwr -outf php_redis.zip https://github.com/symfony/binary-utils/releases/download/v0.1/php_redis-6.2.0-8.4-ts-vs17-x86.zip
52+
7z x php_redis.zip -y >nul
5353
cd ..
5454
Copy php.ini-development php.ini-min
5555
"memory_limit=-1" >> php.ini-min
@@ -66,7 +66,7 @@ jobs:
6666
"opcache.enable_cli=1" >> php.ini-max
6767
"extension=php_openssl.dll" >> php.ini-max
6868
"extension=php_apcu.dll" >> php.ini-max
69-
"extension=php_igbinary.dll" >> php.ini-max
69+
#"extension=php_igbinary.dll" >> php.ini-max
7070
"extension=php_redis.dll" >> php.ini-max
7171
"apc.enable_cli=1" >> php.ini-max
7272
"extension=php_intl.dll" >> php.ini-max
@@ -86,6 +86,7 @@ jobs:
8686
8787
$env:SYMFONY_VERSION=(Select-String -CaseSensitive -Pattern " VERSION =" -SimpleMatch -Path src/Symfony/Component/HttpKernel/Kernel.php | Select Line | Select-String -Pattern "([0-9][0-9]*\.[0-9])").Matches.Value
8888
$env:COMPOSER_ROOT_VERSION=$env:SYMFONY_VERSION + ".x-dev"
89+
$env:COMPOSER_ROOT_VERSION="7.4.x-dev" # to be removed once all deps allow ^8.0
8990
9091
php .github/build-packages.php HEAD^ $env:SYMFONY_VERSION src\Symfony\Bridge\PhpUnit
9192
php composer.phar update --no-progress --ansi

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"symfony/translation-implementation": "2.3|3.0"
3434
},
3535
"require": {
36-
"php": ">=8.2",
36+
"php": ">=8.4",
3737
"composer-runtime-api": ">=2.1",
3838
"composer/semver": "^3.0",
3939
"ext-xml": "*",

src/Symfony/Bridge/Doctrine/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"doctrine/event-manager": "^2",
2121
"doctrine/persistence": "^3.1|^4",
2222
"symfony/deprecation-contracts": "^2.5|^3",

src/Symfony/Bridge/Monolog/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"monolog/monolog": "^3",
2121
"symfony/service-contracts": "^2.5|^3",
2222
"symfony/http-kernel": "^6.4|^7.0|^8.0"

src/Symfony/Bridge/PsrHttpMessage/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"psr/http-message": "^1.0|^2.0",
2121
"symfony/http-foundation": "^6.4|^7.0|^8.0"
2222
},

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"symfony/deprecation-contracts": "^2.5|^3",
2121
"symfony/translation-contracts": "^2.5|^3",
2222
"twig/twig": "^3.21"

src/Symfony/Bundle/DebugBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"ext-xml": "*",
2121
"composer-runtime-api": ">=2.1",
2222
"symfony/config": "^7.3|^8.0",

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"composer-runtime-api": ">=2.1",
2121
"ext-xml": "*",
2222
"symfony/cache": "^6.4|^7.0|^8.0",

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"composer-runtime-api": ">=2.1",
2121
"ext-xml": "*",
2222
"symfony/clock": "^6.4|^7.0|^8.0",

src/Symfony/Bundle/TwigBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"composer-runtime-api": ">=2.1",
2121
"symfony/config": "^7.3|^8.0",
2222
"symfony/dependency-injection": "^6.4|^7.0|^8.0",

src/Symfony/Bundle/WebProfilerBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"composer-runtime-api": ">=2.1",
2121
"symfony/config": "^7.3|^8.0",
2222
"symfony/deprecation-contracts": "^2.5|^3",

src/Symfony/Component/Asset/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2"
19+
"php": ">=8.4"
2020
},
2121
"require-dev": {
2222
"symfony/http-client": "^6.4|^7.0|^8.0",

src/Symfony/Component/AssetMapper/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"composer/semver": "^3.0",
2121
"symfony/deprecation-contracts": "^2.1|^3",
2222
"symfony/filesystem": "^7.1|^8.0",

src/Symfony/Component/BrowserKit/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"symfony/dom-crawler": "^6.4|^7.0|^8.0"
2121
},
2222
"require-dev": {

src/Symfony/Component/Cache/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"symfony/cache-implementation": "1.1|2.0|3.0"
2222
},
2323
"require": {
24-
"php": ">=8.2",
24+
"php": ">=8.4",
2525
"psr/cache": "^2.0|^3.0",
2626
"psr/log": "^1.1|^2|^3",
2727
"symfony/cache-contracts": "^3.6",

src/Symfony/Component/Clock/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"psr/clock-implementation": "1.0"
2020
},
2121
"require": {
22-
"php": ">=8.2",
22+
"php": ">=8.4",
2323
"psr/clock": "^1.0",
2424
"symfony/polyfill-php83": "^1.28"
2525
},

src/Symfony/Component/Config/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"symfony/deprecation-contracts": "^2.5|^3",
2121
"symfony/filesystem": "^7.1|^8.0",
2222
"symfony/polyfill-ctype": "~1.8"

src/Symfony/Component/Console/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"symfony/deprecation-contracts": "^2.5|^3",
2121
"symfony/polyfill-mbstring": "~1.0",
2222
"symfony/service-contracts": "^2.5|^3",

src/Symfony/Component/CssSelector/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
],
2222
"require": {
23-
"php": ">=8.2"
23+
"php": ">=8.4"
2424
},
2525
"autoload": {
2626
"psr-4": { "Symfony\\Component\\CssSelector\\": "" },

src/Symfony/Component/DependencyInjection/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"psr/container": "^1.1|^2.0",
2121
"symfony/deprecation-contracts": "^2.5|^3",
2222
"symfony/service-contracts": "^3.5",

src/Symfony/Component/DomCrawler/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"symfony/polyfill-ctype": "~1.8",
2121
"symfony/polyfill-mbstring": "~1.0",
2222
"masterminds/html5": "^2.6"

src/Symfony/Component/Dotenv/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2"
19+
"php": ">=8.4"
2020
},
2121
"require-dev": {
2222
"symfony/console": "^6.4|^7.0|^8.0",

src/Symfony/Component/Emoji/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=8.2",
19+
"php": ">=8.4",
2020
"ext-intl": "*"
2121
},
2222
"require-dev": {

0 commit comments

Comments
 (0)