Skip to content

Commit

Permalink
⬆️ Laravel 10.x/PHP8.3 Upgrade (#153)
Browse files Browse the repository at this point in the history
* ⬆️ Upgrades Laravel to 10
* ⬆️ Upgrades to PHP 8.3
* 📌 Commits composer.lock
* 🩺 Suppresses false positives reported by Psalm
* 👷 Updates CI for PHP 8.3

---------

Co-authored-by: Wun Chiou <[email protected]>
  • Loading branch information
betsyecastro and wunc authored Jul 9, 2024
1 parent 9d9a3db commit b48663b
Show file tree
Hide file tree
Showing 12 changed files with 1,856 additions and 2,954 deletions.
2 changes: 1 addition & 1 deletion .github/actions/composer-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
php-version:
description: 'PHP version'
required: false
default: '8.0'
default: '8.3'
php-extensions:
description: 'PHP extensions to install'
required: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.0']
php-versions: ['8.3']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.0']
php-versions: ['8.3']

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion app/Helpers/Semester.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public static function parseName(string $name)

return [
'season' => $pieces[0],
'year' => Carbon::create($pieces[1]),
'year' => Carbon::create((int)$pieces[1]),
];
}

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Kernel extends HttpKernel
*
* @var array
*/
protected $routeMiddleware = [
protected $middlewareAliases = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
Expand Down
3 changes: 1 addition & 2 deletions app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ class AuthServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->registerPolicies();


//
}
}
10 changes: 7 additions & 3 deletions app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ class User extends Authenticatable implements Auditable
];

/** @var array User columns to auto-cast to Carbon instances */
protected $dates = ['created_at', 'updated_at', 'last_access'];
protected $casts = [
'last_access' => 'datetime',
'created_at' => 'datetime',
'updated_at' => 'datetime',
];

/** @var array The attributes excluded from the model's JSON form. */
protected $hidden = ['remember_token'];
Expand Down Expand Up @@ -378,7 +382,7 @@ public function delegates()

/**
* Current user delegates.
*
* @psalm-suppress InvalidArgument
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function currentDelegates()
Expand Down Expand Up @@ -427,7 +431,7 @@ public function delegators()

/**
* Current user delegators.
*
* @psalm-suppress InvalidArgument
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public function currentDelegators()
Expand Down
24 changes: 12 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,37 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^8.0.2",
"php": "^8.3.0",
"adldap2/adldap2-laravel": "^6.0.8",
"doctrine/dbal": "^2.10.0",
"doctrine/dbal": "^3.2",
"guzzlehttp/guzzle": "^7.4.5",
"laravel/framework": "^9.2",
"laravel/framework": "^10.0",
"laravel/tinker": "^2.7",
"laravel/ui": "^3.0",
"laravel/ui": "^4.0",
"laravelcollective/html": "^6.3.0",
"league/flysystem-aws-s3-v3": "^3.0",
"livewire/livewire": "^2.10",
"owen-it/laravel-auditing": "^13.0",
"predis/predis": "^1.1",
"sentry/sentry-laravel": "^2.3.1",
"sentry/sentry-laravel": "^3.2.0",
"spatie/browsershot": "^3.57",
"spatie/laravel-backup": "^8.1",
"spatie/laravel-medialibrary": "^10.3.6",
"spatie/laravel-tags": "^4.3.2",
"stevebauman/purify": "^4.0.1"
"stevebauman/purify": "^5.1.1"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.6",
"beyondcode/laravel-dump-server": "^1.0",
"fakerphp/faker": "^1.9.1",
"laravel/telescope": "^4.9",
"laravel/telescope": "^4.12.0",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.0",
"psalm/plugin-laravel": "^2.0",
"spatie/laravel-ignition": "^1.0",
"spatie/laravel-ignition": "^2.0",
"sunra/php-simple-html-dom-parser": "1.5.1",
"vimeo/psalm": "^4.23"
"vimeo/psalm": "^5.0.0"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -77,6 +77,6 @@
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true
}
Loading

0 comments on commit b48663b

Please sign in to comment.