Skip to content

Commit e7864ea

Browse files
committed
Merge branch 'main' into arma-reforger-main
2 parents cd16777 + c2ca0f6 commit e7864ea

27 files changed

Lines changed: 462 additions & 49 deletions

File tree

.github/workflows/lint.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
pint:
11+
name: Pint
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: 8.4
22+
tools: composer:v2
23+
coverage: none
24+
25+
- name: Init composer
26+
run: composer init --no-interaction
27+
28+
- name: Install Laravel Pint
29+
run: composer require "laravel/pint:^1.15.3"
30+
31+
- name: Run Pint
32+
run: vendor/bin/pint --test
33+
phpstan:
34+
name: PHPStan
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Checkout code
39+
uses: actions/checkout@v4
40+
41+
- name: Clone Pelican Panel
42+
run: git clone --depth=1 https://github.com/pelican-dev/panel pelican
43+
44+
- name: Setup PHP
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: 8.4
48+
tools: composer:v2
49+
coverage: none
50+
51+
- name: Install panel dependencies
52+
run: |
53+
cd pelican
54+
composer install --no-interaction --no-suggest --no-progress --no-scripts
55+
56+
- name: Install plugin dependencies
57+
run: |
58+
cd pelican
59+
composer require "stripe/stripe-php:^18.0" "kovah/laravel-socialite-oidc:^0.5" "krymosoftware/gameq:^4.0"
60+
61+
- name: Setup .env file
62+
run: cp pelican/.env.example pelican/.env
63+
64+
- name: Move plugin folders and phpstan.neon
65+
run: |
66+
mkdir -p pelican/plugins
67+
rsync -av --progress ./ pelican/plugins/ --exclude=pelican
68+
cp phpstan.neon pelican/phpstan.neon
69+
70+
- name: Run PHPStan Analysis
71+
run: |
72+
cd pelican
73+
vendor/bin/phpstan analyse --memory-limit=-1 --error-format=github
74+

.github/workflows/pint.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ A curated list of plugins for the [Pelican Panel](https://pelican.dev). Feel fre
1414
- [Legal Pages](/legal-pages) - Adds legal pages (Imprint, Privacy Policy, ToS) to the panel
1515
- [MCLogs Uploader](/mclogs-uploader) - Upload console logs to mclo.gs
1616
- [Minecraft Modrinth](/minecraft-modrinth) - Download Minecraft mods & plugins from Modrinth
17+
- [PasteFox Share](/pastefox-share) - Share console logs via pastefox.com
1718
- [Player Counter](/player-counter) - Show connected players count for game servers
1819
- [Register](/register) - Enable user self-registration on all panels
1920
- [Robo Avatars](/robo-avatars) - Adds RoboHash as avatar provider

billing/src/Filament/App/Widgets/ProductWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ProductWidget extends Widget implements HasActions, HasSchemas
2222
use InteractsWithActions;
2323
use InteractsWithSchemas;
2424

25-
protected string $view = 'billing::widget';
25+
protected string $view = 'billing::widget'; // @phpstan-ignore property.defaultValue
2626

2727
public ?Product $product = null;
2828

billing/src/Models/Coupon.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected static function boot(): void
5454
static::deleted(function (self $model) {
5555
if (!is_null($model->stripe_coupon_id)) {
5656
/** @var StripeClient $stripeClient */
57-
$stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
57+
$stripeClient = app(StripeClient::class);
5858

5959
$stripeClient->coupons->delete($model->stripe_coupon_id);
6060
$stripeClient->coupons->delete($model->stripe_promotion_id);
@@ -65,7 +65,7 @@ protected static function boot(): void
6565
public function sync(): void
6666
{
6767
/** @var StripeClient $stripeClient */
68-
$stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
68+
$stripeClient = app(StripeClient::class);
6969

7070
if (is_null($this->stripe_coupon_id)) {
7171
$data = [

billing/src/Models/Order.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function checkExpire(): bool
7575
if ($this->status === OrderStatus::Active && !is_null($this->expires_at) && now('UTC') >= $this->expires_at) {
7676
try {
7777
if ($this->server) {
78-
app(SuspensionService::class)->handle($this->server, SuspendAction::Suspend); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
78+
app(SuspensionService::class)->handle($this->server, SuspendAction::Suspend);
7979
}
8080
} catch (Exception $exception) {
8181
report($exception);
@@ -98,7 +98,7 @@ private function expireCheckoutSession(): void
9898
{
9999
if (!is_null($this->stripe_checkout_id)) {
100100
/** @var StripeClient $stripeClient */
101-
$stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
101+
$stripeClient = app(StripeClient::class);
102102

103103
$session = $stripeClient->checkout->sessions->retrieve($this->stripe_checkout_id);
104104

@@ -111,7 +111,7 @@ private function expireCheckoutSession(): void
111111
public function getCheckoutSession(): Session
112112
{
113113
/** @var StripeClient $stripeClient */
114-
$stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
114+
$stripeClient = app(StripeClient::class);
115115

116116
if (is_null($this->stripe_checkout_id)) {
117117
$session = $stripeClient->checkout->sessions->create([
@@ -165,7 +165,7 @@ public function activate(?string $stripePaymentId): void
165165

166166
try {
167167
if ($this->server) {
168-
app(SuspensionService::class)->handle($this->server, SuspendAction::Unsuspend); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
168+
app(SuspensionService::class)->handle($this->server, SuspendAction::Unsuspend);
169169
} else {
170170
$this->createServer();
171171
}
@@ -178,7 +178,7 @@ public function close(): void
178178
{
179179
try {
180180
if ($this->server) {
181-
app(SuspensionService::class)->handle($this->server, SuspendAction::Suspend); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
181+
app(SuspensionService::class)->handle($this->server, SuspendAction::Suspend);
182182
}
183183
} catch (Exception $exception) {
184184
report($exception);
@@ -228,7 +228,7 @@ public function createServer(): Server
228228
$object->setTags($product->tags);
229229
$object->setPorts($product->ports);
230230

231-
$server = app(ServerCreationService::class)->handle($data, $object); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
231+
$server = app(ServerCreationService::class)->handle($data, $object);
232232

233233
$this->update([
234234
'server_id' => $server->id,

billing/src/Models/Product.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected static function boot(): void
7474
static::deleted(function (self $model) {
7575
if (!is_null($model->stripe_id)) {
7676
/** @var StripeClient $stripeClient */
77-
$stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
77+
$stripeClient = app(StripeClient::class);
7878

7979
$stripeClient->products->delete($model->stripe_id);
8080
}
@@ -99,7 +99,7 @@ public function getLabel(): string
9999
public function sync(): void
100100
{
101101
/** @var StripeClient $stripeClient */
102-
$stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
102+
$stripeClient = app(StripeClient::class);
103103

104104
if (is_null($this->stripe_id)) {
105105
$stripeProduct = $stripeClient->products->create([

billing/src/Models/ProductPrice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function sync(): void
6565
$this->product->sync();
6666

6767
/** @var StripeClient $stripeClient */
68-
$stripeClient = app(StripeClient::class); // @phpstan-ignore myCustomRules.forbiddenGlobalFunctions
68+
$stripeClient = app(StripeClient::class);
6969

7070
if (is_null($this->stripe_id)) {
7171
$stripePrice = $stripeClient->prices->create([

minecraft-modrinth/src/Enums/MinecraftLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public function getLabel(): string
2222

2323
public static function fromServer(Server $server): ?MinecraftLoader
2424
{
25+
$server->loadMissing('egg');
26+
2527
$tags = $server->egg->tags ?? [];
2628

2729
return self::fromTags($tags);

minecraft-modrinth/src/Enums/ModrinthProjectType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function getFolder(): string
2828

2929
public static function fromServer(Server $server): ?ModrinthProjectType
3030
{
31+
$server->loadMissing('egg');
32+
3133
$features = $server->egg->features ?? [];
3234
$tags = $server->egg->tags ?? [];
3335

0 commit comments

Comments
 (0)