Skip to content

Commit 772198f

Browse files
Merge pull request #14 from itsrafsanjani/feat/upgrade
feat: upgrade laravel from 9.x to 10.x
2 parents 02defe3 + a79e655 commit 772198f

13 files changed

+2453
-2964
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
- uses: shivammathur/setup-php@v2
1616
with:
17-
php-version: '8.0'
17+
php-version: '8.1'
1818
- uses: actions/checkout@v2
1919
- name: Copy .env
2020
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
@@ -23,7 +23,7 @@ jobs:
2323
- name: Generate key
2424
run: php artisan key:generate
2525
- name: Directory Permissions
26-
run: chmod -R 777 storage bootstrap/cache
26+
run: chmod -R 755 storage bootstrap/cache
2727
- name: Create Database
2828
run: |
2929
mkdir -p database

.gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
/.phpunit.cache
12
/node_modules
3+
/public/build
24
/public/hot
35
/public/storage
4-
/public/uploads
56
/storage/*.key
67
/vendor
78
.env
9+
.env.backup
10+
.env.production
811
.phpunit.result.cache
912
Homestead.json
1013
Homestead.yaml
14+
auth.json
1115
npm-debug.log
1216
yarn-error.log
17+
/.fleet
1318
/.idea
1419
/.vscode
20+
1521
/backup
1622
/storage/installed
1723
/packages

app/Http/Kernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Kernel extends HttpKernel
5454
*
5555
* @var array
5656
*/
57-
protected $routeMiddleware = [
57+
protected $middlewareAliases = [
5858
'auth' => \App\Http\Middleware\Authenticate::class,
5959
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
6060
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,

app/Models/Comment.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Models;
44

5+
use Exception;
56
use Haruncpi\LaravelUserActivity\Traits\Loggable;
67
use Illuminate\Database\Eloquent\Factories\HasFactory;
78
use Illuminate\Database\Eloquent\Model;
@@ -12,8 +13,10 @@ class Comment extends Model
1213
use HasFactory, HasEagerLimit, Loggable;
1314

1415
protected $fillable = [
15-
'comment',
16+
'commentable_id',
17+
'commentable_type',
1618
'user_id',
19+
'comment',
1720
'is_approved',
1821
];
1922

@@ -54,6 +57,9 @@ public function disapprove()
5457
return $this;
5558
}
5659

60+
/**
61+
* @throws Exception
62+
*/
5763
protected function getAuthModelName()
5864
{
5965
if (config('comments.user_model')) {

app/Providers/AuthServiceProvider.php

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class AuthServiceProvider extends ServiceProvider
2424
*/
2525
public function boot()
2626
{
27-
$this->registerPolicies();
28-
2927
//
3028
}
3129
}

composer.json

+13-14
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,37 @@
88
],
99
"license": "MIT",
1010
"require": {
11-
"php": "^8.0.2",
11+
"php": "^8.1",
1212
"ext-bcmath": "*",
1313
"ext-gd": "*",
1414
"ext-gmp": "*",
1515
"ext-json": "*",
1616
"ext-pdo": "*",
17-
"artesaos/seotools": "^0.22",
17+
"artesaos/seotools": "^1.2",
1818
"ashallendesign/short-url": "^7.1",
1919
"bavix/laravel-wallet": "^9.3",
2020
"beyondcode/laravel-comments": "^1.3",
2121
"dgvai/laravel-sslcommerz": "^1.0",
2222
"famdirksen/laravel-referral": "dev-master",
2323
"haruncpi/laravel-user-activity": "^1.0",
24-
"jamesmills/laravel-notification-rate-limit": "dev-master",
25-
"jordanmiguel/laravel-popular": "1.0.10",
26-
"laravel/framework": "^9.31",
27-
"laravel/telescope": "^4.9",
24+
"jamesmills/laravel-notification-rate-limit": "^2.0",
25+
"jordanmiguel/laravel-popular": "dev-master",
26+
"laravel/framework": "^10.0",
27+
"laravel/telescope": "^5.0",
2828
"laravel/tinker": "^2.7",
29-
"laravel/ui": "^3.4",
29+
"laravel/ui": "^4.0",
3030
"munafio/chatify": "dev-master",
3131
"opcodesio/log-viewer": "^1.3",
3232
"overtrue/laravel-follow": "^5.0",
3333
"overtrue/laravel-like": "^5.0",
34-
"rachidlaasri/laravel-installer": "^4.1",
3534
"sightengine/client-php": "dev-master",
3635
"spatie/browsershot": "^3.57",
3736
"spatie/laravel-medialibrary": "^10.4",
3837
"spatie/laravel-pjax": "^2.2",
3938
"staudenmeir/eloquent-eager-limit": "^1.7",
4039
"tanmuhittin/laravel-google-translate": "^2.1",
4140
"yajra/laravel-datatables": "^9.0",
42-
"yoelpc4/laravel-cloudinary": "^3.0"
41+
"yoelpc4/laravel-cloudinary": "^4.0"
4342
},
4443
"require-dev": {
4544
"barryvdh/laravel-ide-helper": "^2.12",
@@ -48,16 +47,16 @@
4847
"fakerphp/faker": "^1.20",
4948
"laravel/pint": "^1.1",
5049
"mockery/mockery": "^1.5",
51-
"nunomaduro/collision": "^6.3",
52-
"phpunit/phpunit": "^9.5",
53-
"spatie/laravel-ignition": "^1.4"
50+
"nunomaduro/collision": "^7.0",
51+
"phpunit/phpunit": "^10.0",
52+
"spatie/laravel-ignition": "^2.0"
5453
},
5554
"config": {
5655
"optimize-autoloader": true,
5756
"preferred-install": "dist",
5857
"sort-packages": true,
5958
"platform": {
60-
"php": "8.0.2"
59+
"php": "8.1.0"
6160
}
6261
},
6362
"extra": {
@@ -91,7 +90,7 @@
9190
},
9291
{
9392
"type": "vcs",
94-
"url": "[email protected]:itsrafsanjani/laravel-notification-rate-limit.git"
93+
"url": "[email protected]:itsrafsanjani/laravel-popular.git"
9594
},
9695
{
9796
"type": "vcs",

0 commit comments

Comments
 (0)