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

Fixed signature compatibility warnings for Laravel 9, 10, and 11 #42

Merged
merged 8 commits into from
Jul 24, 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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.1, 7.2, 7.3, 8.0, 8.1]
php: [8.1,8.2,8.3]
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
Expand Down
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 8.0
- 8.1
- 8.2
- 8.3

sudo: false

Expand Down
13 changes: 6 additions & 7 deletions src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\Collection as BaseCollection;
use Illuminate\Support\Str;
use JsonSerializable;

abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializable
Expand Down Expand Up @@ -863,7 +863,7 @@ public function __set($key, $value)
* @param mixed $offset
* @return bool
*/
public function offsetExists($offset): bool
public function offsetExists(mixed $offset): bool
{
return isset($this->$offset);
}
Expand All @@ -872,9 +872,8 @@ public function offsetExists($offset): bool
* Get the value for a given offset.
*
* @param mixed $offset
* @return mixed
*/
public function offsetGet($offset): mixed
* @return mix
public function offsetGet(mixed $offset): mixed
{
return $this->$offset;
}
Expand All @@ -886,7 +885,7 @@ public function offsetGet($offset): mixed
* @param mixed $value
* @return void
*/
public function offsetSet($offset, $value): void
public function offsetSet(mixed $offset, mixed $value): void
{
$this->$offset = $value;
}
Expand All @@ -897,7 +896,7 @@ public function offsetSet($offset, $value): void
* @param mixed $offset
* @return void
*/
public function offsetUnset($offset): void
public function offsetUnset(mixed $offset): void
{
unset($this->$offset);
}
Expand Down
Loading