Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PHP 8.4 #616

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.2, 8.3]
php: [8.2, 8.3, 8.4]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }}
Expand Down
4 changes: 2 additions & 2 deletions src/Services/SlugService.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getConfiguration(array $overrides = []): array
*
* @return null|string
*/
public function buildSlug(string $attribute, array $config, bool $force = null): ?string
public function buildSlug(string $attribute, array $config, bool $force = false): ?string
{
$slug = $this->model->getAttribute($attribute);

Expand Down Expand Up @@ -407,7 +407,7 @@ protected function usesSoftDeleting(): bool
* @throws \InvalidArgumentException
* @throws \UnexpectedValueException
*/
public static function createSlug($model, string $attribute, string $fromString, array $config = null): string
public static function createSlug($model, string $attribute, string $fromString, ?array $config = null): string
{
if (is_string($model)) {
$model = new $model;
Expand Down
2 changes: 1 addition & 1 deletion src/Sluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static function slugged($callback): void
/**
* @inheritDoc
*/
public function replicate(array $except = null)
public function replicate(?array $except = null)
{
$instance = parent::replicate($except);
(new SlugService())->slug($instance, true);
Expand Down