Skip to content

Commit

Permalink
⬆️ upgrade to Laravel v11 (#3004)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKrisKrisu authored Dec 31, 2024
2 parents 8ef4644 + 870dad4 commit 1ce1fb5
Show file tree
Hide file tree
Showing 12 changed files with 429 additions and 361 deletions.
12 changes: 3 additions & 9 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions .idea/trwl.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/DataProviders/CachedHafas.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getDepartures(Station $station, Carbon $when, int $duration = 15
$when = clone $when;
$when->subMinutes(2);
// set cache when minutes to 0, 15, 30 or 45
$when->minute = floor($when->minute / 15) * 15;
$when->minute = (int) (floor($when->minute / 15) * 15);
$when->second = 0;

// set duration longer than 15 minutes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public static function refreshDistanceAndPoints(Status $status, bool $resetPolyl
public static function calculateCheckinDuration(Checkin $checkin, bool $update = true): int {
$departure = $checkin->manual_departure ?? $checkin->originStopover->departure ?? $checkin->departure;
$arrival = $checkin->manual_arrival ?? $checkin->destinationStopover->arrival ?? $checkin->arrival;
$duration = $arrival->diffInMinutes($departure);
$duration = $departure->diffInMinutes($arrival);
//don't use eloquent here, because it would trigger the observer (and this function) again
if ($update) {
DB::table('train_checkins')->where('id', $checkin->id)->update(['duration' => $duration]);
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"guzzlehttp/guzzle": "^7.1",
"intervention/image": "^3.5",
"jenssegers/agent": "^2.6",
"laravel/framework": "^10.0",
"laravel/framework": "^11.0",
"laravel/passport": "^12.0",
"laravel/socialite": "^5.0",
"laravel/tinker": "^2.0",
Expand All @@ -40,7 +40,7 @@
"spatie/laravel-activitylog": "^4.7",
"spatie/laravel-permission": "^6.1",
"spatie/laravel-prometheus": "^1.0",
"spatie/laravel-sitemap": "^7.0",
"spatie/laravel-sitemap": "^7.2.1",
"spatie/laravel-validation-rules": "^3.2",
"spatie/laravel-webhook-server": "^3.4",
"trwl/socialite-mastodon": "^1.2"
Expand All @@ -53,7 +53,7 @@
"fakerphp/faker": "^1.9",
"filp/whoops": "^2.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^7.0",
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^10.0",
"roave/security-advisories": "dev-latest",
"spatie/laravel-ignition": "2.8.0"
Expand Down
Loading

0 comments on commit 1ce1fb5

Please sign in to comment.