From 7dab1c5b4e2afb130b7839fd0e62f6af71c4d982 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 27 Jul 2023 16:29:38 +0200 Subject: [PATCH] [10.x] PHP 8.3 builds (#47788) * PHP 8.3 builds * wip * wip * wip * wip * wip * Bump nesbot/carbon for PHP 8.3 Combatibility (#47860) --------- Co-authored-by: Julius Kiekbusch --- .github/workflows/tests.yml | 22 ++++++++++++++++++++-- composer.json | 2 +- src/Illuminate/Support/composer.json | 2 +- tests/Http/HttpTestingFileFactoryTest.php | 8 +++++--- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eddfa0848878..43e0189c7873 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.1, 8.2] + php: [8.1, 8.2, 8.3] stability: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} @@ -81,6 +81,15 @@ jobs: timeout_minutes: 5 max_attempts: 5 command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + if: matrix.php <= 8.2 + + - name: Install dependencies + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress --ignore-platform-req=php + if: matrix.php == 8.3 - name: Execute tests run: vendor/bin/phpunit --display-deprecation @@ -106,7 +115,7 @@ jobs: strategy: fail-fast: true matrix: - php: [8.1, 8.2] + php: [8.1, 8.2, 8.3] stability: [prefer-lowest, prefer-stable] name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - Windows @@ -149,6 +158,15 @@ jobs: timeout_minutes: 5 max_attempts: 5 command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + if: matrix.php <= 8.2 + + - name: Install dependencies + uses: nick-fields/retry@v2 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress --ignore-platform-req=php + if: matrix.php == 8.3 - name: Execute tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 65c979d5532e..55c44d9a5b5a 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "league/commonmark": "^2.2.1", "league/flysystem": "^3.8.0", "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.62.1", + "nesbot/carbon": "^2.67", "nunomaduro/termwind": "^1.13", "psr/container": "^1.1.1|^2.0.1", "psr/log": "^1.0|^2.0|^3.0", diff --git a/src/Illuminate/Support/composer.json b/src/Illuminate/Support/composer.json index d7f861d80af7..57c92e366238 100644 --- a/src/Illuminate/Support/composer.json +++ b/src/Illuminate/Support/composer.json @@ -23,7 +23,7 @@ "illuminate/conditionable": "^10.0", "illuminate/contracts": "^10.0", "illuminate/macroable": "^10.0", - "nesbot/carbon": "^2.62.1", + "nesbot/carbon": "^2.67", "voku/portable-ascii": "^2.0" }, "conflict": { diff --git a/tests/Http/HttpTestingFileFactoryTest.php b/tests/Http/HttpTestingFileFactoryTest.php index a3c9a561e1ba..c2824b6fe327 100644 --- a/tests/Http/HttpTestingFileFactoryTest.php +++ b/tests/Http/HttpTestingFileFactoryTest.php @@ -95,9 +95,11 @@ public function testImageBmp() $imagePath = $image->getRealPath(); - $this->assertSame('image/x-ms-bmp', mime_content_type($imagePath)); - - $this->assertSame('image/bmp', getimagesize($imagePath)['mime']); + if (version_compare(PHP_VERSION, '8.3.0-dev', '>=')) { + $this->assertSame('image/bmp', mime_content_type($imagePath)); + } else { + $this->assertSame('image/x-ms-bmp', mime_content_type($imagePath)); + } } public function testCreateWithMimeType()