Skip to content

Commit fc469e6

Browse files
committed
feat: Upgrade to Laravel 13
1 parent e08e917 commit fc469e6

8 files changed

Lines changed: 2926 additions & 2319 deletions

File tree

app/Domains/Contact/Dav/Web/Backend/CardDAV/CardDAVBackend.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
use Sabre\CardDAV\Backend\SyncSupport;
2929
use Sabre\CardDAV\Plugin as CardDav;
3030
use Sabre\DAV;
31+
use Sabre\DAV\PropPatch;
3132
use Sabre\DAV\Server as SabreServer;
3233
use Sabre\DAV\Sync\Plugin as DAVSyncPlugin;
3334
use Sabre\VObject\Component\VCard;
@@ -281,7 +282,7 @@ public function getObjectUuid(?string $collectionId, string $uuid): ?VCardResour
281282
/**
282283
* Returns the collection of all active contacts.
283284
*
284-
* @return \Illuminate\Support\Collection<array-key,IDavResource>
285+
* @return Collection<array-key,IDavResource>
285286
*/
286287
public function getObjects(?string $collectionId): Collection
287288
{
@@ -300,15 +301,13 @@ public function getObjects(?string $collectionId): Collection
300301
)
301302
->flatten();
302303

303-
$result = $contacts->merge($groups);
304-
305-
return $result;
304+
return $contacts->merge($groups); // @phpstan-ignore return.type
306305
}
307306

308307
/**
309308
* Returns the collection of deleted contacts.
310309
*
311-
* @return \Illuminate\Support\Collection<array-key,IDavResource>
310+
* @return Collection<array-key,IDavResource>
312311
*/
313312
public function getDeletedObjects(?string $collectionId): Collection
314313
{
@@ -328,7 +327,7 @@ public function getDeletedObjects(?string $collectionId): Collection
328327
)
329328
->flatten();
330329

331-
return $contacts->merge($groups);
330+
return $contacts->merge($groups); // @phpstan-ignore return.type
332331
}
333332

334333
/**
@@ -501,9 +500,8 @@ public function deleteCard($addressBookId, $cardUri): bool
501500
* Read the PropPatch documentation for more info and examples.
502501
*
503502
* @param string $addressBookId
504-
* @param \Sabre\DAV\PropPatch $propPatch
505503
*/
506-
public function updateAddressBook($addressBookId, DAV\PropPatch $propPatch): ?bool
504+
public function updateAddressBook($addressBookId, PropPatch $propPatch): ?bool
507505
{
508506
return null;
509507
}

app/Domains/Contact/DavClient/Services/Utils/AddressBookSynchronizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ private function getDistantChanges(): Collection
158158
$deleted = $data->filter(fn ($contact): bool => is_array($contact) && $contact['status'] === '404')
159159
->map(fn (array $contact, string $href): ContactDto => new ContactDeleteDto($href));
160160

161-
return $updated->merge($deleted); // @phpstan-ignore argument.type
161+
return $updated->merge($deleted);
162162
}
163163

164164
/**
@@ -179,7 +179,7 @@ private function getAllContactsEtag(): Collection
179179
$deleted = $data->filter(fn ($contact): bool => is_array($contact) && $contact['status'] === '404')
180180
->map(fn (array $contact, string $href): ContactDto => new ContactDeleteDto($href));
181181

182-
return $updated->merge($deleted); // @phpstan-ignore argument.type
182+
return $updated->merge($deleted);
183183
}
184184

185185
/**

app/Domains/Contact/ManageTasks/Web/ViewHelpers/ModuleContactTasksViewHelper.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ class ModuleContactTasksViewHelper
1212
{
1313
public static function data(Contact $contact, User $user): array
1414
{
15-
$tasks = $contact->tasks() // @phpstan-ignore method.notFound
16-
->notCompleted()
15+
$tasks = $contact->tasks()
16+
->notCompleted() // @phpstan-ignore method.notFound
1717
->orderBy('id', 'desc')
1818
->get();
1919

2020
$tasksCollection = $tasks->map(fn ($task) => self::dtoTask($contact, $task, $user));
2121

22-
$completedTasksCount = $contact->tasks() // @phpstan-ignore method.notFound
23-
->completed()
22+
$completedTasksCount = $contact->tasks()
23+
->completed() // @phpstan-ignore method.notFound
2424
->count();
2525

2626
return [
@@ -41,8 +41,8 @@ public static function data(Contact $contact, User $user): array
4141

4242
public static function completed(Contact $contact, User $user): Collection
4343
{
44-
return $contact->tasks() // @phpstan-ignore method.notFound
45-
->completed()
44+
return $contact->tasks()
45+
->completed() // @phpstan-ignore method.notFound
4646
->orderBy('completed_at', 'desc')
4747
->get()
4848
->map(fn ($task) => self::dtoTask($contact, $task, $user));

app/Domains/Settings/ManageNotificationChannels/Web/Controllers/TelegramWebhookController.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@
77
use App\Models\UserNotificationChannel;
88
use Exception;
99
use Illuminate\Http\Request;
10+
use Illuminate\Http\Response;
1011
use Illuminate\Support\Str;
1112

1213
class TelegramWebhookController extends Controller
1314
{
1415
/**
1516
* Store Telegram Chat ID from telegram webhook message.
1617
*
17-
* @return \Illuminate\Http\Response
18+
* @return Response
1819
*/
1920
public function store(Request $request)
2021
{
2122
try {
2223
$messageText = $request->message['text'];
23-
} catch (Exception $e) { /** @phpstan-ignore-line */
24-
return response()->json([
24+
} catch (Exception $e) {
25+
return response()->json([ // @phpstan-ignore return.type
2526
'code' => $e->getCode(),
2627
'message' => 'Accepted with error: \''.$e->getMessage().'\'',
2728
], 202);

app/Models/File.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class File extends Model
4949
/**
5050
* The event map for the model.
5151
*
52-
* @var array
52+
* @var array<string, class-string>
5353
*/
5454
protected $dispatchesEvents = [
5555
'deleted' => FileDeleted::class,
@@ -58,7 +58,7 @@ class File extends Model
5858
/**
5959
* Get the vault associated with the file.
6060
*
61-
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\Vault, $this>
61+
* @return BelongsTo<Vault, $this>
6262
*/
6363
public function vault(): BelongsTo
6464
{

composer.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
"ext-fileinfo": "*",
1515
"ext-intl": "*",
1616
"asbiin/laravel-localizer": "^4.0",
17-
"asbiin/laravel-sentry-tunnel": "^2.0",
17+
"asbiin/laravel-sentry-tunnel": "^2.4",
1818
"asbiin/laravel-webauthn": "^5.3",
1919
"doctrine/dbal": "^4.1",
2020
"guzzlehttp/guzzle": "^7.4",
2121
"http-interop/http-factory-guzzle": "^1.2",
2222
"inertiajs/inertia-laravel": "^2.0",
2323
"knuckleswtf/scribe": "^5.1",
24-
"laravel-notification-channels/telegram": "^6.0",
24+
"laravel-notification-channels/telegram": "^7.0",
2525
"laravel/fortify": "^1.25",
26-
"laravel/framework": "^12.0",
26+
"laravel/framework": "^13.0",
2727
"laravel/jetstream": "^5.0",
2828
"laravel/nightwatch": "^1.11",
2929
"laravel/pulse": "^1.4",
@@ -45,18 +45,18 @@
4545
"socialiteproviders/microsoft-azure": "^5.1",
4646
"stevebauman/location": "^7.0",
4747
"thecodingmachine/safe": "^3.0",
48-
"tightenco/ziggy": "2.5.3",
48+
"tightenco/ziggy": "2.6.2",
4949
"typesense/typesense-php": "^5.0",
5050
"uploadcare/uploadcare-php": "^4.1"
5151
},
5252
"require-dev": {
53-
"amirami/localizator": "^0.14.0-alpha",
54-
"barryvdh/laravel-debugbar": "^3.7",
53+
"barryvdh/laravel-debugbar": "^4.2",
5554
"barryvdh/laravel-ide-helper": "^3.0",
5655
"brianium/paratest": "^7.0",
5756
"fakerphp/faker": "^1.23",
5857
"larastan/larastan": "^3.1",
5958
"laravel-lang/common": "^6.0",
59+
"laravel/boost": "^2.0",
6060
"laravel/pint": "^1.13",
6161
"laravel/sail": "^1.41",
6262
"laravel/telescope": "^5.10",
@@ -67,8 +67,7 @@
6767
"roave/security-advisories": "dev-master",
6868
"spatie/laravel-ignition": "^2.4",
6969
"stichoza/google-translate-php": "^5.1",
70-
"thecodingmachine/phpstan-safe-rule": "^1.4",
71-
"tomasvotruba/bladestan": "^0"
70+
"thecodingmachine/phpstan-safe-rule": "^1.4"
7271
},
7372
"autoload": {
7473
"psr-4": {

0 commit comments

Comments
 (0)