Skip to content

Commit

Permalink
[10.x] PHP 8.3 builds (#47788)
Browse files Browse the repository at this point in the history
* PHP 8.3 builds

* wip

* wip

* wip

* wip

* wip

* Bump nesbot/carbon for PHP 8.3 Combatibility (#47860)

---------

Co-authored-by: Julius Kiekbusch <[email protected]>
  • Loading branch information
driesvints and Jubeki authored Jul 27, 2023
1 parent 1fd6e04 commit 7dab1c5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
8 changes: 5 additions & 3 deletions tests/Http/HttpTestingFileFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7dab1c5

Please sign in to comment.