mirror of
https://github.com/phpmon/website
synced 2025-08-06 22:30:09 +02:00
Upgrade to Laravel 11
This commit is contained in:
@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace App\Console;
|
|
||||||
|
|
||||||
use App\Commands\RetrieveGitHubStats;
|
|
||||||
use Illuminate\Console\Scheduling\Schedule;
|
|
||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
||||||
|
|
||||||
class Kernel extends ConsoleKernel
|
|
||||||
{
|
|
||||||
#[\Override]
|
|
||||||
protected function schedule(Schedule $schedule): void
|
|
||||||
{
|
|
||||||
$schedule->command(RetrieveGitHubStats::class)
|
|
||||||
->everySixHours();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[\Override]
|
|
||||||
protected function commands(): void
|
|
||||||
{
|
|
||||||
$this->load(__DIR__ . '/../Commands');
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace App\Http;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
|
||||||
|
|
||||||
final class Kernel extends HttpKernel
|
|
||||||
{
|
|
||||||
protected $middleware = [
|
|
||||||
\Illuminate\Http\Middleware\TrustProxies::class,
|
|
||||||
\Illuminate\Http\Middleware\HandleCors::class,
|
|
||||||
\Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
|
||||||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
|
||||||
\Illuminate\Foundation\Http\Middleware\TrimStrings::class,
|
|
||||||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
|
||||||
];
|
|
||||||
|
|
||||||
protected $middlewareGroups = [
|
|
||||||
'web' => [\Illuminate\Routing\Middleware\SubstituteBindings::class],
|
|
||||||
];
|
|
||||||
|
|
||||||
protected $middlewareAliases = [
|
|
||||||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
|
||||||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
|
|
||||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
|
||||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
|
||||||
];
|
|
||||||
}
|
|
7
app/console.php
Normal file
7
app/console.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schedule;
|
||||||
|
|
||||||
|
Schedule::call('github:fetch')->everySixHours();
|
@ -2,12 +2,17 @@
|
|||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
$app = new Illuminate\Foundation\Application(
|
use Illuminate\Foundation\Application;
|
||||||
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
use Illuminate\Foundation\Configuration\Exceptions;
|
||||||
);
|
use Illuminate\Foundation\Configuration\Middleware;
|
||||||
|
|
||||||
$app->singleton(Illuminate\Contracts\Http\Kernel::class, App\Http\Kernel::class);
|
return Application::configure(basePath: dirname(__DIR__))
|
||||||
$app->singleton(Illuminate\Contracts\Console\Kernel::class, App\Console\Kernel::class);
|
->withRouting(
|
||||||
$app->singleton(Illuminate\Contracts\Debug\ExceptionHandler::class, Illuminate\Foundation\Exceptions\Handler::class);
|
web: __DIR__ . '/../app/routes.php',
|
||||||
|
commands: __DIR__ . '/../app/console.php',
|
||||||
return $app;
|
health: '/up'
|
||||||
|
)
|
||||||
|
->withCommands([__DIR__ . '/../app/Commands'])
|
||||||
|
->withMiddleware(function (Middleware $middleware) {})
|
||||||
|
->withExceptions(function (Exceptions $exceptions) {})
|
||||||
|
->create();
|
||||||
|
7
bootstrap/providers.php
Normal file
7
bootstrap/providers.php
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
return [
|
||||||
|
App\Providers\RouteServiceProvider::class,
|
||||||
|
];
|
@ -6,7 +6,7 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^8.3",
|
"php": "^8.3",
|
||||||
"guzzlehttp/guzzle": "^7.8.1",
|
"guzzlehttp/guzzle": "^7.8.1",
|
||||||
"laravel/framework": "^10.43",
|
"laravel/framework": "^11",
|
||||||
"laravel/tinker": "^2.9.0",
|
"laravel/tinker": "^2.9.0",
|
||||||
"league/commonmark": "^2.4.2"
|
"league/commonmark": "^2.4.2"
|
||||||
},
|
},
|
||||||
@ -16,7 +16,7 @@
|
|||||||
"laravel/pint": "^1.13.10",
|
"laravel/pint": "^1.13.10",
|
||||||
"laravel/sail": "^1.27.3",
|
"laravel/sail": "^1.27.3",
|
||||||
"mockery/mockery": "^1.6.7",
|
"mockery/mockery": "^1.6.7",
|
||||||
"nunomaduro/collision": "^7.10",
|
"nunomaduro/collision": "^8.1",
|
||||||
"phpunit/phpunit": "^10.0",
|
"phpunit/phpunit": "^10.0",
|
||||||
"rector/rector": "^1.0",
|
"rector/rector": "^1.0",
|
||||||
"spatie/laravel-ignition": "^2.4.2"
|
"spatie/laravel-ignition": "^2.4.2"
|
||||||
|
909
composer.lock
generated
909
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -145,52 +145,6 @@
|
|||||||
// 'store' => 'redis',
|
// 'store' => 'redis',
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Autoloaded Service Providers
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The service providers listed here will be automatically loaded on the
|
|
||||||
| request to your application. Feel free to add your own services to
|
|
||||||
| this array to grant expanded functionality to your applications.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'providers' => [
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Laravel Framework Service Providers...
|
|
||||||
*/
|
|
||||||
Illuminate\Auth\AuthServiceProvider::class,
|
|
||||||
Illuminate\Broadcasting\BroadcastServiceProvider::class,
|
|
||||||
Illuminate\Bus\BusServiceProvider::class,
|
|
||||||
Illuminate\Cache\CacheServiceProvider::class,
|
|
||||||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
|
|
||||||
Illuminate\Cookie\CookieServiceProvider::class,
|
|
||||||
Illuminate\Database\DatabaseServiceProvider::class,
|
|
||||||
Illuminate\Encryption\EncryptionServiceProvider::class,
|
|
||||||
Illuminate\Filesystem\FilesystemServiceProvider::class,
|
|
||||||
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
|
|
||||||
Illuminate\Hashing\HashServiceProvider::class,
|
|
||||||
Illuminate\Mail\MailServiceProvider::class,
|
|
||||||
Illuminate\Notifications\NotificationServiceProvider::class,
|
|
||||||
Illuminate\Pagination\PaginationServiceProvider::class,
|
|
||||||
Illuminate\Pipeline\PipelineServiceProvider::class,
|
|
||||||
Illuminate\Queue\QueueServiceProvider::class,
|
|
||||||
Illuminate\Redis\RedisServiceProvider::class,
|
|
||||||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
|
|
||||||
Illuminate\Session\SessionServiceProvider::class,
|
|
||||||
Illuminate\Translation\TranslationServiceProvider::class,
|
|
||||||
Illuminate\Validation\ValidationServiceProvider::class,
|
|
||||||
Illuminate\View\ViewServiceProvider::class,
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Application Service Providers...
|
|
||||||
*/
|
|
||||||
App\Providers\RouteServiceProvider::class,
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Class Aliases
|
| Class Aliases
|
||||||
|
Reference in New Issue
Block a user