Skip to content

Commit

Permalink
Support for Laravel 12 (#568)
Browse files Browse the repository at this point in the history
* Support for Laravel 12 + Bumped Pest to v3

* Update test (`tap()` is deprecated in Pest v3)

https://pestphp.com/docs/upgrade-guide#content-tap-method

* Dropped Laravel 10 support
  • Loading branch information
pascalbaljet authored Feb 21, 2025
1 parent eab5bcd commit 329b23c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
fail-fast: false
matrix:
php: [8.2, 8.3, 8.4]
laravel: [10.*, 11.*]
laravel: [11.*, 12.*]
dependency-version: [prefer-stable]
os: [ubuntu-latest]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
- laravel: 12.*
testbench: 10.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
"require": {
"php": "^8.2||^8.3||^8.4",
"guzzlehttp/guzzle": "^7.8",
"illuminate/support": "^10.0|^11.0",
"illuminate/support": "^11.0|^12.0",
"nesbot/carbon": "^2.71|^3.0",
"spatie/crawler": "^8.0.1",
"spatie/laravel-package-tools": "^1.16.1",
"symfony/dom-crawler": "^6.3.4|^7.0"
},
"require-dev": {
"mockery/mockery": "^1.6.6",
"orchestra/testbench": "^8.14|^9.0",
"pestphp/pest": "^2.24",
"orchestra/testbench": "^9.0|^10.0",
"pestphp/pest": "^3.7.4",
"spatie/pest-plugin-snapshots": "^2.1",
"spatie/phpunit-snapshot-assertions": "^5.1.2",
"spatie/temporary-directory": "^2.2"
Expand Down Expand Up @@ -60,4 +60,4 @@
"scripts": {
"test": "vendor/bin/pest"
}
}
}
8 changes: 4 additions & 4 deletions tests/UrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@
});

test('priority can be set')
->tap(fn () => $this->url->setPriority(0.1))
->defer(fn () => $this->url->setPriority(0.1))
->expect(fn () => $this->url->priority)
->toEqual(0.1);

test('priority is clamped')
->tap(fn () => $this->url->setPriority(-0.1))
->defer(fn () => $this->url->setPriority(-0.1))
->expect(fn () => $this->url->priority)
->toEqual(0)
->tap(fn () => $this->url->setPriority(1.1))
->defer(fn () => $this->url->setPriority(1.1))
->expect(fn () => $this->url->priority)
->toEqual(1);

test('change frequency can be set')
->tap(fn () => $this->url->setChangeFrequency(Url::CHANGE_FREQUENCY_YEARLY))
->defer(fn () => $this->url->setChangeFrequency(Url::CHANGE_FREQUENCY_YEARLY))
->expect(fn () => $this->url->changeFrequency)
->toEqual(Url::CHANGE_FREQUENCY_YEARLY);

Expand Down

0 comments on commit 329b23c

Please sign in to comment.