Skip to content

Commit 41a1f66

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Fix false in output [skip ci] Limit community composer --ignore-platform-reqs to master
2 parents 86ac21c + 8b2b3fb commit 41a1f66

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/nightly.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branch:
99
required: true
1010
type: string
11+
community_composer_ignore_platform_reqs:
12+
required: true
13+
type: boolean
1114
community_verify_type_inference:
1215
required: true
1316
type: boolean
@@ -550,7 +553,7 @@ jobs:
550553
git clone "https://github.com/amphp/$repository.git" "amphp-$repository" --depth 1
551554
cd "amphp-$repository"
552555
git rev-parse HEAD
553-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
556+
php /usr/bin/composer install --no-progress ${{ inputs.community_composer_ignore_platform_reqs && '--ignore-platform-reqs' || '' }}
554557
vendor/bin/phpunit || EXIT_CODE=$?
555558
if [ ${EXIT_CODE:-0} -gt 128 ]; then
556559
X=1;
@@ -564,7 +567,7 @@ jobs:
564567
git clone https://github.com/laravel/framework.git --depth=1
565568
cd framework
566569
git rev-parse HEAD
567-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
570+
php /usr/bin/composer install --no-progress ${{ inputs.community_composer_ignore_platform_reqs && '--ignore-platform-reqs' || '' }}
568571
# Hack to disable a test that hangs
569572
php -r '$c = file_get_contents("tests/Filesystem/FilesystemTest.php"); $c = str_replace("public function testSharedGet()", "#[\\PHPUnit\\Framework\\Attributes\\Group('"'"'skip'"'"')]\n public function testSharedGet()", $c); file_put_contents("tests/Filesystem/FilesystemTest.php", $c);'
570573
php vendor/bin/phpunit --exclude-group skip || EXIT_CODE=$?
@@ -581,7 +584,7 @@ jobs:
581584
git clone "https://github.com/reactphp/$repository.git" "reactphp-$repository" --depth 1
582585
cd "reactphp-$repository"
583586
git rev-parse HEAD
584-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
587+
php /usr/bin/composer install --no-progress ${{ inputs.community_composer_ignore_platform_reqs && '--ignore-platform-reqs' || '' }}
585588
vendor/bin/phpunit || EXIT_CODE=$?
586589
if [ $[EXIT_CODE:-0} -gt 128 ]; then
587590
X=1;
@@ -595,7 +598,7 @@ jobs:
595598
git clone https://github.com/revoltphp/event-loop.git --depth=1
596599
cd event-loop
597600
git rev-parse HEAD
598-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
601+
php /usr/bin/composer install --no-progress ${{ inputs.community_composer_ignore_platform_reqs && '--ignore-platform-reqs' || '' }}
599602
vendor/bin/phpunit || EXIT_CODE=$?
600603
if [ ${EXIT_CODE:-0} -gt 128 ]; then
601604
exit 1
@@ -606,7 +609,7 @@ jobs:
606609
git clone https://github.com/symfony/symfony.git --depth=1
607610
cd symfony
608611
git rev-parse HEAD
609-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
612+
php /usr/bin/composer install --no-progress ${{ inputs.community_composer_ignore_platform_reqs && '--ignore-platform-reqs' || '' }}
610613
php ./phpunit install
611614
# Test causes a heap-buffer-overflow but I cannot reproduce it locally...
612615
php -r '$c = file_get_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php"); $c = str_replace("public function testSanitizeDeepNestedString()", "/** @group skip */\n public function testSanitizeDeepNestedString()", $c); file_put_contents("src/Symfony/Component/HtmlSanitizer/Tests/HtmlSanitizerCustomTest.php", $c);'
@@ -627,15 +630,15 @@ jobs:
627630
git clone https://github.com/sebastianbergmann/phpunit.git --branch=main --depth=1
628631
cd phpunit
629632
git rev-parse HEAD
630-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
633+
php /usr/bin/composer install --no-progress ${{ inputs.community_composer_ignore_platform_reqs && '--ignore-platform-reqs' || '' }}
631634
php ./phpunit || EXIT_CODE=$?
632635
if [ ${EXIT_CODE:-0} -gt 128 ]; then
633636
exit 1
634637
fi
635638
- name: 'Symfony Preloading'
636639
if: ${{ !cancelled() && !inputs.skip_symfony }}
637640
run: |
638-
php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress --ignore-platform-reqs
641+
php /usr/bin/composer create-project symfony/symfony-demo symfony_demo --no-progress ${{ inputs.community_composer_ignore_platform_reqs && '--ignore-platform-reqs' || '' }}
639642
cd symfony_demo
640643
git rev-parse HEAD
641644
sed -i 's/PHP_SAPI/"cli-server"/g' var/cache/dev/App_KernelDevDebugContainer.preload.php
@@ -646,7 +649,7 @@ jobs:
646649
git clone https://github.com/WordPress/wordpress-develop.git wordpress --depth=1
647650
cd wordpress
648651
git rev-parse HEAD
649-
php /usr/bin/composer install --no-progress --ignore-platform-reqs
652+
php /usr/bin/composer install --no-progress ${{ inputs.community_composer_ignore_platform_reqs && '--ignore-platform-reqs' || '' }}
650653
cp wp-tests-config-sample.php wp-tests-config.php
651654
sed -i 's/youremptytestdbnamehere/test/g' wp-tests-config.php
652655
sed -i 's/yourusernamehere/root/g' wp-tests-config.php

.github/workflows/root.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
(((matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9) && '24.04')
5151
|| '22.04' }}
5252
branch: ${{ matrix.branch.ref }}
53+
community_composer_ignore_platform_reqs: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 5) || matrix.branch.version[0] >= 9 }}
5354
community_verify_type_inference: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}
5455
libmysqlclient_with_mysqli: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] == 1) }}
5556
run_alpine: ${{ (matrix.branch.version[0] == 8 && matrix.branch.version[1] >= 4) || matrix.branch.version[0] >= 9 }}

0 commit comments

Comments
 (0)