Skip to content

Commit 0a023ee

Browse files
authored
Merge pull request #629 from cviebrock/l13
Laravel 13 updates
2 parents 50d0c8a + 54e3e79 commit 0a023ee

File tree

8 files changed

+25
-16
lines changed

8 files changed

+25
-16
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
php:
13-
- version: 8.2
1413
- version: 8.3
1514
- version: 8.4
16-
env: PHP_CS_FIXER_IGNORE_ENV=1
15+
- version: 8.5
1716
stability: [prefer-lowest, prefer-stable]
1817

1918
name: PHP ${{ matrix.php.version }} - ${{ matrix.stability }}
@@ -41,7 +40,7 @@ jobs:
4140
- name: Install dependencies
4241
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
4342
- name: Check coding style
44-
run: ${{ matrix.php.env }} composer run style:check -- --format=checkstyle | cs2pr
43+
run: ${{ matrix.php.env }} composer run style:check -- --allow-unsupported-php-version=yes --format=checkstyle | cs2pr
4544
- name: Check static analysis
4645
run: composer run analyze -- --error-format=checkstyle | cs2pr
4746
- name: Configure matchers for PHPUnit

.php-cs-fixer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
->setParallelConfig(ParallelConfigFactory::detect())
1212
->setRules([
1313
'@PhpCsFixer' => true,
14-
'@PHP84Migration' => true,
14+
'@PHP8x4Migration' => true,
1515
'indentation_type' => true,
1616

1717
// Overrides for (opinionated) @PhpCsFixer and @Symfony rules:
@@ -34,6 +34,9 @@
3434
// Forbid multi-line whitespace before the closing semicolon
3535
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
3636

37+
// Breaks 8.3 compatability if we turn this on
38+
'new_expression_parentheses' => false,
39+
3740
// Clean up PHPDocs, but leave @inheritDoc entries alone
3841
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => false],
3942

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## 13.0.0 - 19-Mar-2026
4+
5+
- Added Laravel 13 support
6+
7+
38
## 12.0.0 - 26-Feb-2025
49

510
- Added Laravel 12 support

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ version of the package.
101101
102102
| Laravel Version | Package Version |
103103
|:---------------:|:---------------:|
104+
| 13.0 | ^13.0 |
104105
| 12.0 | ^12.0 |
105106
| 11.0 | ^11.0 |
106107
| 10.0 | ^10.0 |
@@ -121,8 +122,7 @@ the correct README.md for your version (GitHub displays the version in
121122
the _master_ branch by default, which might not be what you want).
122123

123124
> [!WARNING]
124-
> Support for Laravel [Lumen](https://lumen.laravel.com/) will be dropped
125-
> in the 12.0 version of this package.
125+
> Support for Laravel [Lumen](https://lumen.laravel.com/) has been dropped.
126126
127127

128128
1. Install the package via Composer:

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717
}
1818
],
1919
"require": {
20-
"php": "^8.2",
20+
"php": "^8.3",
2121
"cocur/slugify": "^4.3",
22-
"illuminate/config": "^12.0",
23-
"illuminate/database": "^12.0",
24-
"illuminate/support": "^12.0"
22+
"illuminate/config": "^13.0",
23+
"illuminate/database": "^13.0",
24+
"illuminate/support": "^13.0"
2525
},
2626
"require-dev": {
27-
"friendsofphp/php-cs-fixer": "^3.65",
27+
"friendsofphp/php-cs-fixer": "~3.94.2",
2828
"larastan/larastan": "^3.0",
2929
"mockery/mockery": "^1.4.4",
30-
"orchestra/testbench": "^10.0",
30+
"orchestra/testbench": "^11.0",
3131
"pestphp/pest": "^3.7",
3232
"phpstan/phpstan": "^2.0"
3333
},
@@ -42,7 +42,7 @@
4242
}
4343
},
4444
"scripts": {
45-
"analyze": "vendor/bin/phpstan analyze",
45+
"analyze": "vendor/bin/phpstan --memory-limit=1G analyze",
4646
"fresh": [
4747
"rm -rf vendor composer.lock",
4848
"composer install"

phpstan.dist.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ includes:
22
- vendor/larastan/larastan/extension.neon
33

44
parameters:
5-
level: 4
5+
level: 5
66
paths:
77
- resources
88
- src

src/Sluggable.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ trait Sluggable
1818
*/
1919
public static function bootSluggable(): void
2020
{
21-
static::observe(app(SluggableObserver::class));
21+
static::whenBooted(function () {
22+
static::observe(app(SluggableObserver::class));
23+
});
2224
}
2325

2426
/**

src/SluggableObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function fireSluggingEvent(Model $model, string $event): ?bool
8787
/**
8888
* Fire the namespaced post-validation event.
8989
*/
90-
protected function fireSluggedEvent(Model $model, string $status): void
90+
protected function fireSluggedEvent(Model $model, bool $status): void
9191
{
9292
$this->events->dispatch('eloquent.slugged: ' . get_class($model), [$model, $status]);
9393
}

0 commit comments

Comments
 (0)