Skip to content

Commit 77f1549

Browse files
authored
Merge branch 'filamentphp:main' into main
2 parents 63db25c + 34f4209 commit 77f1549

File tree

390 files changed

+7551
-3459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

390 files changed

+7551
-3459
lines changed

app/Actions/GetPluginsListData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class GetPluginsListData
1111
{
12-
public function __invoke(array $plugins = null): array
12+
public function __invoke(?array $plugins = null): array
1313
{
1414
return cache()->remember(
1515
$plugins ? ('plugins_' . implode(',', $plugins)) : 'plugins',

app/Enums/Version.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,25 @@
44

55
enum Version: string
66
{
7+
case Five = '5.x';
78
case Four = '4.x';
89
case Three = '3.x';
910
case Two = '2.x';
1011
case One = '1.x';
1112

1213
public static function getLatest(): self
1314
{
14-
return self::Four;
15+
return self::Five;
16+
}
17+
18+
public function getLabel(): string
19+
{
20+
return match ($this) {
21+
self::Five => 'v5',
22+
self::Four => 'v4',
23+
self::Three => 'v3',
24+
self::Two => 'v2',
25+
self::One => 'v1',
26+
};
1527
}
1628
}

app/Jobs/CheckIfIpIsVpn.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ class CheckIfIpIsVpn implements ShouldQueue
2323
*/
2424
public function __construct(
2525
public string $ip,
26-
) {
27-
}
26+
) {}
2827

2928
/**
3029
* Execute the job.

app/Models/Article.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function isCompatibleWithLatestVersion(): ?bool
7474
return null;
7575
}
7676

77-
return in_array(4, $this->versions);
77+
return in_array(5, $this->versions);
7878
}
7979

8080
public function getAuthor(): Author

app/Models/Plugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function scopeDraft(Builder $query, bool $condition = true): Builder
7878
return $query->where('is_draft', true);
7979
}
8080

81-
public function getDocUrl(string $version = null): ?string
81+
public function getDocUrl(?string $version = null): ?string
8282
{
8383
if (filled($this->docs_url)) {
8484
return $this->docs_url;
@@ -94,7 +94,7 @@ public function getDocUrl(string $version = null): ?string
9494
return null;
9595
}
9696

97-
public function getDocs(string $version = null): ?string
97+
public function getDocs(?string $version = null): ?string
9898
{
9999
if (filled($this->content)) {
100100
return $this->content;
@@ -177,7 +177,7 @@ public function getCategories(): Collection
177177

178178
public function isCompatibleWithLatestVersion(): bool
179179
{
180-
return in_array(4, $this->versions);
180+
return in_array(5, $this->versions);
181181
}
182182

183183
public function getAuthor(): Author

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ public function register(): void
2121
{
2222
$this->app->bind(
2323
'package-github-stars-stats',
24-
fn () => new PackageGitHubStarsStats(),
24+
fn () => new PackageGitHubStarsStats,
2525
);
2626

2727
$this->app->bind(
2828
'package-download-stats',
29-
fn () => new PackageDownloadStats(),
29+
fn () => new PackageDownloadStats,
3030
);
3131
}
3232

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@
8989
"allow-plugins": {
9090
"composer/package-versions-deprecated": true,
9191
"php-http/discovery": true
92+
},
93+
"platform": {
94+
"ext-pcntl": "7.1",
95+
"ext-posix": "7.1"
9296
}
9397
},
9498
"minimum-stability": "dev",

0 commit comments

Comments
 (0)