Skip to content

Commit

Permalink
Merge pull request #3 from ZanichelliEditore/BZR-63_update-laravel
Browse files Browse the repository at this point in the history
BZR-63 Laravel upgrade
  • Loading branch information
mikelina authored Sep 27, 2023
2 parents 8a88d6c + 659a5ca commit 1f897bd
Show file tree
Hide file tree
Showing 16 changed files with 1,299 additions and 1,345 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/tmp
.env
.phpunit.result.cache
.phpunit.cache
Homestead.json
Homestead.yaml
npm-debug.log
Expand All @@ -19,4 +20,4 @@ auth.json
/public/[0-9].js
/public/vendors*.js
/public/vendor/*
/public/build/*
/public/build/*
2 changes: 2 additions & 0 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('passport:purge')->dailyAt('3:00')->onOneServer();
$schedule->command('telescope:prune')->daily()->onOneServer();

$schedule->command('check:failed-jobs')->weekdays()->twiceDailyAt(9, 14)->onOneServer();
}

Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
Expand Down Expand Up @@ -87,7 +86,7 @@

class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
use AuthorizesRequests, ValidatesRequests;

const PAGINATION = 12;
}
6 changes: 3 additions & 3 deletions app/Http/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class Kernel extends HttpKernel
],

'api' => [
'throttle:1000,1',
'bindings',
\Illuminate\Routing\Middleware\ThrottleRequests::class . ':1000,1',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
];

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

Gate::define('board', function ($user, $permission) {
if (!in_array($permission, $user->permissions)) {
Log::error('403* ' . '{"content" :"User with id ' . $user->id . ' is not authorized (permission required:' . $permission . ')"}');
Expand All @@ -33,7 +31,6 @@ public function boot()
return true;
});

Passport::routes();
Passport::tokensExpireIn(now()->addMinutes(2));
Passport::refreshTokensExpireIn(now()->addDays(30));
}
Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
"php": "^8.1",
"darkaonline/l5-swagger": "^8.3",
"doctrine/dbal": "^3.0",
"fideloper/proxy": "^4.0",
"laravel/framework": "^9.0",
"laravel/framework": "^10.0",
"laravel/legacy-factories": "^1.1",
"laravel/passport": "^10.4.1",
"laravel/passport": "^11.0",
"laravel/telescope": "^4.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^4.0",
Expand All @@ -28,8 +27,8 @@
"fakerphp/faker": "^1.21",
"filp/whoops": "^2.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.0"
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.0"
},
"config": {
"optimize-autoloader": true,
Expand Down Expand Up @@ -58,7 +57,7 @@
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
Expand Down
Loading

0 comments on commit 1f897bd

Please sign in to comment.