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

feat: add Tests for PHP 8.4, fix deprecations for PHP 8.4 #2

Merged
merged 1 commit into from
Nov 22, 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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
php: [8.1, 8.2, 8.3, 8.4]
dependency-version: [prefer-stable]
os: [ubuntu-latest]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -42,7 +42,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
4 changes: 2 additions & 2 deletions src/CasesCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function toArray(): array
* @param (callable(TValue, array-key): bool)|null $callback
* @return ?TValue
*/
public function first(callable $callback = null): mixed
public function first(callable|null $callback = null): mixed
{
$callback ??= fn() => true;

Expand Down Expand Up @@ -159,7 +159,7 @@ public function values(): array
* @param (callable(TValue): array-key)|string|null $key
* @return array<array-key, TPluckValue>
*/
public function pluck(callable|string $value, callable|string $key = null): array
public function pluck(callable|string $value, callable|string|null $key = null): array
{
$result = [];

Expand Down
4 changes: 2 additions & 2 deletions src/Concerns/CollectsCases.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function count(): int
*
* @param (callable(self, array-key): bool)|null $callback
*/
public static function first(callable $callback = null): ?self
public static function first(callable|null $callback = null): ?self
{
return self::collect()->first($callback);
}
Expand Down Expand Up @@ -66,7 +66,7 @@ public static function values(): array
* @param (callable(self): array-key)|string|null $key
* @return array<array-key, TPluckValue>
*/
public static function pluck(callable|string $value, callable|string $key = null): array
public static function pluck(callable|string $value, callable|string|null $key = null): array
{
return self::collect()->pluck($value, $key);
}
Expand Down