Skip to content

Commit

Permalink
Update Laravel app, used for tests, to 11.21.0 version.
Browse files Browse the repository at this point in the history
  • Loading branch information
zablose committed Sep 2, 2024
1 parent 3ceb59b commit cb29d99
Show file tree
Hide file tree
Showing 38 changed files with 470 additions and 795 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.phpunit.cache/
/coverage-report/
/vendor/
/.idea/
Expand Down
28 changes: 16 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@
}
],
"require": {
"php": "^8.0",
"php": ">=8.0",
"ext-gd": "*"
},
"require-dev": {
"ext-pdo": "*",
"facade/ignition": "^2.16.0",
"fideloper/proxy": "^4.4.1",
"fakerphp/faker": "^1.16.0",
"guzzlehttp/guzzle": "^7.4.0",
"laravel/framework": "^8.69.0",
"laravel/tinker": "^2.6.2",
"laravel/ui": "^3.3.2",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^5.10.0",
"phpunit/phpunit": "^9.5.10"
"laravel/framework": "^11.21.0",
"laravel/tinker": "^v2.9.0",
"laravel/ui": "^4.5",
"mockery/mockery": "^1.6.12",
"nunomaduro/collision": "^8.4.0",
"phpunit/phpunit": "^11.3.1"
},
"autoload": {
"psr-4": {
Expand All @@ -47,14 +44,21 @@
},
"extra": {
"laravel": {
"dont-discover": [],
"providers": [
"Zablose\\Captcha\\CaptchaServiceProvider"
]
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}
33 changes: 0 additions & 33 deletions laravel/app/Console/Kernel.php

This file was deleted.

50 changes: 0 additions & 50 deletions laravel/app/Exceptions/Handler.php

This file was deleted.

2 changes: 0 additions & 2 deletions laravel/app/Http/Controllers/Controller.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
Expand Down
54 changes: 0 additions & 54 deletions laravel/app/Http/Kernel.php

This file was deleted.

27 changes: 14 additions & 13 deletions laravel/app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@
namespace App\Models;

use Database\Factories\UserFactory;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

/**
* @method static create(array $attributes)
*/
class User extends Authenticatable
{
use HasFactory;
use Notifiable;
use HasFactory, Notifiable;

/**
* The attributes that are mass assignable.
*
* @var array
* @var array<int, string>
*/
protected $fillable = [
'name',
Expand All @@ -27,23 +24,27 @@ class User extends Authenticatable
];

/**
* The attributes that should be hidden for arrays.
* The attributes that should be hidden for serialization.
*
* @var array
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];

/**
* The attributes that should be cast to native types.
* Get the attributes that should be cast.
*
* @var array
* @return array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}

protected static function newFactory(): UserFactory
{
Expand Down
10 changes: 2 additions & 8 deletions laravel/app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
Expand All @@ -10,20 +8,16 @@ class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
public function register(): void
{
//
}

/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
public function boot(): void
{
//
}
Expand Down
30 changes: 0 additions & 30 deletions laravel/app/Providers/AuthServiceProvider.php

This file was deleted.

55 changes: 5 additions & 50 deletions laravel/artisan
Original file line number Diff line number Diff line change
@@ -1,60 +1,15 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

use Illuminate\Contracts\Console\Kernel;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any of our classes manually. It's great to relax.
|
*/

require __DIR__.'/../vendor/autoload.php';

$app = require_once __DIR__.'/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/

/** @var Kernel $kernel */
$kernel = $app->make(Kernel::class);

$status = $kernel->handle(
$input = new ArgvInput(),
new ConsoleOutput()
);

/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
// Register the Composer autoloader...
require dirname(__DIR__).'/vendor/autoload.php';

$kernel->terminate($input, $status);
// Bootstrap Laravel and handle the command...
$status = (require_once __DIR__.'/bootstrap/app.php')
->handleCommand(new ArgvInput());

exit($status);
Loading

0 comments on commit cb29d99

Please sign in to comment.