Skip to content

Commit d474ee3

Browse files
committed
update: php8.4 support
- makes unit3d php8.4 + required - fixes multiple implicitly to explicit nullable type - dependency updates - github action updates - carbon 2 needs to move to carbon 3 in separate pr
1 parent 0356b4c commit d474ee3

14 files changed

+184
-461
lines changed

Diff for: .github/workflows/compile-assets-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ jobs:
77
operating-system:
88
- ubuntu-22.04
99
php-version:
10-
- '8.3'
10+
- '8.4'
1111
name: ${{ matrix.operating-system }}
1212
runs-on: ${{ matrix.operating-system }}
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18-
- name: Setup PHP 8.3
18+
- name: Setup PHP 8.4
1919
uses: shivammathur/setup-php@v2
2020
with:
2121
php-version: ${{ matrix.php-version }}

Diff for: .github/workflows/larastan.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
operating-system:
88
- ubuntu-22.04
99
php-version:
10-
- '8.3'
10+
- '8.4'
1111
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
1212
services:
1313
mysql:
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/checkout@v4
3434
with:
3535
fetch-depth: 0
36-
- name: Setup PHP 8.3
36+
- name: Setup PHP 8.4
3737
uses: shivammathur/setup-php@v2
3838
with:
3939
php-version: ${{ matrix.php-version }}

Diff for: .github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ jobs:
77
operating-system:
88
- ubuntu-22.04
99
php-version:
10-
- '8.3'
10+
- '8.4'
1111
name: ${{ matrix.operating-system }}
1212
runs-on: ${{ matrix.operating-system }}
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
18-
- name: Setup PHP 8.3
18+
- name: Setup PHP 8.4
1919
uses: shivammathur/setup-php@v2
2020
with:
2121
php-version: ${{ matrix.php-version }}

Diff for: .github/workflows/phpunit-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
operating-system:
99
- ubuntu-22.04
1010
php-version:
11-
- '8.3'
11+
- '8.4'
1212
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }}
1313
services:
1414
mysql:
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/checkout@v4
3535
with:
3636
fetch-depth: 0
37-
- name: Setup PHP 8.3
37+
- name: Setup PHP 8.4
3838
uses: shivammathur/setup-php@v2
3939
with:
4040
php-version: ${{ matrix.php-version }}

Diff for: app/Console/Commands/GitUpdater.php

+7-16
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ final public function handle(): void
7676
');
7777

7878
$this->line('<fg=cyan>
79-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
80-
81-
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
82-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
83-
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) EVEN IF ADVISED OF THE POSSIBILITY
79+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
80+
81+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
82+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
83+
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) EVEN IF ADVISED OF THE POSSIBILITY
8484
OF SUCH DAMAGE.
85-
85+
8686
WITH THAT SAID YOU CAN BE GUARANTEED THAT YOUR DATABASE WILL NOT BE ALTERED.
87-
87+
8888
<fg=red>BY PROCEEDING YOU AGREE TO THE ABOVE DISCLAIMER! USE AT YOUR OWN RISK!</>
8989
</>');
9090

@@ -154,8 +154,6 @@ private function update(): void
154154
$this->composer();
155155
}
156156

157-
$this->clearComposerCache();
158-
159157
$this->updateUNIT3DConfig();
160158

161159
$this->setCache();
@@ -309,13 +307,6 @@ private function updateUNIT3DConfig(): void
309307
$this->done();
310308
}
311309

312-
private function clearComposerCache(): void
313-
{
314-
$this->header('Clearing Composer Cache');
315-
$this->process('composer clear-cache --no-interaction --ansi --verbose');
316-
$this->done();
317-
}
318-
319310
private function clearCache(): void
320311
{
321312
$this->header('Clearing Application Cache');

Diff for: app/DTO/TorrentSearchFiltersDTO.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
private ?User $user;
2929

3030
public function __construct(
31-
User $user = null,
31+
?User $user = null,
3232
private string $name = '',
3333
private string $description = '',
3434
private string $mediainfo = '',

Diff for: app/Exceptions/TrackerException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class TrackerException extends Exception
8080
/**
8181
* TrackerException constructor.
8282
*/
83-
public function __construct(int $code = 999, array $replace = null, Throwable $throwable = null)
83+
public function __construct(int $code = 999, ?array $replace = null, ?Throwable $throwable = null)
8484
{
8585
$message = self::ERROR_MSG[$code];
8686

Diff for: app/Helpers/Markdown.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ protected function blockHeader($Line)
517517
//
518518
// List
519519

520-
protected function blockList($Line, array $CurrentBlock = null)
520+
protected function blockList($Line, ?array $CurrentBlock = null)
521521
{
522522
[$name, $pattern] = $Line['text'][0] <= '-' ? ['ul', '[*+-]'] : ['ol', '[0-9]{1,9}+[.\)]'];
523523

@@ -721,7 +721,7 @@ protected function blockRule($Line)
721721
//
722722
// Setext
723723

724-
protected function blockSetextHeader($Line, array $Block = null)
724+
protected function blockSetextHeader($Line, ?array $Block = null)
725725
{
726726
if (!isset($Block) || $Block['type'] !== 'Paragraph' || isset($Block['interrupted'])) {
727727
return;
@@ -796,7 +796,7 @@ protected function blockReference($Line)
796796
//
797797
// Table
798798

799-
protected function blockTable($Line, array $Block = null)
799+
protected function blockTable($Line, ?array $Block = null)
800800
{
801801
if (!isset($Block) || $Block['type'] !== 'Paragraph' || isset($Block['interrupted'])) {
802802
return;

Diff for: app/Helpers/MarkdownExtra.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ protected function blockMarkupComplete($Block)
287287
//
288288
// Setext
289289

290-
protected function blockSetextHeader($Line, array $Block = null)
290+
protected function blockSetextHeader($Line, ?array $Block = null)
291291
{
292292
$Block = parent::blockSetextHeader($Line, $Block);
293293

Diff for: app/Http/Livewire/BbcodeInput.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class BbcodeInput extends Component
3333

3434
public string $contentHtml = '';
3535

36-
final public function mount(string $name, string $label, bool $required = false, string $content = null): void
36+
final public function mount(string $name, string $label, bool $required = false, ?string $content = null): void
3737
{
3838
$this->name = $name;
3939
$this->label = $label;

Diff for: app/Models/Torrent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ public function notifyUploader(string $type, Thank|Comment $payload): bool
806806
/**
807807
* Torrent Is Freeleech.
808808
*/
809-
public function isFreeleech(User $user = null): bool
809+
public function isFreeleech(?User $user = null): bool
810810
{
811811
$pfree = $user && ($user->group->is_freeleech || cache()->get('personal_freeleech:'.$user->id));
812812

Diff for: composer.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
"license": "MIT",
99
"type": "project",
1010
"require": {
11-
"php": ">=8.3",
11+
"php": ">=8.4",
1212
"ext-dom": "*",
1313
"ext-json": "*",
1414
"ext-libxml": "*",
1515
"ext-zend-opcache": "*",
1616
"ext-zip": "*",
1717
"assada/laravel-achievements": "^2.7",
1818
"bjeavons/zxcvbn-php": "^1.4.1",
19-
"doctrine/dbal": "^3.9.3",
19+
"doctrine/dbal": "^3.9.4",
2020
"gabrielelana/byte-units": "^0.5.0",
2121
"graham-campbell/markdown": "^15.2",
2222
"guzzlehttp/guzzle": "^7.9.2",
@@ -25,9 +25,9 @@
2525
"intervention/image": "^2.7.2",
2626
"joypixels/assets": "^v7.0.1",
2727
"laravel/fortify": "1.20.0",
28-
"laravel/framework": "^11.36.1",
28+
"laravel/framework": "^11.38.2",
2929
"laravel/octane": "^2.6.0",
30-
"laravel/scout": "^10.11.9",
30+
"laravel/scout": "^10.12.0",
3131
"laravel/tinker": "^2.10.0",
3232
"livewire/livewire": "^3.5.18",
3333
"marcreichel/igdb-laravel": "^4.3.0",
@@ -50,15 +50,15 @@
5050
"calebdw/larastan-livewire": "^v1.1.0",
5151
"fakerphp/faker": "^1.24.1",
5252
"jasonmccreary/laravel-test-assertions": "^2.4.1",
53-
"laravel/pint": "v1.18.3",
54-
"laravel/sail": "^1.39.1",
53+
"laravel/pint": "v1.20.0",
54+
"laravel/sail": "^1.40.0",
5555
"mockery/mockery": "^1.6.12",
5656
"nunomaduro/collision": "^8.5.0",
57-
"pestphp/pest": "^3.7.1",
57+
"pestphp/pest": "^3.7.2",
5858
"pestphp/pest-plugin-laravel": "^3.0",
5959
"pestphp/pest-plugin-livewire": "^3.0",
60-
"phpstan/phpstan": "^1.12.13",
61-
"phpunit/phpunit": "^11.5.1",
60+
"phpstan/phpstan": "^1.12.15",
61+
"phpunit/phpunit": "^11.5.3",
6262
"ryoluo/sail-ssl": "^1.3.2",
6363
"spatie/laravel-ignition": "^2.9.0",
6464
"tomasvotruba/bladestan": "^0.5.0"

0 commit comments

Comments
 (0)