Skip to content

Commit 38a98fb

Browse files
authored
DX: Allow development on PHP 8.5 (#9092)
1 parent 73fa919 commit 38a98fb

File tree

6 files changed

+20
-2
lines changed

6 files changed

+20
-2
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- docker-service: php-8.2
2929
- docker-service: php-8.3
3030
- docker-service: php-8.4
31+
- docker-service: php-8.5
3132
- docker-service: sphinx-lint
3233
- docker-service: markdown-lint
3334

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
return (new Config())
3636
->setParallelConfig(ParallelConfigFactory::detect()) // @TODO 4.0 no need to call this manually
37+
->setUnsupportedPhpVersionAllowed(true)
3738
->setRiskyAllowed(true)
3839
->registerCustomFixers([
3940
new ConfigurableFixerTemplateFixer(),

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ RUN if [ ! -z "$DOCKER_GROUP_ID" ] && [ ! getent group "${DOCKER_GROUP_ID}" > /d
5252
fi \
5353
&& apk add git \
5454
&& sync \
55-
&& install-php-extensions pcov xdebug-${PHP_XDEBUG_VERSION} \
55+
&& if [ ! -z "$PHP_XDEBUG_VERSION" ] ; then install-php-extensions pcov xdebug-${PHP_XDEBUG_VERSION}; fi \
5656
&& curl --location --output /usr/local/bin/xdebug https://github.com/julienfalque/xdebug/releases/download/v2.0.0/xdebug \
5757
&& chmod +x /usr/local/bin/xdebug
5858

compose.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ services:
5656
<<: *default_environment
5757
XDEBUG_MODE: coverage
5858

59+
php-8.5:
60+
<<: *php
61+
build:
62+
args:
63+
ALPINE_VERSION: '3.22'
64+
PHP_VERSION: 8.5.0beta3
65+
PHP_XDEBUG_VERSION: ''
66+
environment:
67+
<<: *default_environment
68+
XDEBUG_MODE: coverage
69+
5970
sphinx-lint:
6071
build:
6172
target: sphinx-lint

tests/AutoReview/CiConfigurationTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ public static function testThatAlpineVersionsAreInSync(): void
111111
$dockerMap = [];
112112
foreach ($yaml['services'] as $item) {
113113
if (isset($item['build']['args']['PHP_VERSION'], $item['build']['args']['ALPINE_VERSION'])) {
114+
// PHP 8.5 at this point is only allowed for local development and is not a part of Docker releases
115+
if (str_starts_with($item['build']['args']['PHP_VERSION'], '8.5')) {
116+
continue;
117+
}
118+
114119
$dockerMap[$item['build']['args']['PHP_VERSION']] = $item['build']['args']['ALPINE_VERSION'];
115120
}
116121
}

tests/Console/ApplicationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testApplication(): void
3333
{
3434
$regex = '/^PHP CS Fixer <info>\d+.\d+.\d+(-DEV)?<\/info> <info>.+<\/info>'
3535
.' by <comment>Fabien Potencier<\/comment>, <comment>Dariusz Ruminski<\/comment> and <comment>contributors<\/comment>\.'
36-
."\nPHP runtime: <info>\\d+.\\d+.\\d+(-dev)?<\\/info>$/";
36+
."\nPHP runtime: <info>\\d+.\\d+.\\d+(-dev|beta\\d+)?<\\/info>$/";
3737

3838
self::assertMatchesRegularExpression($regex, (new Application())->getLongVersion());
3939
}

0 commit comments

Comments
 (0)