diff --git a/.env.ci b/.env.ci index 64e572b64f2..1fc32024c71 100644 --- a/.env.ci +++ b/.env.ci @@ -15,7 +15,7 @@ DB_DATABASE=convoy DB_USERNAME=convoy_user DB_PASSWORD=YzLa2BCBwDGWVkpG -CACHE_DRIVER=redis +CACHE_STORE=redis FILESYSTEM_DISK=local QUEUE_CONNECTION=redis SESSION_DRIVER=redis diff --git a/.env.example b/.env.example index fb7edb7a5f6..3ce670842ed 100644 --- a/.env.example +++ b/.env.example @@ -4,9 +4,9 @@ APP_KEY= APP_DEBUG=true APP_URL=http://localhost -LOG_CHANNEL=stack -LOG_DEPRECATIONS_CHANNEL=null -LOG_LEVEL=debug +APP_TIMEZONE=UTC +APP_LOCALE=en +APP_MAINTENANCE_DRIVER=cache DB_CONNECTION=mysql DB_HOST=database @@ -15,7 +15,7 @@ DB_DATABASE=convoy DB_USERNAME=convoy_user DB_PASSWORD= -CACHE_DRIVER=redis +CACHE_STORE=redis FILESYSTEM_DISK=local QUEUE_CONNECTION=redis SESSION_DRIVER=redis diff --git a/.env.full_example b/.env.full_example new file mode 100644 index 00000000000..6446a001dd0 --- /dev/null +++ b/.env.full_example @@ -0,0 +1,50 @@ +APP_NAME=Convoy +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_URL=http://localhost + +APP_TIMEZONE=UTC +APP_LOCALE=en +APP_FALLBACK_LOCALE=en +APP_FAKER_LOCALE=en_US +APP_MAINTENANCE_DRIVER=file +APP_MAINTENANCE_STORE=database +BCRYPT_ROUNDS=12 + +LOG_CHANNEL=stack +LOG_STACK=single +LOG_DEPRECATIONS_CHANNEL=null +LOG_LEVEL=debug + +DB_CONNECTION=mysql +DB_HOST=database +DB_PORT=3306 +DB_DATABASE=convoy +DB_USERNAME=convoy_user +DB_PASSWORD= + +CACHE_STORE=redis +FILESYSTEM_DISK=local +QUEUE_CONNECTION=redis +SESSION_DRIVER=redis +SESSION_LIFETIME=525600 +SESSION_ENCRYPT=false +SESSION_PATH=/ +SESSION_DOMAIN=null + +REDIS_HOST=redis +REDIS_PASSWORD= +REDIS_PORT=6379 + +MAIL_MAILER=smtp +MAIL_HOST=mailhog +MAIL_PORT=1025 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS="hello@example.com" +MAIL_FROM_NAME="${APP_NAME}" + +PHP_XDEBUG=false +PHP_XDEBUG_MODE='debug' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18f06542c8f..c131b6e00e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,6 +45,7 @@ jobs: files_to_include=( ".editorconfig" ".env.example" + ".env.full_example" ".gitattributes" ".gitignore" ".prettierignore" diff --git a/app/Actions/Fortify/CreateNewUser.php b/app/Actions/Fortify/CreateNewUser.php index 2beb4365d14..130a1a82fef 100644 --- a/app/Actions/Fortify/CreateNewUser.php +++ b/app/Actions/Fortify/CreateNewUser.php @@ -3,9 +3,9 @@ namespace App\Actions\Fortify; use App\Models\User; -use Illuminate\Validation\Rule; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; +use Illuminate\Validation\Rule; use Laravel\Fortify\Contracts\CreatesNewUsers; class CreateNewUser implements CreatesNewUsers diff --git a/app/Actions/Fortify/UpdateUserProfileInformation.php b/app/Actions/Fortify/UpdateUserProfileInformation.php index 515b097590b..d325d3bf6e7 100644 --- a/app/Actions/Fortify/UpdateUserProfileInformation.php +++ b/app/Actions/Fortify/UpdateUserProfileInformation.php @@ -2,9 +2,9 @@ namespace App\Actions\Fortify; -use Illuminate\Validation\Rule; -use Illuminate\Support\Facades\Validator; use Illuminate\Contracts\Auth\MustVerifyEmail; +use Illuminate\Support\Facades\Validator; +use Illuminate\Validation\Rule; use Laravel\Fortify\Contracts\UpdatesUserProfileInformation; class UpdateUserProfileInformation implements UpdatesUserProfileInformation diff --git a/app/Casts/NullableEncrypter.php b/app/Casts/NullableEncrypter.php index 3a6ad253990..54aab56b379 100644 --- a/app/Casts/NullableEncrypter.php +++ b/app/Casts/NullableEncrypter.php @@ -2,9 +2,9 @@ namespace App\Casts; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Contracts\Encryption\Encrypter; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; +use Illuminate\Contracts\Encryption\Encrypter; +use Illuminate\Database\Eloquent\Model; class NullableEncrypter implements CastsAttributes { @@ -15,7 +15,7 @@ class NullableEncrypter implements CastsAttributes */ public function get(Model $model, string $key, mixed $value, array $attributes): ?string { - return !empty($value) ? app(Encrypter::class)->decrypt($value) : null; + return ! empty($value) ? app(Encrypter::class)->decrypt($value) : null; } /** @@ -25,6 +25,6 @@ public function get(Model $model, string $key, mixed $value, array $attributes): */ public function set(Model $model, string $key, mixed $value, array $attributes): ?string { - return !empty($value) ? app(Encrypter::class)->encrypt($value) : null; + return ! empty($value) ? app(Encrypter::class)->encrypt($value) : null; } } diff --git a/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php b/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php index 48063f5617d..fde828045dc 100644 --- a/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php +++ b/app/Console/Commands/Maintenance/PruneOrphanedBackupsCommand.php @@ -2,10 +2,10 @@ namespace App\Console\Commands\Maintenance; +use App\Repositories\Eloquent\BackupRepository; use Carbon\CarbonImmutable; -use InvalidArgumentException; use Illuminate\Console\Command; -use App\Repositories\Eloquent\BackupRepository; +use InvalidArgumentException; class PruneOrphanedBackupsCommand extends Command { diff --git a/app/Console/Commands/Maintenance/PruneUsersCommand.php b/app/Console/Commands/Maintenance/PruneUsersCommand.php index 5b99c1a0d69..54418c5b08c 100644 --- a/app/Console/Commands/Maintenance/PruneUsersCommand.php +++ b/app/Console/Commands/Maintenance/PruneUsersCommand.php @@ -2,9 +2,9 @@ namespace App\Console\Commands\Maintenance; +use App\Jobs\Node\PruneUsersJob; use App\Models\Node; use Illuminate\Console\Command; -use App\Jobs\Node\PruneUsersJob; use Illuminate\Console\View\Components\Task; class PruneUsersCommand extends Command diff --git a/app/Console/Commands/Server/UpdateRateLimitsCommand.php b/app/Console/Commands/Server/UpdateRateLimitsCommand.php index 034db95b9a7..38d70bb9e8e 100644 --- a/app/Console/Commands/Server/UpdateRateLimitsCommand.php +++ b/app/Console/Commands/Server/UpdateRateLimitsCommand.php @@ -2,10 +2,10 @@ namespace App\Console\Commands\Server; +use App\Jobs\Node\SyncServerRateLimitsJob; use App\Models\Node; use Illuminate\Console\Command; use Illuminate\Console\View\Components\Task; -use App\Jobs\Node\SyncServerRateLimitsJob; class UpdateRateLimitsCommand extends Command { diff --git a/app/Console/Commands/Server/UpdateUsagesCommand.php b/app/Console/Commands/Server/UpdateUsagesCommand.php index 2df861786df..cc3110a828a 100644 --- a/app/Console/Commands/Server/UpdateUsagesCommand.php +++ b/app/Console/Commands/Server/UpdateUsagesCommand.php @@ -2,9 +2,9 @@ namespace App\Console\Commands\Server; +use App\Jobs\Node\SyncServerUsagesJob; use App\Models\Node; use Illuminate\Console\Command; -use App\Jobs\Node\SyncServerUsagesJob; use Illuminate\Console\View\Components\Task; class UpdateUsagesCommand extends Command diff --git a/app/Console/Commands/User/MakeUserCommand.php b/app/Console/Commands/User/MakeUserCommand.php index 59c6b91039f..f5fa70170a0 100644 --- a/app/Console/Commands/User/MakeUserCommand.php +++ b/app/Console/Commands/User/MakeUserCommand.php @@ -25,11 +25,11 @@ namespace App\Console\Commands\User; -use Exception; +use App\Exceptions\Model\DataValidationException; use App\Models\User; +use Exception; use Illuminate\Console\Command; use Illuminate\Support\Facades\Hash; -use App\Exceptions\Model\DataValidationException; class MakeUserCommand extends Command { diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php deleted file mode 100644 index 64165e579e7..00000000000 --- a/app/Console/Kernel.php +++ /dev/null @@ -1,48 +0,0 @@ -command('queue:prune-batches')->daily(); - - if (config('backups.prune_age')) { - // Every 30 minutes, run the backup pruning command so that any abandoned backups can be deleted. - $schedule->command(PruneOrphanedBackupsCommand::class)->everyThirtyMinutes(); - } - - if (config('activity.prune_days')) { - $schedule->command(PruneCommand::class, ['--model' => [ActivityLog::class]])->daily(); - } - - $schedule->command(ResetUsagesCommand::class)->daily(); - $schedule->command(PruneUsersCommand::class)->daily(); - $schedule->command(UpdateUsagesCommand::class)->everyFiveMinutes(); - $schedule->command(UpdateRateLimitsCommand::class)->everyTenMinutes(); - } - - /** - * Register the commands for the application. - */ - protected function commands(): void - { - $this->load(__DIR__.'/Commands'); - - //require base_path('routes/console.php'); - } -} diff --git a/app/Contracts/Repository/ActivityRepositoryInterface.php b/app/Contracts/Repository/ActivityRepositoryInterface.php index c7db17873eb..6a9f973518d 100644 --- a/app/Contracts/Repository/ActivityRepositoryInterface.php +++ b/app/Contracts/Repository/ActivityRepositoryInterface.php @@ -2,8 +2,8 @@ namespace App\Contracts\Repository; -use App\Models\Server; use App\Models\ActivityLog; +use App\Models\Server; interface ActivityRepositoryInterface extends RepositoryInterface { diff --git a/app/Contracts/Repository/RepositoryInterface.php b/app/Contracts/Repository/RepositoryInterface.php index e94c52d3f8f..2b957a724d2 100644 --- a/app/Contracts/Repository/RepositoryInterface.php +++ b/app/Contracts/Repository/RepositoryInterface.php @@ -2,11 +2,11 @@ namespace App\Contracts\Repository; -use Closure; -use Illuminate\Support\Collection; use App\Exceptions\Model\DataValidationException; -use Illuminate\Contracts\Pagination\LengthAwarePaginator; use App\Exceptions\Repository\RecordNotFoundException; +use Closure; +use Illuminate\Contracts\Pagination\LengthAwarePaginator; +use Illuminate\Support\Collection; interface RepositoryInterface { diff --git a/app/Contracts/Repository/ServerRepositoryInterface.php b/app/Contracts/Repository/ServerRepositoryInterface.php index 50188570615..bc1b65c6cc2 100644 --- a/app/Contracts/Repository/ServerRepositoryInterface.php +++ b/app/Contracts/Repository/ServerRepositoryInterface.php @@ -2,8 +2,8 @@ namespace App\Contracts\Repository; -use App\Models\Server; use App\Exceptions\Repository\RecordNotFoundException; +use App\Models\Server; interface ServerRepositoryInterface extends RepositoryInterface { diff --git a/app/Data/Helpers/ChecksumData.php b/app/Data/Helpers/ChecksumData.php index c25022b0b80..cc8f0563275 100644 --- a/app/Data/Helpers/ChecksumData.php +++ b/app/Data/Helpers/ChecksumData.php @@ -2,13 +2,13 @@ namespace App\Data\Helpers; -use Spatie\LaravelData\Data; use App\Enums\Helpers\ChecksumAlgorithm; +use Spatie\LaravelData\Data; class ChecksumData extends Data { public function __construct( - public string $checksum, + public string $checksum, public ChecksumAlgorithm $algorithm, ) { } diff --git a/app/Data/Node/Access/CreateUserData.php b/app/Data/Node/Access/CreateUserData.php index c58f206a127..e850c3b8ec7 100644 --- a/app/Data/Node/Access/CreateUserData.php +++ b/app/Data/Node/Access/CreateUserData.php @@ -2,25 +2,25 @@ namespace App\Data\Node\Access; -use Carbon\Carbon; -use Spatie\LaravelData\Data; -use Spatie\LaravelData\Casts\EnumCast; use App\Enums\Node\Access\RealmType; -use Spatie\LaravelData\Attributes\WithCast; -use Spatie\LaravelData\Attributes\Validation\Min; +use Carbon\Carbon; use Spatie\LaravelData\Attributes\Validation\Max; +use Spatie\LaravelData\Attributes\Validation\Min; +use Spatie\LaravelData\Attributes\WithCast; +use Spatie\LaravelData\Casts\EnumCast; +use Spatie\LaravelData\Data; class CreateUserData extends Data { public function __construct( #[WithCast(EnumCast::class)] public RealmType $realm_type, - public bool $enabled, + public bool $enabled, #[Min(1), Max(60)] - public ?string $username = null, + public ?string $username = null, #[Min(1), Max(64)] - public ?string $password = null, - public ?Carbon $expires_at = null, + public ?string $password = null, + public ?Carbon $expires_at = null, ) { } } diff --git a/app/Data/Node/Access/UserCredentialsData.php b/app/Data/Node/Access/UserCredentialsData.php index f422ac37ec7..698a8656085 100644 --- a/app/Data/Node/Access/UserCredentialsData.php +++ b/app/Data/Node/Access/UserCredentialsData.php @@ -2,21 +2,20 @@ namespace App\Data\Node\Access; -use Spatie\LaravelData\Data; use App\Enums\Node\Access\RealmType; +use Spatie\LaravelData\Data; class UserCredentialsData extends Data { public function __construct( - public string $username, + public string $username, public RealmType $realm_type, - public string $ticket, - public string $csrf_token, + public string $ticket, + public string $csrf_token, ) { - } - public static function fromRaw(array $raw): UserCredentialsData + public static function fromRaw(array $raw): self { return new self(...[ 'username' => explode('@', $raw['username'])[0], diff --git a/app/Data/Node/Access/UserData.php b/app/Data/Node/Access/UserData.php index c07054ea3e9..e0c4a0d4067 100644 --- a/app/Data/Node/Access/UserData.php +++ b/app/Data/Node/Access/UserData.php @@ -2,32 +2,32 @@ namespace App\Data\Node\Access; +use App\Enums\Node\Access\RealmType; use Carbon\Carbon; use Illuminate\Support\Arr; -use Spatie\LaravelData\Data; -use Spatie\LaravelData\Casts\EnumCast; -use App\Enums\Node\Access\RealmType; use Spatie\LaravelData\Attributes\WithCast; +use Spatie\LaravelData\Casts\EnumCast; +use Spatie\LaravelData\Data; class UserData extends Data { public function __construct( - public string $username, - public ?string $email, + public string $username, + public ?string $email, #[WithCast(EnumCast::class)] public RealmType $realm_type, - public bool $enabled, - public ?Carbon $expires_at, + public bool $enabled, + public ?Carbon $expires_at, ) { } - public static function fromRaw(array $raw): UserData + public static function fromRaw(array $raw): self { return new self(...[ 'username' => explode('@', $raw['userid'])[0], 'email' => Arr::get($raw, 'email'), 'realm_type' => RealmType::from($raw['realm-type']), - 'enabled' => (bool)$raw['enable'], + 'enabled' => (bool) $raw['enable'], 'expires_at' => Arr::get($raw, 'expire') ? Carbon::createFromTimestamp($raw['expire']) : null, ]); } diff --git a/app/Data/Node/Storage/FileMetaData.php b/app/Data/Node/Storage/FileMetaData.php index e9dd2f15ddd..583715c870f 100644 --- a/app/Data/Node/Storage/FileMetaData.php +++ b/app/Data/Node/Storage/FileMetaData.php @@ -9,7 +9,7 @@ class FileMetaData extends Data public function __construct( public string $file_name, public string $mime_type, - public int $size, + public int $size, ) { } } diff --git a/app/Data/Node/Storage/IsoData.php b/app/Data/Node/Storage/IsoData.php index 6cfc24c6dde..14762382575 100644 --- a/app/Data/Node/Storage/IsoData.php +++ b/app/Data/Node/Storage/IsoData.php @@ -8,8 +8,8 @@ class IsoData extends Data { public function __construct( - public string $file_name, - public int $size, + public string $file_name, + public int $size, public CarbonInterface $created_at, ) { } diff --git a/app/Data/Node/Storage/StorageData.php b/app/Data/Node/Storage/StorageData.php index 8c28807ac04..7e97a225a11 100644 --- a/app/Data/Node/Storage/StorageData.php +++ b/app/Data/Node/Storage/StorageData.php @@ -13,12 +13,12 @@ public function __construct( public int $total, public bool $enabled, public bool $online, - public bool $has_kvm, - public bool $has_lxc, - public bool $has_lxc_templates, - public bool $has_backups, - public bool $has_iso, - public bool $has_snippets, + public bool $has_kvm, + public bool $has_lxc, + public bool $has_lxc_templates, + public bool $has_backups, + public bool $has_iso, + public bool $has_snippets, ) { } } diff --git a/app/Data/Server/Deployments/CloudinitAddressConfigData.php b/app/Data/Server/Deployments/CloudinitAddressConfigData.php index 2f8cfe85c4a..c170ccaf07c 100644 --- a/app/Data/Server/Deployments/CloudinitAddressConfigData.php +++ b/app/Data/Server/Deployments/CloudinitAddressConfigData.php @@ -2,8 +2,8 @@ namespace App\Data\Server\Deployments; -use Spatie\LaravelData\Data; use App\Data\Server\Eloquent\AddressData; +use Spatie\LaravelData\Data; class CloudinitAddressConfigData extends Data { diff --git a/app/Data/Server/Deployments/ServerDeploymentData.php b/app/Data/Server/Deployments/ServerDeploymentData.php index e89b0719786..b2d13e383a1 100644 --- a/app/Data/Server/Deployments/ServerDeploymentData.php +++ b/app/Data/Server/Deployments/ServerDeploymentData.php @@ -9,11 +9,11 @@ class ServerDeploymentData extends Data { public function __construct( - public Server $server, + public Server $server, public ?Template $template, - public string $account_password, - public bool $should_create_server, - public bool $start_on_completion, + public string $account_password, + public bool $should_create_server, + public bool $start_on_completion, ) { } } diff --git a/app/Data/Server/Eloquent/AddressData.php b/app/Data/Server/Eloquent/AddressData.php index 22957d7aa50..a78436956c8 100644 --- a/app/Data/Server/Eloquent/AddressData.php +++ b/app/Data/Server/Eloquent/AddressData.php @@ -2,22 +2,22 @@ namespace App\Data\Server\Eloquent; -use Spatie\LaravelData\Data; -use Spatie\LaravelData\Attributes\Validation\IP; use Spatie\LaravelData\Attributes\Validation\In; +use Spatie\LaravelData\Attributes\Validation\IP; +use Spatie\LaravelData\Data; class AddressData extends Data { public function __construct( - public int $id, - public int $address_pool_id, - public ?int $server_id, + public int $id, + public int $address_pool_id, + public ?int $server_id, #[In(['ipv4', 'ipv6'])] - public string $type, + public string $type, #[IP] - public string $address, - public int $cidr, - public string $gateway, + public string $address, + public int $cidr, + public string $gateway, public ?string $mac_address, ) { } diff --git a/app/Data/Server/Eloquent/ServerAddressesData.php b/app/Data/Server/Eloquent/ServerAddressesData.php index a3d7b8c89e1..0d9ea665d6f 100644 --- a/app/Data/Server/Eloquent/ServerAddressesData.php +++ b/app/Data/Server/Eloquent/ServerAddressesData.php @@ -2,9 +2,9 @@ namespace App\Data\Server\Eloquent; +use Spatie\LaravelData\Attributes\DataCollectionOf; use Spatie\LaravelData\Data; use Spatie\LaravelData\DataCollection; -use Spatie\LaravelData\Attributes\DataCollectionOf; class ServerAddressesData extends Data { diff --git a/app/Data/Server/Eloquent/ServerEloquentData.php b/app/Data/Server/Eloquent/ServerEloquentData.php index 57b717addfa..f91efda4ecf 100644 --- a/app/Data/Server/Eloquent/ServerEloquentData.php +++ b/app/Data/Server/Eloquent/ServerEloquentData.php @@ -7,14 +7,14 @@ class ServerEloquentData extends Data { public function __construct( - public int $id, - public string $uuid_short, - public string $uuid, - public int $node_id, - public string $hostname, - public string $name, - public ?string $description, - public ?string $status, + public int $id, + public string $uuid_short, + public string $uuid, + public int $node_id, + public string $hostname, + public string $name, + public ?string $description, + public ?string $status, public ServerUsagesData $usages, public ServerLimitsData $limits, ) { diff --git a/app/Data/Server/Eloquent/ServerLimitsData.php b/app/Data/Server/Eloquent/ServerLimitsData.php index 5ce38bf3f86..342717ff1f7 100644 --- a/app/Data/Server/Eloquent/ServerLimitsData.php +++ b/app/Data/Server/Eloquent/ServerLimitsData.php @@ -7,14 +7,14 @@ class ServerLimitsData extends Data { public function __construct( - public int $cpu, - public int $memory, - public int $disk, - public ?int $snapshots, - public ?int $backups, - public ?int $bandwidth, + public int $cpu, + public int $memory, + public int $disk, + public ?int $snapshots, + public ?int $backups, + public ?int $bandwidth, public ServerAddressesData $addresses, - public ?string $mac_address, + public ?string $mac_address, ) { } } diff --git a/app/Data/Server/Proxmox/Config/AddressData.php b/app/Data/Server/Proxmox/Config/AddressData.php index af04cc98f13..b8c3f14513b 100644 --- a/app/Data/Server/Proxmox/Config/AddressData.php +++ b/app/Data/Server/Proxmox/Config/AddressData.php @@ -8,7 +8,7 @@ class AddressData extends Data { public function __construct( public string $address, - public int $cidr, + public int $cidr, public string $gateway, ) { } diff --git a/app/Data/Server/Proxmox/Config/DiskData.php b/app/Data/Server/Proxmox/Config/DiskData.php index 70cde7283fb..e7c99d504e8 100644 --- a/app/Data/Server/Proxmox/Config/DiskData.php +++ b/app/Data/Server/Proxmox/Config/DiskData.php @@ -2,20 +2,20 @@ namespace App\Data\Server\Proxmox\Config; -use Spatie\LaravelData\Data; -use Spatie\LaravelData\Casts\EnumCast; use App\Enums\Server\DiskInterface; use Spatie\LaravelData\Attributes\WithCast; +use Spatie\LaravelData\Casts\EnumCast; +use Spatie\LaravelData\Data; class DiskData extends Data { public function __construct( #[WithCast(EnumCast::class)] public DiskInterface $interface, - public bool $is_primary_disk, - public bool $is_media, - public ?string $media_name, - public int $size, + public bool $is_primary_disk, + public bool $is_media, + public ?string $media_name, + public int $size, ) { } } diff --git a/app/Data/Server/Proxmox/Config/ServerConfigData.php b/app/Data/Server/Proxmox/Config/ServerConfigData.php index 2e79c79edad..35594234c5c 100644 --- a/app/Data/Server/Proxmox/Config/ServerConfigData.php +++ b/app/Data/Server/Proxmox/Config/ServerConfigData.php @@ -2,14 +2,14 @@ namespace App\Data\Server\Proxmox\Config; +use Spatie\LaravelData\Attributes\DataCollectionOf; use Spatie\LaravelData\Data; use Spatie\LaravelData\DataCollection; -use Spatie\LaravelData\Attributes\DataCollectionOf; class ServerConfigData extends Data { public function __construct( - public string $mac_address, + public string $mac_address, #[DataCollectionOf(DiskData::class)] public DataCollection $boot_order, #[DataCollectionOf(DiskData::class)] diff --git a/app/Data/Server/Proxmox/Console/NoVncCredentialsData.php b/app/Data/Server/Proxmox/Console/NoVncCredentialsData.php index f0847bac284..8f6c59c1152 100644 --- a/app/Data/Server/Proxmox/Console/NoVncCredentialsData.php +++ b/app/Data/Server/Proxmox/Console/NoVncCredentialsData.php @@ -7,7 +7,7 @@ class NoVncCredentialsData extends Data { public function __construct( - public int $port, + public int $port, public string $ticket, public string $pve_auth_cookie, ) { diff --git a/app/Data/Server/Proxmox/Console/XTermCredentialsData.php b/app/Data/Server/Proxmox/Console/XTermCredentialsData.php index 07e7e88aecc..5c55e88400d 100644 --- a/app/Data/Server/Proxmox/Console/XTermCredentialsData.php +++ b/app/Data/Server/Proxmox/Console/XTermCredentialsData.php @@ -2,17 +2,17 @@ namespace App\Data\Server\Proxmox\Console; -use Spatie\LaravelData\Data; use App\Enums\Node\Access\RealmType; +use Spatie\LaravelData\Data; class XTermCredentialsData extends Data { public function __construct( - public int $port, - public string $ticket, - public string $username, + public int $port, + public string $ticket, + public string $username, public RealmType $realm_type, - public string $pve_auth_cookie, + public string $pve_auth_cookie, ) { } } diff --git a/app/Data/Server/Proxmox/ServerProxmoxData.php b/app/Data/Server/Proxmox/ServerProxmoxData.php index a552bfe38e9..3d2e7303a0a 100644 --- a/app/Data/Server/Proxmox/ServerProxmoxData.php +++ b/app/Data/Server/Proxmox/ServerProxmoxData.php @@ -2,18 +2,18 @@ namespace App\Data\Server\Proxmox; -use Spatie\LaravelData\Data; use App\Data\Server\Proxmox\Config\ServerConfigData; +use Spatie\LaravelData\Data; class ServerProxmoxData extends Data { public function __construct( - public int $id, - public string $uuid_short, - public string $uuid, - public int $node_id, - public string $state, - public bool $locked, + public int $id, + public string $uuid_short, + public string $uuid, + public int $node_id, + public string $state, + public bool $locked, public ServerConfigData $config, ) { } diff --git a/app/Data/Server/Proxmox/ServerStateData.php b/app/Data/Server/Proxmox/ServerStateData.php index c81ab8a02c2..32789f23013 100644 --- a/app/Data/Server/Proxmox/ServerStateData.php +++ b/app/Data/Server/Proxmox/ServerStateData.php @@ -2,17 +2,17 @@ namespace App\Data\Server\Proxmox; -use Spatie\LaravelData\Data; use App\Enums\Server\State; +use Spatie\LaravelData\Data; class ServerStateData extends Data { public function __construct( public State $state, public float $cpu_used, - public int $memory_total, - public int $memory_used, - public int $uptime, + public int $memory_total, + public int $memory_used, + public int $uptime, ) { } diff --git a/app/Data/Server/Proxmox/Usages/ServerTimepointData.php b/app/Data/Server/Proxmox/Usages/ServerTimepointData.php index e70c41db2b9..872157cee1e 100644 --- a/app/Data/Server/Proxmox/Usages/ServerTimepointData.php +++ b/app/Data/Server/Proxmox/Usages/ServerTimepointData.php @@ -8,11 +8,11 @@ class ServerTimepointData extends Data { public function __construct( - public float $cpu_used, - public float $memory_used, + public float $cpu_used, + public float $memory_used, public ServerNetworkData $network, - public ServerDiskData $disk, - public CarbonImmutable $timestamp, + public ServerDiskData $disk, + public CarbonImmutable $timestamp, ) { } } diff --git a/app/Data/Server/Proxmox/Usages/ServerUsagesData.php b/app/Data/Server/Proxmox/Usages/ServerUsagesData.php index 7a7fbb953a5..256f386e3bc 100644 --- a/app/Data/Server/Proxmox/Usages/ServerUsagesData.php +++ b/app/Data/Server/Proxmox/Usages/ServerUsagesData.php @@ -7,9 +7,9 @@ class ServerUsagesData extends Data { public function __construct( - public int $bandwidth, + public int $bandwidth, public ServerNetworkData $network, - public ServerDiskData $disk, + public ServerDiskData $disk, ) { } } diff --git a/app/Events/Activity/Activity.php b/app/Events/Activity/Activity.php index 7ef9c904460..954e44807c1 100644 --- a/app/Events/Activity/Activity.php +++ b/app/Events/Activity/Activity.php @@ -2,9 +2,9 @@ namespace App\Events\Activity; -use Illuminate\Support\Str; use App\Models\ActivityLog; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Str; abstract class Activity { diff --git a/app/Exceptions/DisplayException.php b/app/Exceptions/DisplayException.php index 8ee7f099943..d5f9f3b074f 100644 --- a/app/Exceptions/DisplayException.php +++ b/app/Exceptions/DisplayException.php @@ -3,14 +3,14 @@ namespace App\Exceptions; use Exception; -use Throwable; -use Psr\Log\LoggerInterface; -use Illuminate\Http\Request; -use Illuminate\Http\Response; -use Illuminate\Http\JsonResponse; use Illuminate\Container\Container; +use Illuminate\Http\JsonResponse; use Illuminate\Http\RedirectResponse; +use Illuminate\Http\Request; +use Illuminate\Http\Response; +use Psr\Log\LoggerInterface; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; +use Throwable; class DisplayException extends ConvoyException implements HttpExceptionInterface { diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 31dbd254f26..09f7c206b09 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -3,9 +3,9 @@ namespace App\Exceptions; use Exception; -use Throwable; use Illuminate\Container\Container; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use Throwable; class Handler extends ExceptionHandler { diff --git a/app/Exceptions/Http/Server/ServerStatusConflictException.php b/app/Exceptions/Http/Server/ServerStatusConflictException.php index 954d653c57f..e7b51fb0df1 100644 --- a/app/Exceptions/Http/Server/ServerStatusConflictException.php +++ b/app/Exceptions/Http/Server/ServerStatusConflictException.php @@ -2,9 +2,9 @@ namespace App\Exceptions\Http\Server; -use Throwable; use App\Models\Server; use Symfony\Component\HttpKernel\Exception\ConflictHttpException; +use Throwable; class ServerStatusConflictException extends ConflictHttpException { diff --git a/app/Exceptions/Model/DataValidationException.php b/app/Exceptions/Model/DataValidationException.php index ebcd102f0d7..8f371f23925 100644 --- a/app/Exceptions/Model/DataValidationException.php +++ b/app/Exceptions/Model/DataValidationException.php @@ -2,11 +2,11 @@ namespace App\Exceptions\Model; -use Illuminate\Support\MessageBag; use App\Exceptions\ConvoyException; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Contracts\Validation\Validator; use Illuminate\Contracts\Support\MessageProvider; +use Illuminate\Contracts\Validation\Validator; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\MessageBag; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; class DataValidationException extends ConvoyException implements HttpExceptionInterface, MessageProvider diff --git a/app/Exceptions/Repository/Proxmox/ProxmoxConnectionException.php b/app/Exceptions/Repository/Proxmox/ProxmoxConnectionException.php index 31987bece2e..3a42ad25893 100644 --- a/app/Exceptions/Repository/Proxmox/ProxmoxConnectionException.php +++ b/app/Exceptions/Repository/Proxmox/ProxmoxConnectionException.php @@ -2,14 +2,14 @@ namespace App\Exceptions\Repository\Proxmox; -use Illuminate\Http\Client\Response; -use Illuminate\Http\Client\RequestException; use App\Exceptions\Repository\RepositoryException; +use Illuminate\Http\Client\RequestException; +use Illuminate\Http\Client\Response; class ProxmoxConnectionException extends RepositoryException { public function __construct(Response $response, RequestException $exception) { - parent::__construct($response->reason() . PHP_EOL . $exception->getMessage() . PHP_EOL . $exception->getTraceAsString(), $exception->getCode(), $exception); + parent::__construct($response->reason().PHP_EOL.$exception->getMessage().PHP_EOL.$exception->getTraceAsString(), $exception->getCode(), $exception); } } diff --git a/app/Exceptions/Service/Api/InvalidJWTException.php b/app/Exceptions/Service/Api/InvalidJWTException.php index a2f6c758058..67713a3c886 100644 --- a/app/Exceptions/Service/Api/InvalidJWTException.php +++ b/app/Exceptions/Service/Api/InvalidJWTException.php @@ -2,8 +2,8 @@ namespace App\Exceptions\Service\Api; -use Throwable; use App\Exceptions\ConvoyException; +use Throwable; class InvalidJWTException extends ConvoyException { diff --git a/app/Extensions/Lcobucci/JWT/Validation/Clock.php b/app/Extensions/Lcobucci/JWT/Validation/Clock.php index dc7f66afcd8..b41a3a8ffa7 100644 --- a/app/Extensions/Lcobucci/JWT/Validation/Clock.php +++ b/app/Extensions/Lcobucci/JWT/Validation/Clock.php @@ -2,9 +2,9 @@ namespace App\Extensions\Lcobucci\JWT\Validation; -use DateTimeImmutable; -use Carbon\CarbonInterface; use Carbon\CarbonImmutable; +use Carbon\CarbonInterface; +use DateTimeImmutable; use Psr\Clock\ClockInterface; class Clock implements ClockInterface diff --git a/app/Extensions/Spatie/Fractal/RecursiveSerializer.php b/app/Extensions/Spatie/Fractal/RecursiveSerializer.php index f79c5f6a83b..dbe4f991d9c 100644 --- a/app/Extensions/Spatie/Fractal/RecursiveSerializer.php +++ b/app/Extensions/Spatie/Fractal/RecursiveSerializer.php @@ -7,7 +7,7 @@ class RecursiveSerializer extends ArraySerializer { /** - * {@inheritDoc} + * @inheritDoc */ public function collection(?string $resourceKey, array $data): array { @@ -15,7 +15,7 @@ public function collection(?string $resourceKey, array $data): array } /** - * {@inheritDoc} + * @inheritDoc */ public function item(?string $resourceKey, array $data): array { diff --git a/app/Facades/Activity.php b/app/Facades/Activity.php index 2d079dd2b91..e1957df9e8c 100644 --- a/app/Facades/Activity.php +++ b/app/Facades/Activity.php @@ -2,8 +2,8 @@ namespace App\Facades; -use Illuminate\Support\Facades\Facade; use App\Services\Activity\ActivityLogService; +use Illuminate\Support\Facades\Facade; class Activity extends Facade { diff --git a/app/Facades/LogBatch.php b/app/Facades/LogBatch.php index 1e83f160cdb..203c67c94ba 100644 --- a/app/Facades/LogBatch.php +++ b/app/Facades/LogBatch.php @@ -2,8 +2,8 @@ namespace App\Facades; -use Illuminate\Support\Facades\Facade; use App\Services\Activity\ActivityLogBatchService; +use Illuminate\Support\Facades\Facade; class LogBatch extends Facade { diff --git a/app/Facades/LogTarget.php b/app/Facades/LogTarget.php index 05c697fdf84..7f8e2d926a0 100644 --- a/app/Facades/LogTarget.php +++ b/app/Facades/LogTarget.php @@ -2,8 +2,8 @@ namespace App\Facades; -use Illuminate\Support\Facades\Facade; use App\Services\Activity\ActivityLogTargetableService; +use Illuminate\Support\Facades\Facade; class LogTarget extends Facade { diff --git a/app/Http/Controllers/Admin/AddressPools/AddressController.php b/app/Http/Controllers/Admin/AddressPools/AddressController.php index a2a5db66528..39410630a27 100644 --- a/app/Http/Controllers/Admin/AddressPools/AddressController.php +++ b/app/Http/Controllers/Admin/AddressPools/AddressController.php @@ -4,7 +4,6 @@ use App\Enums\Network\AddressType; use App\Exceptions\Repository\Proxmox\ProxmoxConnectionException; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\AddressPools\Addresses\StoreAddressRequest; use App\Http\Requests\Admin\AddressPools\Addresses\UpdateAddressRequest; use App\Jobs\Server\SyncNetworkSettings; @@ -20,39 +19,38 @@ use Spatie\QueryBuilder\QueryBuilder; use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; -class AddressController extends ApiController +class AddressController { public function __construct( - private NetworkService $networkService, - private ConnectionInterface $connection, + private NetworkService $networkService, + private ConnectionInterface $connection, private BulkAddressCreationService $bulkAddressCreationService, - ) { - } + ) {} public function index(Request $request, AddressPool $addressPool) { $addresses = QueryBuilder::for($addressPool->addresses()) - ->with('server') - ->defaultSort('-id') - ->allowedFilters( - [ - AllowedFilter::exact('address'), - AllowedFilter::exact( - 'type', - ), - AllowedFilter::custom( - '*', - new FiltersAddressWildcard(), - ), - AllowedFilter::exact('server_id')->nullable(), - ], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($addresses, new AddressTransformer())->parseIncludes($request->include) - ->respond(); + ->with('server') + ->defaultSort('-id') + ->allowedFilters( + [ + AllowedFilter::exact('address'), + AllowedFilter::exact( + 'type', + ), + AllowedFilter::custom( + '*', + new FiltersAddressWildcard, + ), + AllowedFilter::exact('server_id')->nullable(), + ], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($addresses, new AddressTransformer)->parseIncludes($request->include) + ->respond(); } public function store(StoreAddressRequest $request, AddressPool $addressPool) @@ -71,11 +69,11 @@ public function store(StoreAddressRequest $request, AddressPool $addressPool) macAddress: $data['mac_address'], ); - if (!is_null($request->server_id)) { + if (! is_null($request->server_id)) { SyncNetworkSettings::dispatch($request->integer('server_id')); } - return $this->returnNoContent(); + return response()->noContent(); } /** @var Address $address */ @@ -98,8 +96,8 @@ public function store(StoreAddressRequest $request, AddressPool $addressPool) return $address; }); - return fractal($address, new AddressTransformer())->parseIncludes($request->include) - ->respond(); + return fractal($address, new AddressTransformer)->parseIncludes($request->include) + ->respond(); } public function update( @@ -125,11 +123,11 @@ public function update( $this->networkService->syncSettings($address->server); } } catch (ProxmoxConnectionException) { - if ($oldLinkedServer && !$address->server) { + if ($oldLinkedServer && ! $address->server) { throw new ServiceUnavailableHttpException( message: "Server {$oldLinkedServer->uuid} failed to sync network settings.", ); - } elseif (!$oldLinkedServer && $address->server) { + } elseif (! $oldLinkedServer && $address->server) { throw new ServiceUnavailableHttpException( message: "Server {$address->server->uuid} failed to sync network settings.", ); @@ -143,8 +141,8 @@ public function update( return $address; }); - return fractal($address, new AddressTransformer())->parseIncludes($request->include) - ->respond(); + return fractal($address, new AddressTransformer)->parseIncludes($request->include) + ->respond(); } public function destroy(AddressPool $addressPool, Address $address) @@ -163,6 +161,6 @@ public function destroy(AddressPool $addressPool, Address $address) } }); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Admin/AddressPools/AddressPoolController.php b/app/Http/Controllers/Admin/AddressPools/AddressPoolController.php index a0a1c9fc282..be6aad60938 100644 --- a/app/Http/Controllers/Admin/AddressPools/AddressPoolController.php +++ b/app/Http/Controllers/Admin/AddressPools/AddressPoolController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Admin\AddressPools; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\AddressPools\StoreAddressPoolRequest; use App\Http\Requests\Admin\AddressPools\UpdateAddressPoolRequest; use App\Models\AddressPool; @@ -15,47 +14,47 @@ use Spatie\QueryBuilder\QueryBuilder; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; -class AddressPoolController extends ApiController +class AddressPoolController { public function index(Request $request) { $addressPools = QueryBuilder::for(AddressPool::query()) - ->withCount(['addresses', 'nodes']) - ->defaultSort('-id') - ->allowedFilters( - ['name', AllowedFilter::custom( - '*', - new FiltersAddressPoolWildcard(), - )], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($addressPools, new AddressPoolTransformer())->respond(); + ->withCount(['addresses', 'nodes']) + ->defaultSort('-id') + ->allowedFilters( + ['name', AllowedFilter::custom( + '*', + new FiltersAddressPoolWildcard, + )], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($addressPools, new AddressPoolTransformer)->respond(); } public function show(AddressPool $addressPool) { $addressPool->loadCount(['addresses', 'nodes']); - return fractal($addressPool, new AddressPoolTransformer())->respond(); + return fractal($addressPool, new AddressPoolTransformer)->respond(); } public function getAttachedNodes(Request $request, AddressPool $addressPool) { $nodes = QueryBuilder::for($addressPool->nodes()) - ->withCount('servers') - ->allowedFilters( - ['name', 'fqdn', AllowedFilter::exact( - 'location_id', - ), AllowedFilter::custom('*', new FiltersNodeWildcard())], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($nodes, new NodeTransformer())->respond(); + ->withCount('servers') + ->allowedFilters( + ['name', 'fqdn', AllowedFilter::exact( + 'location_id', + ), AllowedFilter::custom('*', new FiltersNodeWildcard)], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($nodes, new NodeTransformer)->respond(); } public function store(StoreAddressPoolRequest $request) @@ -64,7 +63,7 @@ public function store(StoreAddressPoolRequest $request) $pool->nodes()->attach($request->node_ids); $pool->loadCount(['addresses', 'nodes']); - return fractal($pool, new AddressPoolTransformer())->respond(); + return fractal($pool, new AddressPoolTransformer)->respond(); } public function update(UpdateAddressPoolRequest $request, AddressPool $addressPool) @@ -73,7 +72,7 @@ public function update(UpdateAddressPoolRequest $request, AddressPool $addressPo $addressPool->nodes()->sync($request->node_ids); $addressPool->loadCount(['addresses', 'nodes']); - return fractal($addressPool, new AddressPoolTransformer())->respond(); + return fractal($addressPool, new AddressPoolTransformer)->respond(); } public function destroy(AddressPool $addressPool) @@ -88,6 +87,6 @@ public function destroy(AddressPool $addressPool) $addressPool->delete(); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Admin/CotermController.php b/app/Http/Controllers/Admin/CotermController.php index 558216440e5..3e1e9c346c9 100644 --- a/app/Http/Controllers/Admin/CotermController.php +++ b/app/Http/Controllers/Admin/CotermController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Admin; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\Coterms\DeleteCotermRequest; use App\Http\Requests\Admin\Coterms\StoreCotermRequest; use App\Http\Requests\Admin\Coterms\UpdateAttachedNodesRequest; @@ -18,35 +17,35 @@ use Spatie\QueryBuilder\AllowedFilter; use Spatie\QueryBuilder\QueryBuilder; -class CotermController extends ApiController +use function response; + +class CotermController { - public function __construct(private CotermTokenCreationService $cotermTokenCreator) - { - } + public function __construct(private CotermTokenCreationService $cotermTokenCreator) {} public function index(Request $request) { $addressPools = QueryBuilder::for(Coterm::query()) - ->withCount(['nodes']) - ->defaultSort('-id') - ->allowedFilters( - ['name', AllowedFilter::custom( - '*', - new FiltersCotermWildcard(), - )], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($addressPools, new CotermTransformer())->respond(); + ->withCount(['nodes']) + ->defaultSort('-id') + ->allowedFilters( + ['name', AllowedFilter::custom( + '*', + new FiltersCotermWildcard, + )], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($addressPools, new CotermTransformer)->respond(); } public function show(Coterm $coterm) { $coterm->loadCount(['nodes']); - return fractal($coterm, new CotermTransformer())->respond(); + return fractal($coterm, new CotermTransformer)->respond(); } public function store(StoreCotermRequest $request) @@ -79,23 +78,23 @@ public function update(UpdateCotermRequest $request, Coterm $coterm) } $coterm->loadCount(['nodes']); - return fractal($coterm, new CotermTransformer())->respond(); + return fractal($coterm, new CotermTransformer)->respond(); } public function getAttachedNodes(Request $request, Coterm $coterm) { $nodes = QueryBuilder::for($coterm->nodes()) - ->withCount('servers') - ->allowedFilters( - ['name', 'fqdn', AllowedFilter::exact( - 'location_id', - ), AllowedFilter::custom('*', new FiltersNodeWildcard())], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($nodes, new NodeTransformer())->respond(); + ->withCount('servers') + ->allowedFilters( + ['name', 'fqdn', AllowedFilter::exact( + 'location_id', + ), AllowedFilter::custom('*', new FiltersNodeWildcard)], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($nodes, new NodeTransformer)->respond(); } public function updateAttachedNodes(UpdateAttachedNodesRequest $request, Coterm $coterm) @@ -108,7 +107,7 @@ public function updateAttachedNodes(UpdateAttachedNodesRequest $request, Coterm ); $coterm->loadCount(['nodes']); - return fractal($coterm, new CotermTransformer())->respond(); + return fractal($coterm, new CotermTransformer)->respond(); } public function resetCotermToken(Coterm $coterm) @@ -120,13 +119,13 @@ public function resetCotermToken(Coterm $coterm) ]); return fractal($coterm, new CotermTransformer(includeToken: true))->parseIncludes('token') - ->respond(); + ->respond(); } public function destroy(DeleteCotermRequest $request, Coterm $coterm) { $coterm->delete(); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Admin/LocationController.php b/app/Http/Controllers/Admin/LocationController.php index a6acffad438..954779062ab 100644 --- a/app/Http/Controllers/Admin/LocationController.php +++ b/app/Http/Controllers/Admin/LocationController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Admin; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\LocationFormRequest; use App\Models\Filters\FiltersLocationWildcard; use App\Models\Location; @@ -12,36 +11,36 @@ use Spatie\QueryBuilder\QueryBuilder; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -class LocationController extends ApiController +class LocationController { public function index(Request $request) { $locations = QueryBuilder::for(Location::query()) - ->withCount(['nodes', 'servers']) - ->defaultSort('-id') + ->withCount(['nodes', 'servers']) + ->defaultSort('-id') // @phpstan-ignore-next-line - ->allowedFilters( - ['short_code', AllowedFilter::custom('*', new FiltersLocationWildcard())], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($locations, new LocationTransformer())->respond(); + ->allowedFilters( + ['short_code', AllowedFilter::custom('*', new FiltersLocationWildcard)], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($locations, new LocationTransformer)->respond(); } public function store(LocationFormRequest $request) { $location = Location::create($request->validated()); - return fractal($location, new LocationTransformer())->respond(); + return fractal($location, new LocationTransformer)->respond(); } public function update(LocationFormRequest $request, Location $location) { $location->update($request->validated()); - return fractal($location, new LocationTransformer())->respond(); + return fractal($location, new LocationTransformer)->respond(); } public function destroy(Location $location) @@ -57,6 +56,6 @@ public function destroy(Location $location) $location->delete(); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Admin/Nodes/AddressController.php b/app/Http/Controllers/Admin/Nodes/AddressController.php index 4d3eab21477..450f3450dd6 100644 --- a/app/Http/Controllers/Admin/Nodes/AddressController.php +++ b/app/Http/Controllers/Admin/Nodes/AddressController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Admin\Nodes; -use App\Http\Controllers\Controller; use App\Models\Filters\FiltersAddressWildcard; use App\Models\Node; use App\Transformers\Admin\AddressTransformer; @@ -10,26 +9,26 @@ use Spatie\QueryBuilder\AllowedFilter; use Spatie\QueryBuilder\QueryBuilder; -class AddressController extends Controller +class AddressController { public function index(Request $request, Node $node) { $addresses = QueryBuilder::for($node->addresses()) - ->with('server') - ->defaultSort('-id') - ->allowedFilters( - ['address', AllowedFilter::exact( - 'type', - ), AllowedFilter::custom( - '*', - new FiltersAddressWildcard(), - ), AllowedFilter::exact('server_id')->nullable()], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); + ->with('server') + ->defaultSort('-id') + ->allowedFilters( + ['address', AllowedFilter::exact( + 'type', + ), AllowedFilter::custom( + '*', + new FiltersAddressWildcard, + ), AllowedFilter::exact('server_id')->nullable()], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); - return fractal($addresses, new AddressTransformer())->parseIncludes($request->include) - ->respond(); + return fractal($addresses, new AddressTransformer)->parseIncludes($request->include) + ->respond(); } } diff --git a/app/Http/Controllers/Admin/Nodes/IsoController.php b/app/Http/Controllers/Admin/Nodes/IsoController.php index 8bd15495c6c..8cd486811aa 100644 --- a/app/Http/Controllers/Admin/Nodes/IsoController.php +++ b/app/Http/Controllers/Admin/Nodes/IsoController.php @@ -4,7 +4,6 @@ use App\Data\Helpers\ChecksumData; use App\Enums\Helpers\ChecksumAlgorithm; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\Nodes\Isos\StoreIsoRequest; use App\Http\Requests\Admin\Nodes\Isos\UpdateIsoRequest; use App\Models\ISO; @@ -17,24 +16,23 @@ use Illuminate\Support\Facades\Validator; use Spatie\QueryBuilder\QueryBuilder; -class IsoController extends ApiController +class IsoController { public function __construct( private IsoService $isoService, private ProxmoxStorageRepository $repository, - ) { - } + ) {} public function index(Node $node, Request $request) { $isos = QueryBuilder::for(ISO::query()) - ->where('iso_library.node_id', $node->id) - ->allowedFilters(['name']) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); + ->where('iso_library.node_id', $node->id) + ->allowedFilters(['name']) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); - return fractal($isos, new IsoTransformer())->respond(); + return fractal($isos, new IsoTransformer)->respond(); } public function store(StoreIsoRequest $request, Node $node) @@ -42,7 +40,7 @@ public function store(StoreIsoRequest $request, Node $node) $shouldDownload = $request->boolean('should_download'); if ($shouldDownload) { - $checksumData = (bool)$request->checksum_algorithum ? ChecksumData::from([ + $checksumData = (bool) $request->checksum_algorithum ? ChecksumData::from([ 'algorithm' => ChecksumAlgorithm::from($request->checksum_algorithum), 'checksum' => $request->checksum, ]) : null; @@ -68,21 +66,21 @@ public function store(StoreIsoRequest $request, Node $node) ]); } - return fractal($iso, new IsoTransformer())->respond(); + return fractal($iso, new IsoTransformer)->respond(); } public function update(UpdateIsoRequest $request, Node $node, ISO $iso) { $iso->update($request->validated()); - return fractal($iso, new IsoTransformer())->respond(); + return fractal($iso, new IsoTransformer)->respond(); } public function destroy(Node $node, ISO $iso) { $this->isoService->delete($node, $iso); - return $this->returnNoContent(); + return response()->noContent(); } public function queryLink(Request $request, Node $node) @@ -95,6 +93,6 @@ public function queryLink(Request $request, Node $node) $metadata = $this->repository->setNode($node)->getFileMetadata($request->link); - return fractal($metadata, new FileMetadataTransformer())->respond(); + return fractal($metadata, new FileMetadataTransformer)->respond(); } } diff --git a/app/Http/Controllers/Admin/Nodes/NodeController.php b/app/Http/Controllers/Admin/Nodes/NodeController.php index e74d36fbde2..6027f9c5882 100644 --- a/app/Http/Controllers/Admin/Nodes/NodeController.php +++ b/app/Http/Controllers/Admin/Nodes/NodeController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Admin\Nodes; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\Nodes\StoreNodeRequest; use App\Http\Requests\Admin\Nodes\UpdateNodeRequest; use App\Models\Filters\FiltersNodeWildcard; @@ -13,27 +12,27 @@ use Spatie\QueryBuilder\QueryBuilder; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; -class NodeController extends ApiController +class NodeController { public function index(Request $request) { $nodes = QueryBuilder::for(Node::query()) - ->withCount(['servers']) - ->allowedFilters( - [AllowedFilter::exact('id'), 'name', 'fqdn', AllowedFilter::exact( - 'location_id', - ), AllowedFilter::exact( - 'coterm_id', - )->nullable(), AllowedFilter::custom( - '*', - new FiltersNodeWildcard(), - )], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); + ->withCount(['servers']) + ->allowedFilters( + [AllowedFilter::exact('id'), 'name', 'fqdn', AllowedFilter::exact( + 'location_id', + ), AllowedFilter::exact( + 'coterm_id', + )->nullable(), AllowedFilter::custom( + '*', + new FiltersNodeWildcard, + )], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); - return fractal($nodes, new NodeTransformer())->respond(); + return fractal($nodes, new NodeTransformer)->respond(); } public function show(Node $node) @@ -42,21 +41,21 @@ public function show(Node $node) $node->loadCount('servers'); - return fractal($node, new NodeTransformer())->respond(); + return fractal($node, new NodeTransformer)->respond(); } public function store(StoreNodeRequest $request) { $node = Node::create($request->validated()); - return fractal($node, new NodeTransformer())->respond(); + return fractal($node, new NodeTransformer)->respond(); } public function update(UpdateNodeRequest $request, Node $node) { $node->update($request->validated()); - return fractal($node, new NodeTransformer())->respond(); + return fractal($node, new NodeTransformer)->respond(); } public function destroy(Node $node) @@ -71,6 +70,6 @@ public function destroy(Node $node) $node->delete(); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Admin/Nodes/TemplateController.php b/app/Http/Controllers/Admin/Nodes/TemplateController.php index 845b0b0fe52..24bb5e16164 100644 --- a/app/Http/Controllers/Admin/Nodes/TemplateController.php +++ b/app/Http/Controllers/Admin/Nodes/TemplateController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Admin\Nodes; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\Nodes\Templates\TemplateRequest; use App\Http\Requests\Admin\Nodes\Templates\UpdateTemplateOrderRequest; use App\Models\Node; @@ -11,16 +10,16 @@ use App\Transformers\Admin\TemplateTransformer; use Spatie\QueryBuilder\QueryBuilder; -class TemplateController extends ApiController +class TemplateController { public function index(Node $node, TemplateGroup $templateGroup) { $templates = QueryBuilder::for(Template::query()) - ->where('templates.template_group_id', $templateGroup->id) - ->defaultSort('order_column') - ->get(); + ->where('templates.template_group_id', $templateGroup->id) + ->defaultSort('order_column') + ->get(); - return fractal($templates, new TemplateTransformer())->respond(); + return fractal($templates, new TemplateTransformer)->respond(); } public function store(TemplateRequest $request, Node $node, TemplateGroup $templateGroup) @@ -32,7 +31,7 @@ public function store(TemplateRequest $request, Node $node, TemplateGroup $templ ]), ); - return fractal($template, new TemplateTransformer())->respond(); + return fractal($template, new TemplateTransformer)->respond(); } public function update( @@ -43,14 +42,14 @@ public function update( ) { $template->update($request->validated()); - return fractal($template, new TemplateTransformer())->respond(); + return fractal($template, new TemplateTransformer)->respond(); } public function destroy(Node $node, TemplateGroup $templateGroup, Template $template) { $template->delete(); - return $this->returnNoContent(); + return response()->noContent(); } public function updateOrder( @@ -62,7 +61,7 @@ public function updateOrder( return fractal( $templateGroup->templates()->ordered()->get(), - new TemplateTransformer(), + new TemplateTransformer, )->respond(); } } diff --git a/app/Http/Controllers/Admin/Nodes/TemplateGroupController.php b/app/Http/Controllers/Admin/Nodes/TemplateGroupController.php index 356462ea477..cfbdb632124 100644 --- a/app/Http/Controllers/Admin/Nodes/TemplateGroupController.php +++ b/app/Http/Controllers/Admin/Nodes/TemplateGroupController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Admin\Nodes; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\Nodes\TemplateGroups\TemplateGroupRequest; use App\Http\Requests\Admin\Nodes\TemplateGroups\UpdateGroupOrderRequest; use App\Models\Node; @@ -10,20 +9,20 @@ use App\Transformers\Admin\TemplateGroupTransformer; use Spatie\QueryBuilder\QueryBuilder; -class TemplateGroupController extends ApiController +class TemplateGroupController { public function index(Node $node) { $templateGroups = QueryBuilder::for(TemplateGroup::query()) - ->where('template_groups.node_id', $node->id) - ->defaultSort('order_column') - ->with(['templates' => function ($query) { - $query->orderBy('order_column'); - }]) - ->allowedFilters(['name']) - ->get(); + ->where('template_groups.node_id', $node->id) + ->defaultSort('order_column') + ->with(['templates' => function ($query) { + $query->orderBy('order_column'); + }]) + ->allowedFilters(['name']) + ->get(); - return fractal($templateGroups, new TemplateGroupTransformer())->parseIncludes( + return fractal($templateGroups, new TemplateGroupTransformer)->parseIncludes( ['templates'], )->respond(); } @@ -34,7 +33,7 @@ public function updateOrder(UpdateGroupOrderRequest $request, Node $node) return fractal( $node->templateGroups()->with('templates')->ordered()->get(), - new TemplateGroupTransformer(), + new TemplateGroupTransformer, )->parseIncludes(['templates'])->respond(); } @@ -46,20 +45,20 @@ public function store(TemplateGroupRequest $request, Node $node) ]), ); - return fractal($templateGroup, new TemplateGroupTransformer())->respond(); + return fractal($templateGroup, new TemplateGroupTransformer)->respond(); } public function update(TemplateGroupRequest $request, Node $node, TemplateGroup $templateGroup) { $templateGroup->update($request->validated()); - return fractal($templateGroup, new TemplateGroupTransformer())->respond(); + return fractal($templateGroup, new TemplateGroupTransformer)->respond(); } public function destroy(Node $node, TemplateGroup $templateGroup) { $templateGroup->delete(); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Admin/ServerController.php b/app/Http/Controllers/Admin/ServerController.php index eb05c1391fe..12995a3fac9 100644 --- a/app/Http/Controllers/Admin/ServerController.php +++ b/app/Http/Controllers/Admin/ServerController.php @@ -5,7 +5,6 @@ use App\Enums\Server\Status; use App\Enums\Server\SuspensionAction; use App\Exceptions\Repository\Proxmox\ProxmoxConnectionException; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\Servers\Settings\UpdateBuildRequest; use App\Http\Requests\Admin\Servers\Settings\UpdateGeneralInfoRequest; use App\Http\Requests\Admin\Servers\StoreServerRequest; @@ -25,53 +24,52 @@ use Spatie\QueryBuilder\QueryBuilder; use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException; -class ServerController extends ApiController +class ServerController { public function __construct( - private ConnectionInterface $connection, - private ServerDeletionService $deletionService, - private NetworkService $networkService, + private ConnectionInterface $connection, + private ServerDeletionService $deletionService, + private NetworkService $networkService, private ServerSuspensionService $suspensionService, - private ServerCreationService $creationService, - private CloudinitService $cloudinitService, - private SyncBuildService $buildModificationService, - ) { - } + private ServerCreationService $creationService, + private CloudinitService $cloudinitService, + private SyncBuildService $buildModificationService, + ) {} public function index(Request $request) { $servers = QueryBuilder::for(Server::query()) - ->with(['addresses', 'user', 'node']) - ->defaultSort('-id') - ->allowedFilters( - [ - AllowedFilter::custom( - '*', - new FiltersServerWildcard(), - ), - AllowedFilter::custom( - 'address_pool_id', - new FiltersServerByAddressPoolId(), - ), - AllowedFilter::exact('node_id'), - AllowedFilter::exact('user_id'), - 'name', - ], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($servers, new ServerBuildTransformer())->parseIncludes($request->include) - ->respond(); + ->with(['addresses', 'user', 'node']) + ->defaultSort('-id') + ->allowedFilters( + [ + AllowedFilter::custom( + '*', + new FiltersServerWildcard, + ), + AllowedFilter::custom( + 'address_pool_id', + new FiltersServerByAddressPoolId, + ), + AllowedFilter::exact('node_id'), + AllowedFilter::exact('user_id'), + 'name', + ], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($servers, new ServerBuildTransformer)->parseIncludes($request->include) + ->respond(); } public function show(Request $request, Server $server) { $server->load(['addresses', 'user', 'node']); - return fractal($server, new ServerBuildTransformer())->parseIncludes($request->include) - ->respond(); + return fractal($server, new ServerBuildTransformer)->parseIncludes($request->include) + ->respond(); } public function store(StoreServerRequest $request) @@ -80,14 +78,14 @@ public function store(StoreServerRequest $request) $server->load(['addresses', 'user', 'node']); - return fractal($server, new ServerBuildTransformer())->parseIncludes(['user', 'node']) - ->respond(); + return fractal($server, new ServerBuildTransformer)->parseIncludes(['user', 'node']) + ->respond(); } public function update(UpdateGeneralInfoRequest $request, Server $server) { $this->connection->transaction(function () use ($request, $server) { - if ($request->hostname !== $server->hostname && !empty($request->hostname)) { + if ($request->hostname !== $server->hostname && ! empty($request->hostname)) { try { $this->cloudinitService->updateHostname($server, $request->hostname); } catch (ProxmoxConnectionException) { @@ -102,8 +100,8 @@ public function update(UpdateGeneralInfoRequest $request, Server $server) $server->load(['addresses', 'user', 'node']); - return fractal($server, new ServerBuildTransformer())->parseIncludes(['user', 'node']) - ->respond(); + return fractal($server, new ServerBuildTransformer)->parseIncludes(['user', 'node']) + ->respond(); } public function updateBuild(UpdateBuildRequest $request, Server $server) @@ -120,22 +118,22 @@ public function updateBuild(UpdateBuildRequest $request, Server $server) $server->load(['addresses', 'user', 'node']); - return fractal($server, new ServerBuildTransformer())->parseIncludes(['user', 'node']) - ->respond(); + return fractal($server, new ServerBuildTransformer)->parseIncludes(['user', 'node']) + ->respond(); } public function suspend(Server $server) { $this->suspensionService->toggle($server); - return $this->returnNoContent(); + return response()->noContent(); } public function unsuspend(Server $server) { $this->suspensionService->toggle($server, SuspensionAction::UNSUSPEND); - return $this->returnNoContent(); + return response()->noContent(); } public function destroy(Request $request, Server $server) @@ -146,6 +144,6 @@ public function destroy(Request $request, Server $server) $this->deletionService->handle($server, $request->input('no_purge', false)); }); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Admin/TokenController.php b/app/Http/Controllers/Admin/TokenController.php index 7676cdfe0d1..6c2a076b3bc 100644 --- a/app/Http/Controllers/Admin/TokenController.php +++ b/app/Http/Controllers/Admin/TokenController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers\Admin; use App\Enums\Api\ApiKeyType; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\Tokens\StoreTokenRequest; use App\Models\PersonalAccessToken; use App\Transformers\Admin\ApiKeyTransformer; @@ -11,32 +10,32 @@ use Illuminate\Http\Request; use Spatie\QueryBuilder\QueryBuilder; -class TokenController extends ApiController +class TokenController { public function index(Request $request) { $tokens = QueryBuilder::for(PersonalAccessToken::query()) - ->with('tokenable') - ->defaultSort('-id') - ->where('personal_access_tokens.type', ApiKeyType::APPLICATION->value) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($tokens, new ApiKeyTransformer())->respond(); + ->with('tokenable') + ->defaultSort('-id') + ->where('personal_access_tokens.type', ApiKeyType::APPLICATION->value) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($tokens, new ApiKeyTransformer)->respond(); } public function store(StoreTokenRequest $request) { $token = $request->user()->createToken($request->name, ApiKeyType::APPLICATION); - return fractal($token, new NewApiKeyTransformer())->respond(); + return fractal($token, new NewApiKeyTransformer)->respond(); } public function destroy(PersonalAccessToken $token) { $token->delete(); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 405ae7b247b..93539e4cd0c 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -2,15 +2,13 @@ namespace App\Http\Controllers\Admin; -use Carbon\CarbonImmutable; -use App\Http\Controllers\ApiController; use App\Http\Requests\Admin\Users\StoreUserRequest; use App\Http\Requests\Admin\Users\UpdateUserRequest; use App\Models\Filters\FiltersUserWildcard; -use App\Models\SSOToken; use App\Models\User; use App\Services\Api\JWTService; use App\Transformers\Admin\UserTransformer; +use Carbon\CarbonImmutable; use Illuminate\Http\Request; use Illuminate\Support\Facades\Hash; use Spatie\QueryBuilder\AllowedFilter; @@ -18,33 +16,31 @@ use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; -class UserController extends ApiController +class UserController { - public function __construct(private JWTService $JWTService) - { - } + public function __construct(private JWTService $JWTService) {} public function index(Request $request) { $users = QueryBuilder::for(User::query()) - ->withCount(['servers']) - ->allowedFilters( - [AllowedFilter::exact('id'), 'name', AllowedFilter::exact( - 'email', - ), AllowedFilter::custom('*', new FiltersUserWildcard())], - ) - ->paginate(min($request->query('per_page', 50), 100))->appends( - $request->query(), - ); - - return fractal($users, new UserTransformer())->respond(); + ->withCount(['servers']) + ->allowedFilters( + [AllowedFilter::exact('id'), 'name', AllowedFilter::exact( + 'email', + ), AllowedFilter::custom('*', new FiltersUserWildcard)], + ) + ->paginate(min($request->query('per_page', 50), 100))->appends( + $request->query(), + ); + + return fractal($users, new UserTransformer)->respond(); } public function show(User $user) { $user->loadCount(['servers']); - return fractal($user, new UserTransformer())->respond(); + return fractal($user, new UserTransformer)->respond(); } public function store(StoreUserRequest $request) @@ -56,7 +52,7 @@ public function store(StoreUserRequest $request) 'root_admin' => $request->root_admin, ])->loadCount(['servers']); - return fractal($user, new UserTransformer())->respond(); + return fractal($user, new UserTransformer)->respond(); } public function update(UpdateUserRequest $request, User $user) @@ -70,7 +66,7 @@ public function update(UpdateUserRequest $request, User $user) $user->loadCount(['servers']); - return fractal($user, new UserTransformer())->respond(); + return fractal($user, new UserTransformer)->respond(); } public function destroy(User $user) @@ -87,7 +83,7 @@ public function destroy(User $user) $user->delete(); - return $this->returnNoContent(); + return response()->noContent(); } public function getSSOToken(User $user) diff --git a/app/Http/Controllers/ApiController.php b/app/Http/Controllers/ApiController.php deleted file mode 100644 index f1c61750cce..00000000000 --- a/app/Http/Controllers/ApiController.php +++ /dev/null @@ -1,13 +0,0 @@ -claims()->get('user_uuid'))->first(); - if (!$user) { + if (! $user) { throw new UnauthorizedHttpException('', 'Invalid JWT claims'); } diff --git a/app/Http/Controllers/Base/IndexController.php b/app/Http/Controllers/Base/IndexController.php index 3bab137cc80..b7cc02578af 100644 --- a/app/Http/Controllers/Base/IndexController.php +++ b/app/Http/Controllers/Base/IndexController.php @@ -2,19 +2,17 @@ namespace App\Http\Controllers\Base; -use App\Http\Controllers\Controller; use Illuminate\View\Factory as ViewFactory; use Illuminate\View\View; -class IndexController extends Controller +class IndexController { /** * IndexController constructor. */ public function __construct( protected ViewFactory $view, - ) { - } + ) {} /** * Returns listing of user's servers. diff --git a/app/Http/Controllers/Base/LocaleController.php b/app/Http/Controllers/Base/LocaleController.php index e25f1735296..b30ece8629b 100644 --- a/app/Http/Controllers/Base/LocaleController.php +++ b/app/Http/Controllers/Base/LocaleController.php @@ -25,13 +25,12 @@ namespace App\Http\Controllers\Base; -use App\Http\Controllers\Controller; use Illuminate\Contracts\Translation\Loader; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Translation\Translator; -class LocaleController extends Controller +class LocaleController { protected Loader $loader; diff --git a/app/Http/Controllers/Client/Servers/ActivityController.php b/app/Http/Controllers/Client/Servers/ActivityController.php index ef7ed555ce6..094d437fd00 100644 --- a/app/Http/Controllers/Client/Servers/ActivityController.php +++ b/app/Http/Controllers/Client/Servers/ActivityController.php @@ -2,23 +2,22 @@ namespace App\Http\Controllers\Client\Servers; -use App\Http\Controllers\Controller; use App\Models\Server; use App\Transformers\Client\ActivityLogTransformer; use Illuminate\Http\Request; use Spatie\QueryBuilder\QueryBuilder; -class ActivityController extends Controller +class ActivityController { public function __invoke(Server $server, Request $request) { $activity = QueryBuilder::for($server->activity()) - ->with('actor') - ->allowedSorts(['created_at', 'updated_at']) - ->allowedFilters(['event', 'batch', 'status']) - ->paginate(min($request->query('per_page', 25), 100)) - ->appends($request->query()); + ->with('actor') + ->allowedSorts(['created_at', 'updated_at']) + ->allowedFilters(['event', 'batch', 'status']) + ->paginate(min($request->query('per_page', 25), 100)) + ->appends($request->query()); - return fractal($activity, new ActivityLogTransformer())->respond(); + return fractal($activity, new ActivityLogTransformer)->respond(); } } diff --git a/app/Http/Controllers/Client/Servers/BackupController.php b/app/Http/Controllers/Client/Servers/BackupController.php index 16b8894664a..47c407ec27f 100644 --- a/app/Http/Controllers/Client/Servers/BackupController.php +++ b/app/Http/Controllers/Client/Servers/BackupController.php @@ -4,7 +4,6 @@ use App\Enums\Server\BackupCompressionType; use App\Enums\Server\BackupMode; -use App\Http\Controllers\ApiController; use App\Http\Requests\Client\Servers\Backups\DeleteBackupRequest; use App\Http\Requests\Client\Servers\Backups\RestoreBackupRequest; use App\Http\Requests\Client\Servers\Backups\StoreBackupRequest; @@ -18,26 +17,25 @@ use Illuminate\Http\Request; use Spatie\QueryBuilder\QueryBuilder; -class BackupController extends ApiController +class BackupController { public function __construct( - private BackupCreationService $backupCreationService, - private BackupDeletionService $backupDeletionService, + private BackupCreationService $backupCreationService, + private BackupDeletionService $backupDeletionService, private RestoreFromBackupService $restoreFromBackupService, - private BackupRepository $backupRepository, - ) { - } + private BackupRepository $backupRepository, + ) {} public function index(Request $request, Server $server) { $backups = QueryBuilder::for(Backup::query()) - ->where('backups.server_id', $server->id) - ->allowedFilters(['name']) - ->defaultSort('-created_at') - ->allowedSorts('created_at', 'completed_at') - ->paginate(min($request->query('per_page') ?? 20, 50)); + ->where('backups.server_id', $server->id) + ->allowedFilters(['name']) + ->defaultSort('-created_at') + ->allowedSorts('created_at', 'completed_at') + ->paginate(min($request->query('per_page') ?? 20, 50)); - return fractal($backups, new BackupTransformer())->addMeta([ + return fractal($backups, new BackupTransformer)->addMeta([ 'backup_count' => $this->backupRepository->getNonFailedBackups($server)->count(), ])->respond(); } @@ -53,20 +51,20 @@ public function store(StoreBackupRequest $request, Server $server) isLocked : $request->input('locked', false), ); - return fractal($backup, new BackupTransformer())->respond(); + return fractal($backup, new BackupTransformer)->respond(); } public function restore(RestoreBackupRequest $request, Server $server, Backup $backup) { $this->restoreFromBackupService->handle($server, $backup); - return $this->returnNoContent(); + return response()->noContent(); } public function destroy(DeleteBackupRequest $request, Server $server, Backup $backup) { $this->backupDeletionService->handle($backup); - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Client/Servers/DeploymentController.php b/app/Http/Controllers/Client/Servers/DeploymentController.php index 24cf4f988e2..49397c4da72 100644 --- a/app/Http/Controllers/Client/Servers/DeploymentController.php +++ b/app/Http/Controllers/Client/Servers/DeploymentController.php @@ -2,16 +2,15 @@ namespace App\Http\Controllers\Client\Servers; -use App\Http\Controllers\Controller; use App\Models\Server; use App\Transformers\Client\DeploymentTransformer; -class DeploymentController extends Controller +class DeploymentController { public function index(Server $server) { $deployment = $server->deployments()->firstOrFail(); - return fractal($deployment, new DeploymentTransformer())->respond(); + return fractal($deployment, new DeploymentTransformer)->respond(); } } diff --git a/app/Http/Controllers/Client/Servers/ServerController.php b/app/Http/Controllers/Client/Servers/ServerController.php index dfbc62d138e..cafbcca728a 100644 --- a/app/Http/Controllers/Client/Servers/ServerController.php +++ b/app/Http/Controllers/Client/Servers/ServerController.php @@ -4,7 +4,6 @@ use App\Enums\Server\ConsoleType; use App\Enums\Server\PowerAction; -use App\Http\Controllers\ApiController; use App\Http\Requests\Client\Servers\CreateConsoleSessionRequest; use App\Http\Requests\Client\Servers\SendPowerCommandRequest; use App\Models\Server; @@ -13,7 +12,6 @@ use App\Services\Coterm\CotermJWTService; use App\Services\Servers\ServerConsoleService; use App\Services\Servers\ServerDetailService; -use App\Services\Servers\VncService; use App\Transformers\Client\ServerDetailTransformer; use App\Transformers\Client\ServerStateTransformer; use App\Transformers\Client\ServerTerminalTransformer; @@ -21,40 +19,40 @@ use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Spatie\QueryBuilder\QueryBuilder; + use function fractal; use function min; -class ServerController extends ApiController +class ServerController { public function __construct( - private CotermJWTService $cotermJWTService, - private ServerConsoleService $consoleService, - private ServerDetailService $detailService, + private CotermJWTService $cotermJWTService, + private ServerConsoleService $consoleService, + private ServerDetailService $detailService, private ProxmoxServerRepository $serverRepository, - private ProxmoxPowerRepository $powerRepository, - ) { - } + private ProxmoxPowerRepository $powerRepository, + ) {} public function index(Request $request) { $servers = QueryBuilder::for(Server::query()) - ->allowedFilters(['name']) - ->paginate(min($request->query('per_page', 50), 100)) - ->appends($request->query()); + ->allowedFilters(['name']) + ->paginate(min($request->query('per_page', 50), 100)) + ->appends($request->query()); - return fractal($servers, new ServerTransformer())->respond(); + return fractal($servers, new ServerTransformer)->respond(); } public function show(Server $server) { - return fractal($server, new ServerTransformer())->respond(); + return fractal($server, new ServerTransformer)->respond(); } public function details(Server $server) { return fractal( $this->detailService->getByProxmox($server), - new ServerDetailTransformer(), + new ServerDetailTransformer, )->respond(); } @@ -62,16 +60,16 @@ public function getState(Server $server) { return fractal()->item( $this->serverRepository->setServer($server)->getState(), - new ServerStateTransformer(), + new ServerStateTransformer, )->respond(); } public function updateState(Server $server, SendPowerCommandRequest $request) { $this->powerRepository->setServer($server) - ->send($request->enum('state', PowerAction::class)); + ->send($request->enum('state', PowerAction::class)); - return $this->returnNoContent(); + return response()->noContent(); } public function createConsoleSession(CreateConsoleSessionRequest $request, Server $server) @@ -89,7 +87,7 @@ public function createConsoleSession(CreateConsoleSessionRequest $request, Serve $request->user(), $request->enum('type', ConsoleType::class), ) - ->toString(), + ->toString(), ], ]); } else { @@ -101,7 +99,7 @@ public function createConsoleSession(CreateConsoleSessionRequest $request, Serve 'vmid' => $server->vmid, 'fqdn' => $server->node->fqdn, 'port' => $server->node->port, - ], new ServerTerminalTransformer())->respond(); + ], new ServerTerminalTransformer)->respond(); } } } diff --git a/app/Http/Controllers/Client/Servers/SettingsController.php b/app/Http/Controllers/Client/Servers/SettingsController.php index ad9f9bbca51..1c34709b2e5 100644 --- a/app/Http/Controllers/Client/Servers/SettingsController.php +++ b/app/Http/Controllers/Client/Servers/SettingsController.php @@ -6,7 +6,6 @@ use App\Data\Server\Proxmox\Config\DiskData; use App\Enums\Server\AuthenticationType; use App\Enums\Server\Status; -use App\Http\Controllers\ApiController; use App\Http\Requests\Client\Servers\Settings\MountMediaRequest; use App\Http\Requests\Client\Servers\Settings\ReinstallServerRequest; use App\Http\Requests\Client\Servers\Settings\RenameServerRequest; @@ -31,16 +30,15 @@ use Illuminate\Http\Request; use Spatie\QueryBuilder\QueryBuilder; -class SettingsController extends ApiController +class SettingsController { public function __construct( - private ServerAuthService $authService, - private ConnectionInterface $connection, - private CloudinitService $cloudinitService, + private ServerAuthService $authService, + private ConnectionInterface $connection, + private CloudinitService $cloudinitService, private ServerBuildDispatchService $buildDispatchService, - private AllocationService $allocationService, - ) { - } + private AllocationService $allocationService, + ) {} public function rename(RenameServerRequest $request, Server $server) { @@ -50,36 +48,36 @@ public function rename(RenameServerRequest $request, Server $server) $server->update($request->validated()); }); - return fractal($server, new RenamedServerTransformer())->respond(); + return fractal($server, new RenamedServerTransformer)->respond(); } public function getTemplateGroups(Request $request, Server $server) { $templateGroups = QueryBuilder::for(TemplateGroup::query()) - ->defaultSort('order_column') - ->allowedFilters(['name']); + ->defaultSort('order_column') + ->allowedFilters(['name']); - if (!$request->user()->root_admin) { + if (! $request->user()->root_admin) { $templateGroups = $templateGroups->where( [['template_groups.hidden', '=', false], ['template_groups.node_id', '=', $server->node->id]], ) - ->with(['templates' => function ($query) { - $query->where('hidden', '=', false)->orderBy( - 'order_column', - ); - }])->get(); + ->with(['templates' => function ($query) { + $query->where('hidden', '=', false)->orderBy( + 'order_column', + ); + }])->get(); } else { $templateGroups = $templateGroups->where( 'template_groups.node_id', '=', $server->node->id, ) - ->with(['templates' => function ($query) { - $query->orderBy('order_column'); - }])->get(); + ->with(['templates' => function ($query) { + $query->orderBy('order_column'); + }])->get(); } - return fractal($templateGroups, new TemplateGroupTransformer())->respond(); + return fractal($templateGroups, new TemplateGroupTransformer)->respond(); } public function reinstall(ReinstallServerRequest $request, Server $server) @@ -98,7 +96,7 @@ public function reinstall(ReinstallServerRequest $request, Server $server) $this->buildDispatchService->rebuild($deployment); }); - return $this->returnNoContent(); + return response()->noContent(); } public function getBootOrder(Server $server) @@ -114,16 +112,16 @@ public function getBootOrder(Server $server) } return fractal()->item([ - 'unused_devices' => DiskData::collection($unconfiguredDevices), + 'unused_devices' => DiskData::collect($unconfiguredDevices), 'boot_order' => $configuredDevices, - ], new ServerBootOrderTransformer())->respond(); + ], new ServerBootOrderTransformer)->respond(); } public function updateBootOrder(UpdateBootOrderRequest $request, Server $server) { $this->allocationService->setBootOrder($server, $request->order); - return $this->returnNoContent(); + return response()->noContent(); } public function getMedia(Request $request, Server $server) @@ -151,28 +149,28 @@ public function getMedia(Request $request, Server $server) } }, $media); - return fractal($media, new MediaTransformer())->respond(); + return fractal($media, new MediaTransformer)->respond(); } public function mountMedia(MountMediaRequest $request, Server $server, ISO $iso) { $this->allocationService->mountIso($server, $iso); - return $this->returnNoContent(); + return response()->noContent(); } public function unmountMedia(Server $server, ISO $iso) { $this->allocationService->unmountIso($server, $iso); - return $this->returnNoContent(); + return response()->noContent(); } public function getNetworkSettings(Server $server) { return fractal()->item([ 'nameservers' => $this->cloudinitService->getNameservers($server), - ], new ServerNetworkTransformer())->respond(); + ], new ServerNetworkTransformer)->respond(); } public function updateNetworkSettings(UpdateNetworkRequest $request, Server $server) @@ -181,14 +179,14 @@ public function updateNetworkSettings(UpdateNetworkRequest $request, Server $ser return fractal()->item([ 'nameservers' => $this->cloudinitService->getNameservers($server), - ], new ServerNetworkTransformer())->respond(); + ], new ServerNetworkTransformer)->respond(); } public function getAuthSettings(Server $server) { return fractal()->item([ 'ssh_keys' => $this->authService->getSSHKeys($server), - ], new ServerSecurityTransformer())->respond(); + ], new ServerSecurityTransformer)->respond(); } public function updateAuthSettings(UpdateAuthSettingsRequest $request, Server $server) @@ -199,6 +197,6 @@ public function updateAuthSettings(UpdateAuthSettingsRequest $request, Server $s $this->authService->updatePassword($server, $request->password); } - return $this->returnNoContent(); + return response()->noContent(); } } diff --git a/app/Http/Controllers/Client/Servers/SnapshotController.php b/app/Http/Controllers/Client/Servers/SnapshotController.php index 0e51d353bd8..b0aa807d250 100644 --- a/app/Http/Controllers/Client/Servers/SnapshotController.php +++ b/app/Http/Controllers/Client/Servers/SnapshotController.php @@ -2,15 +2,12 @@ namespace App\Http\Controllers\Client\Servers; -use App\Http\Controllers\Controller; use App\Models\Server; use App\Repositories\Eloquent\SnapshotRepository; -class SnapshotController extends Controller +class SnapshotController { - public function __construct(private SnapshotRepository $repository) - { - } + public function __construct(private SnapshotRepository $repository) {} public function index(Server $server) { diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 77ec359ab4d..2e8af07a455 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -2,11 +2,4 @@ namespace App\Http\Controllers; -use Illuminate\Foundation\Auth\Access\AuthorizesRequests; -use Illuminate\Foundation\Validation\ValidatesRequests; -use Illuminate\Routing\Controller as BaseController; - -class Controller extends BaseController -{ - use AuthorizesRequests, ValidatesRequests; -} +abstract class Controller {} diff --git a/app/Http/Controllers/Coterm/SessionController.php b/app/Http/Controllers/Coterm/SessionController.php index dae409d7110..f49890b46c2 100644 --- a/app/Http/Controllers/Coterm/SessionController.php +++ b/app/Http/Controllers/Coterm/SessionController.php @@ -3,18 +3,15 @@ namespace App\Http\Controllers\Coterm; use App\Enums\Server\ConsoleType; -use App\Http\Controllers\Controller; use App\Http\Requests\Coterm\StoreSessionRequest; use App\Models\Server; use App\Services\Servers\ServerConsoleService; use App\Transformers\Coterm\NoVncCredentialsTransformer; use App\Transformers\Coterm\XTermCredentialsTransformer; -class SessionController extends Controller +class SessionController { - public function __construct(private ServerConsoleService $consoleService) - { - } + public function __construct(private ServerConsoleService $consoleService) {} public function store(StoreSessionRequest $request, Server $server) { @@ -26,14 +23,16 @@ public function store(StoreSessionRequest $request, Server $server) return fractal()->item([ 'server' => $server, 'credentials' => $credentials, - ], new NoVncCredentialsTransformer())->respond(); + ], new NoVncCredentialsTransformer)->respond(); } elseif ($consoleType === ConsoleType::XTERMJS) { $credentials = $this->consoleService->createXTermjsCredentials($server); return fractal()->item([ 'server' => $server, 'credentials' => $credentials, - ], new XTermCredentialsTransformer())->respond(); + ], new XTermCredentialsTransformer)->respond(); } + + return response()->json(['error' => 'Invalid console type'], 400); } } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php deleted file mode 100644 index 884843c8ea1..00000000000 --- a/app/Http/Kernel.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ - protected $middleware = [ - // \App\Http\Middleware\TrustHosts::class, - TrustProxies::class, - HandleCors::class, - PreventRequestsDuringMaintenance::class, - ValidatePostSize::class, - TrimStrings::class, - ConvertEmptyStringsToNull::class, - ]; - - /** - * The application's route middleware groups. - * - * @var array> - */ - protected $middlewareGroups = [ - 'web' => [ - EncryptCookies::class, - AddQueuedCookiesToResponse::class, - StartSession::class, - ShareErrorsFromSession::class, - VerifyCsrfToken::class, - SubstituteBindings::class, - ], - - 'api' => [ - // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - // \Illuminate\Routing\Middleware\ThrottleRequests::class . ':api', - SubstituteBindings::class, - ], - ]; - - /** - * The application's middleware aliases. - * - * Aliases may be used to conveniently assign middleware to routes and groups. - * - * @var array - */ - protected $middlewareAliases = [ - 'auth' => Authenticate::class, - 'auth.basic' => AuthenticateWithBasicAuth::class, - 'auth.session' => AuthenticateSession::class, - 'cache.headers' => SetCacheHeaders::class, - 'can' => Authorize::class, - 'guest' => RedirectIfAuthenticated::class, - 'password.confirm' => RequirePassword::class, - 'signed' => ValidateSignature::class, - 'throttle' => ThrottleRequests::class, - 'verified' => EnsureEmailIsVerified::class, - ]; -} diff --git a/app/Http/Middleware/Activity/AccountSubject.php b/app/Http/Middleware/Activity/AccountSubject.php index b2dff5feccf..544e41482de 100644 --- a/app/Http/Middleware/Activity/AccountSubject.php +++ b/app/Http/Middleware/Activity/AccountSubject.php @@ -2,8 +2,8 @@ namespace App\Http\Middleware\Activity; -use Closure; use App\Facades\LogTarget; +use Closure; use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/app/Http/Middleware/Activity/ServerSubject.php b/app/Http/Middleware/Activity/ServerSubject.php index f59c83a6595..e371474b5cc 100644 --- a/app/Http/Middleware/Activity/ServerSubject.php +++ b/app/Http/Middleware/Activity/ServerSubject.php @@ -2,9 +2,9 @@ namespace App\Http\Middleware\Activity; -use Closure; use App\Facades\LogTarget; use App\Models\Server; +use Closure; use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/app/Http/Middleware/Admin/Server/ValidateServerStatusMiddleware.php b/app/Http/Middleware/Admin/Server/ValidateServerStatusMiddleware.php index 06173d695be..bd157c75752 100644 --- a/app/Http/Middleware/Admin/Server/ValidateServerStatusMiddleware.php +++ b/app/Http/Middleware/Admin/Server/ValidateServerStatusMiddleware.php @@ -2,10 +2,10 @@ namespace App\Http\Middleware\Admin\Server; -use Closure; use App\Enums\Server\Status; use App\Exceptions\Http\Server\ServerStatusConflictException; use App\Models\Server; +use Closure; use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -16,7 +16,7 @@ public function handle(Request $request, Closure $next): Response { $server = $request->route()->parameter('server'); - if (!$server instanceof Server) { + if (! $server instanceof Server) { throw new NotFoundHttpException('Server not found'); } diff --git a/app/Http/Middleware/AdminAuthenticate.php b/app/Http/Middleware/AdminAuthenticate.php index 0f0dcec21d0..6a9177140ba 100644 --- a/app/Http/Middleware/AdminAuthenticate.php +++ b/app/Http/Middleware/AdminAuthenticate.php @@ -17,7 +17,7 @@ class AdminAuthenticate */ public function handle(Request $request, Closure $next): Response { - if (!$request->user() || !$request->user()->root_admin) { + if (! $request->user() || ! $request->user()->root_admin) { throw new AccessDeniedHttpException(); } diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index a3c37da275e..00000000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,21 +0,0 @@ -expectsJson()) { - return null; - } - - return route('login'); - } -} diff --git a/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php b/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php index 01f391cc064..bdf1b4dd32c 100644 --- a/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php +++ b/app/Http/Middleware/Client/Server/AuthenticateServerAccess.php @@ -2,9 +2,9 @@ namespace App\Http\Middleware\Client\Server; -use Closure; use App\Exceptions\Http\Server\ServerStatusConflictException; use App\Models\Server; +use Closure; use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -24,11 +24,11 @@ public function handle(Request $request, Closure $next): Response $user = $request->user(); $server = $request->route()->parameter('server'); - if (!$server instanceof Server) { + if (! $server instanceof Server) { throw new NotFoundHttpException('Server not found'); } - if ($user->id !== $server->user_id && !$user->root_admin) { + if ($user->id !== $server->user_id && ! $user->root_admin) { throw new NotFoundHttpException('Server not found'); } diff --git a/app/Http/Middleware/Client/Server/ServerInstalled.php b/app/Http/Middleware/Client/Server/ServerInstalled.php index c32436da75e..f4e63e23322 100644 --- a/app/Http/Middleware/Client/Server/ServerInstalled.php +++ b/app/Http/Middleware/Client/Server/ServerInstalled.php @@ -2,8 +2,8 @@ namespace App\Http\Middleware\Client\Server; -use Closure; use App\Models\Server; +use Closure; use Illuminate\Http\Request; use Illuminate\Http\Response; use Symfony\Component\HttpKernel\Exception\HttpException; @@ -21,13 +21,13 @@ public function handle( /** @var Server|null $server */ $server = $request->route()->parameter('server'); - if (!$server instanceof Server) { + if (! $server instanceof Server) { throw new NotFoundHttpException( 'No server resource was located in the request parameters.', ); } - if (!$server->isInstalled()) { + if (! $server->isInstalled()) { throw new HttpException( Response::HTTP_FORBIDDEN, 'Access to this resource is not allowed due to the current installation state.', diff --git a/app/Http/Middleware/Client/Server/ServerNotInstalled.php b/app/Http/Middleware/Client/Server/ServerNotInstalled.php index 741b2bb0f9d..133645d3f94 100644 --- a/app/Http/Middleware/Client/Server/ServerNotInstalled.php +++ b/app/Http/Middleware/Client/Server/ServerNotInstalled.php @@ -2,8 +2,8 @@ namespace App\Http\Middleware\Client\Server; -use Closure; use App\Models\Server; +use Closure; use Illuminate\Http\Request; use Illuminate\Http\Response; use Symfony\Component\HttpKernel\Exception\HttpException; @@ -21,13 +21,13 @@ public function handle( /** @var Server|null $server */ $server = $request->route()->parameter('server'); - if (!$server instanceof Server) { + if (! $server instanceof Server) { throw new NotFoundHttpException( 'No server resource was located in the request parameters.', ); } - if (!$server->isInstalled()) { + if (! $server->isInstalled()) { throw new HttpException( Response::HTTP_FORBIDDEN, 'Access to this resource is not allowed due to the current non-installation state.', diff --git a/app/Http/Middleware/Client/Server/SubstituteBindings.php b/app/Http/Middleware/Client/Server/SubstituteBindings.php index 5997089f53a..231da071460 100644 --- a/app/Http/Middleware/Client/Server/SubstituteBindings.php +++ b/app/Http/Middleware/Client/Server/SubstituteBindings.php @@ -2,8 +2,8 @@ namespace App\Http\Middleware\Client\Server; -use Closure; use App\Models\Server; +use Closure; use Illuminate\Http\Request; use Illuminate\Routing\Middleware\SubstituteBindings as Middleware; use Symfony\Component\HttpFoundation\Response; diff --git a/app/Http/Middleware/Coterm/CotermAuthenticate.php b/app/Http/Middleware/Coterm/CotermAuthenticate.php index 96c4b1d17f6..02942352b49 100644 --- a/app/Http/Middleware/Coterm/CotermAuthenticate.php +++ b/app/Http/Middleware/Coterm/CotermAuthenticate.php @@ -18,7 +18,7 @@ class CotermAuthenticate /** * Check if a request from the daemon can be properly attributed back to a single node instance. * - * @throws \Symfony\Component\HttpKernel\Exception\HttpException + * @throws HttpException */ public function handle(Request $request, \Closure $next): mixed { diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php deleted file mode 100644 index 867695bdcff..00000000000 --- a/app/Http/Middleware/EncryptCookies.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} diff --git a/app/Http/Middleware/PreventRequestsDuringMaintenance.php b/app/Http/Middleware/PreventRequestsDuringMaintenance.php deleted file mode 100644 index 74cbd9a9eaa..00000000000 --- a/app/Http/Middleware/PreventRequestsDuringMaintenance.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php deleted file mode 100644 index 240a1d25c45..00000000000 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ /dev/null @@ -1,32 +0,0 @@ -check()) { - return redirect(RouteServiceProvider::HOME); - } - } - - return $next($request); - } -} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php deleted file mode 100644 index 88cadcaaf28..00000000000 --- a/app/Http/Middleware/TrimStrings.php +++ /dev/null @@ -1,19 +0,0 @@ - - */ - protected $except = [ - 'current_password', - 'password', - 'password_confirmation', - ]; -} diff --git a/app/Http/Middleware/TrustHosts.php b/app/Http/Middleware/TrustHosts.php deleted file mode 100644 index c9c58bddcea..00000000000 --- a/app/Http/Middleware/TrustHosts.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ - public function hosts(): array - { - return [ - $this->allSubdomainsOfApplicationUrl(), - ]; - } -} diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php deleted file mode 100644 index 3391630ecc9..00000000000 --- a/app/Http/Middleware/TrustProxies.php +++ /dev/null @@ -1,28 +0,0 @@ -|string|null - */ - protected $proxies; - - /** - * The headers that should be used to detect proxies. - * - * @var int - */ - protected $headers = - Request::HEADER_X_FORWARDED_FOR | - Request::HEADER_X_FORWARDED_HOST | - Request::HEADER_X_FORWARDED_PORT | - Request::HEADER_X_FORWARDED_PROTO | - Request::HEADER_X_FORWARDED_AWS_ELB; -} diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php deleted file mode 100644 index 093bf64af81..00000000000 --- a/app/Http/Middleware/ValidateSignature.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - protected $except = [ - // 'fbclid', - // 'utm_campaign', - // 'utm_content', - // 'utm_medium', - // 'utm_source', - // 'utm_term', - ]; -} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php deleted file mode 100644 index 9e86521722b..00000000000 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ - protected $except = [ - // - ]; -} diff --git a/app/Http/Requests/Admin/AddressPools/Addresses/StoreAddressRequest.php b/app/Http/Requests/Admin/AddressPools/Addresses/StoreAddressRequest.php index 62a822a962a..e7129c15a40 100644 --- a/app/Http/Requests/Admin/AddressPools/Addresses/StoreAddressRequest.php +++ b/app/Http/Requests/Admin/AddressPools/Addresses/StoreAddressRequest.php @@ -36,7 +36,7 @@ public function after(): array ); } - if (!$this->boolean('is_bulk_action')) { + if (! $this->boolean('is_bulk_action')) { $pool = $this->parameter('address_pool', AddressPool::class); $rules[] = new ValidateAddressType( $this->enum('type', AddressType::class), @@ -63,7 +63,7 @@ protected function passedValidation(): void ]); } - if (!is_null($this->mac_address)) { + if (! is_null($this->mac_address)) { $this->replace([ 'mac_address' => strtolower($this->string('mac_address')), ]); diff --git a/app/Http/Requests/Admin/AddressPools/StoreAddressPoolRequest.php b/app/Http/Requests/Admin/AddressPools/StoreAddressPoolRequest.php index a0674892e8c..a0a9c321813 100644 --- a/app/Http/Requests/Admin/AddressPools/StoreAddressPoolRequest.php +++ b/app/Http/Requests/Admin/AddressPools/StoreAddressPoolRequest.php @@ -10,6 +10,7 @@ class StoreAddressPoolRequest extends FormRequest public function rules(): array { $rules = AddressPool::getRules(); + return [ ...$rules, 'node_ids' => 'sometimes|array', diff --git a/app/Http/Requests/Admin/Nodes/Isos/StoreIsoRequest.php b/app/Http/Requests/Admin/Nodes/Isos/StoreIsoRequest.php index 533b5b189ee..1ed569e5699 100644 --- a/app/Http/Requests/Admin/Nodes/Isos/StoreIsoRequest.php +++ b/app/Http/Requests/Admin/Nodes/Isos/StoreIsoRequest.php @@ -44,7 +44,7 @@ function (Validator $validator) { }, ]; - if (!$this->boolean('should_download')) { + if (! $this->boolean('should_download')) { $rules[] = function (Validator $validator) { $node = $this->parameter('node', Node::class); diff --git a/app/Http/Requests/Admin/Nodes/Isos/UpdateIsoRequest.php b/app/Http/Requests/Admin/Nodes/Isos/UpdateIsoRequest.php index ab827e65383..b0d0e2739fd 100644 --- a/app/Http/Requests/Admin/Nodes/Isos/UpdateIsoRequest.php +++ b/app/Http/Requests/Admin/Nodes/Isos/UpdateIsoRequest.php @@ -16,5 +16,4 @@ public function rules(): array 'hidden' => $rules['hidden'], ]; } - } diff --git a/app/Http/Requests/Admin/Servers/Settings/UpdateDetailsRequest.php b/app/Http/Requests/Admin/Servers/Settings/UpdateDetailsRequest.php index 9233695a61b..b817c5c5ed7 100644 --- a/app/Http/Requests/Admin/Servers/Settings/UpdateDetailsRequest.php +++ b/app/Http/Requests/Admin/Servers/Settings/UpdateDetailsRequest.php @@ -42,7 +42,7 @@ public function validated($key = null, $default = null): array $data = parent::validated(); // Adjust the limits field to match what is expected by the model. - if (!empty($data['limits'])) { + if (! empty($data['limits'])) { foreach ($data['limits'] as $key => $value) { $data[$key] = $value; } diff --git a/app/Http/Requests/Admin/Servers/StoreServerRequest.php b/app/Http/Requests/Admin/Servers/StoreServerRequest.php index c2ac305e82d..970772d6cc6 100644 --- a/app/Http/Requests/Admin/Servers/StoreServerRequest.php +++ b/app/Http/Requests/Admin/Servers/StoreServerRequest.php @@ -48,7 +48,7 @@ public function withValidator(Validator $validator): void $validator->after(function ($validator) { $addressIds = $this->input('limits.address_ids'); - if (!is_null($addressIds)) { + if (! is_null($addressIds)) { $addresses = Address::whereIn('id', $addressIds)->get(); foreach ($addresses as $address) { diff --git a/app/Http/Requests/Auth/LoginRequest.php b/app/Http/Requests/Auth/LoginRequest.php index fab802ecb64..1196f7108f6 100644 --- a/app/Http/Requests/Auth/LoginRequest.php +++ b/app/Http/Requests/Auth/LoginRequest.php @@ -40,7 +40,7 @@ public function authenticate(): void { $this->ensureIsNotRateLimited(); - if (!Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) { + if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) { RateLimiter::hit($this->throttleKey()); throw ValidationException::withMessages([ @@ -59,7 +59,7 @@ public function authenticate(): void */ public function ensureIsNotRateLimited(): void { - if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { + if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) { return; } @@ -80,6 +80,6 @@ public function ensureIsNotRateLimited(): void */ public function throttleKey(): string { - return Str::lower($this->input('email')) . '|' . $this->ip(); + return Str::lower($this->input('email')).'|'.$this->ip(); } } diff --git a/app/Http/Requests/BaseApiRequest.php b/app/Http/Requests/BaseApiRequest.php index 4694b447d8f..bc6847e3067 100644 --- a/app/Http/Requests/BaseApiRequest.php +++ b/app/Http/Requests/BaseApiRequest.php @@ -29,7 +29,7 @@ public function authorize(): bool */ protected function prepareForValidation(): void { - if (!$this->passesAuthorization()) { + if (! $this->passesAuthorization()) { $this->failedAuthorization(); } @@ -54,7 +54,7 @@ protected function passesAuthorization(): bool return true; } - if (!parent::passesAuthorization()) { + if (! parent::passesAuthorization()) { return false; } diff --git a/app/Http/Requests/Client/Servers/Settings/MountMediaRequest.php b/app/Http/Requests/Client/Servers/Settings/MountMediaRequest.php index 6a1a1f92b56..58132e8e569 100644 --- a/app/Http/Requests/Client/Servers/Settings/MountMediaRequest.php +++ b/app/Http/Requests/Client/Servers/Settings/MountMediaRequest.php @@ -12,7 +12,7 @@ public function authorize(): bool $iso = $this->parameter('iso', ISO::class); // check if they're authorized to mount a hidden media (iso) - if ($iso->hidden && !$this->user()->root_admin) { + if ($iso->hidden && ! $this->user()->root_admin) { return false; } diff --git a/app/Jobs/Server/MonitorStateJob.php b/app/Jobs/Server/MonitorStateJob.php index a2b61463c46..0fa17bbddbd 100644 --- a/app/Jobs/Server/MonitorStateJob.php +++ b/app/Jobs/Server/MonitorStateJob.php @@ -2,10 +2,10 @@ namespace App\Jobs\Server; -use Closure; use App\Enums\Server\State; use App\Models\Server; use App\Repositories\Proxmox\Server\ProxmoxServerRepository; +use Closure; use Illuminate\Bus\Batchable; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; @@ -25,8 +25,8 @@ public function retryUntil(): Carbon } public function __construct( - protected int $serverId, - protected State $targetState, + protected int $serverId, + protected State $targetState, protected ?Closure $callback = null, ) { // diff --git a/app/Jobs/Server/WaitUntilVmIsCreatedJob.php b/app/Jobs/Server/WaitUntilVmIsCreatedJob.php index 71b4bcde744..3e7b4e794c6 100644 --- a/app/Jobs/Server/WaitUntilVmIsCreatedJob.php +++ b/app/Jobs/Server/WaitUntilVmIsCreatedJob.php @@ -37,7 +37,7 @@ public function handle(ServerBuildService $service): void $isCreated = $service->isVmCreated($server); - if (!$isCreated) { + if (! $isCreated) { $this->release(3); } } diff --git a/app/Jobs/Server/WaitUntilVmIsDeletedJob.php b/app/Jobs/Server/WaitUntilVmIsDeletedJob.php index c6cc347566b..074f36cfa99 100644 --- a/app/Jobs/Server/WaitUntilVmIsDeletedJob.php +++ b/app/Jobs/Server/WaitUntilVmIsDeletedJob.php @@ -37,7 +37,7 @@ public function handle(ServerBuildService $service): void $isDeleted = $service->isVmDeleted($server); - if (!$isDeleted) { + if (! $isDeleted) { $this->release(3); } } diff --git a/app/Models/ActivityLog.php b/app/Models/ActivityLog.php index 82312218b08..aee6b4101ed 100644 --- a/app/Models/ActivityLog.php +++ b/app/Models/ActivityLog.php @@ -18,11 +18,6 @@ class ActivityLog extends Model 'timestamp', ]; - protected $casts = [ - 'properties' => 'collection', - 'timestamp' => 'datetime', - ]; - protected $with = ['subjects']; public static array $validationRules = [ @@ -33,6 +28,14 @@ class ActivityLog extends Model 'properties' => ['array'], ]; + protected function casts(): array + { + return [ + 'properties' => 'collection', + 'timestamp' => 'datetime', + ]; + } + public function actor(): MorphTo { $morph = $this->morphTo(); @@ -66,7 +69,7 @@ public function scopeForActor(Builder $builder, Model $actor): Builder * * @see https://laravel.com/docs/9.x/eloquent#pruning-models */ - public function prunable(): ActivityLog + public function prunable(): self { if (is_null(config('activity.prune_days'))) { throw new LogicException( diff --git a/app/Models/Address.php b/app/Models/Address.php index 3be73003cc0..b6bf543b58a 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -8,7 +8,7 @@ class Address extends Model { use HasFactory; - + protected $table = 'ip_addresses'; protected $guarded = ['id', 'updated_at', 'created_at']; diff --git a/app/Models/Backup.php b/app/Models/Backup.php index e8eeabe4193..c54ed1c77de 100644 --- a/app/Models/Backup.php +++ b/app/Models/Backup.php @@ -14,11 +14,6 @@ class Backup extends Model protected $guarded = ['id', 'created_at', 'updated_at']; - protected $casts = [ - 'completed_at' => 'datetime', - 'size' => StorageSizeCast::class, - ]; - public static array $validationRules = [ 'uuid' => 'required|uuid', 'server_id' => 'required|exists:servers,id', @@ -30,6 +25,14 @@ class Backup extends Model 'completed_at' => 'nullable|date', ]; + protected function casts(): array + { + return [ + 'completed_at' => 'datetime', + 'size' => StorageSizeCast::class, + ]; + } + public function server(): BelongsTo { return $this->belongsTo(Server::class); diff --git a/app/Models/Coterm.php b/app/Models/Coterm.php index b79db45bec2..7b4ea31c298 100644 --- a/app/Models/Coterm.php +++ b/app/Models/Coterm.php @@ -7,13 +7,13 @@ class Coterm extends Model { - /** * The constants for generating Coterm secret keys */ public const COTERM_TOKEN_ID_LENGTH = 16; + public const COTERM_TOKEN_LENGTH = 64; - + protected $guarded = [ 'id', 'created_at', @@ -24,11 +24,6 @@ class Coterm extends Model 'token_id', 'token', ]; - protected $casts = [ - 'is_tls_enabled' => 'boolean', - 'coterm_token' => NullableEncrypter::class, - ]; - public static array $validationRules = [ 'name' => 'required|string|max:191', 'is_tls_enabled' => 'required|boolean', @@ -38,6 +33,14 @@ class Coterm extends Model 'token' => 'required|string|max:191', ]; + protected function casts(): array + { + return [ + 'is_tls_enabled' => 'boolean', + 'coterm_token' => NullableEncrypter::class, + ]; + } + public function nodes(): HasMany { return $this->hasMany(Node::class); diff --git a/app/Models/Filters/FiltersAddressByNodeId.php b/app/Models/Filters/FiltersAddressByNodeId.php index 0cced4c51f9..65e32180592 100644 --- a/app/Models/Filters/FiltersAddressByNodeId.php +++ b/app/Models/Filters/FiltersAddressByNodeId.php @@ -10,13 +10,13 @@ class FiltersAddressByNodeId implements Filter public function __invoke(Builder $query, $value, string $property): void { $query->whereRaw( - " + ' address_pool_id IN ( SELECT apn.address_pool_id FROM address_pool_to_node apn WHERE apn.node_id = ? ) - ", + ', [$value], ); } diff --git a/app/Models/Filters/FiltersServerByAddressPoolId.php b/app/Models/Filters/FiltersServerByAddressPoolId.php index 49d71158b3b..332f786c102 100644 --- a/app/Models/Filters/FiltersServerByAddressPoolId.php +++ b/app/Models/Filters/FiltersServerByAddressPoolId.php @@ -10,14 +10,14 @@ class FiltersServerByAddressPoolId implements Filter public function __invoke(Builder $query, $value, string $property): void { $query->whereRaw( - " + ' id IN ( SELECT serv.id FROM servers serv JOIN address_pool_to_node apn ON serv.node_id = apn.node_id WHERE apn.address_pool_id = ? ) - ", + ', [$value], ); } diff --git a/app/Models/ISO.php b/app/Models/ISO.php index 972c7f4bf39..fa5e715cf63 100644 --- a/app/Models/ISO.php +++ b/app/Models/ISO.php @@ -15,12 +15,6 @@ class ISO extends Model protected $guarded = ['id', 'created_at', 'updated_at']; - protected $casts = [ - 'is_successful' => 'boolean', - 'size' => StorageSizeCast::class, - 'hidden' => 'boolean', - ]; - public static array $validationRules = [ 'node_id' => 'required|integer|exists:nodes,id', 'is_successful' => 'sometimes|boolean', @@ -31,6 +25,15 @@ class ISO extends Model 'completed_at' => 'nullable|date', ]; + protected function casts(): array + { + return [ + 'is_successful' => 'boolean', + 'size' => StorageSizeCast::class, + 'hidden' => 'boolean', + ]; + } + public function node(): BelongsTo { return $this->belongsTo(Node::class); diff --git a/app/Models/Model.php b/app/Models/Model.php index 1208f43e508..d32832a0a53 100644 --- a/app/Models/Model.php +++ b/app/Models/Model.php @@ -2,8 +2,8 @@ namespace App\Models; -use Carbon\CarbonImmutable; use App\Exceptions\Model\DataValidationException; +use Carbon\CarbonImmutable; use Illuminate\Container\Container; use Illuminate\Contracts\Container\BindingResolutionException; use Illuminate\Contracts\Validation\Factory; @@ -122,7 +122,7 @@ public static function getRulesForUpdate( IlluminateModel|int|string $model, string $column = 'id', ): array { - if ($model instanceof Model) { + if ($model instanceof self) { [$id, $column] = [$model->getKey(), $model->getKeyName()]; } @@ -133,7 +133,7 @@ public static function getRulesForUpdate( // working model, so we don't run into errors due to the way that field validation // works. foreach ($data as &$datum) { - if (!is_string($datum) || !Str::startsWith($datum, 'unique')) { + if (! is_string($datum) || ! Str::startsWith($datum, 'unique')) { continue; } @@ -167,7 +167,7 @@ public function validate(): void ), ); - if (!$validator->passes()) { + if (! $validator->passes()) { throw new ValidationException($validator); } } @@ -177,7 +177,7 @@ public function validate(): void */ protected function asDateTime(mixed $value): Carbon|CarbonImmutable { - if (!$this->immutableDates) { + if (! $this->immutableDates) { return parent::asDateTime($value); } diff --git a/app/Models/Node.php b/app/Models/Node.php index 9af4415c945..31c30da5997 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -21,16 +21,6 @@ class Node extends Model 'secret', ]; - /** - * Cast values to correct type. - */ - protected $casts = [ - 'verify_tls' => 'boolean', - 'memory' => StorageSizeCast::class, - 'disk' => StorageSizeCast::class, - 'secret' => 'encrypted', - ]; - /** * Fields that aren't mass assignable */ @@ -51,6 +41,21 @@ class Node extends Model 'coterm_id' => 'sometimes|nullable|integer|exists:coterms,id', ]; + /** + * Get the attributes that should be cast. + * + * @return array + */ + protected function casts(): array + { + return [ + 'verify_tls' => 'boolean', + 'memory' => StorageSizeCast::class, + 'disk' => StorageSizeCast::class, + 'secret' => 'encrypted', + ]; + } + /** * Get the connection address to use when making calls to this node's assigned Coterm endpoint. */ diff --git a/app/Models/PersonalAccessToken.php b/app/Models/PersonalAccessToken.php index 2d534191f22..8477c62ae1e 100644 --- a/app/Models/PersonalAccessToken.php +++ b/app/Models/PersonalAccessToken.php @@ -17,9 +17,12 @@ class PersonalAccessToken extends SanctumPersonalAccessToken 'abilities', ]; - protected $casts = [ - 'type' => ApiKeyType::class, - 'abilities' => 'json', - 'last_used_at' => 'datetime', - ]; + protected function casts(): array + { + return [ + 'type' => ApiKeyType::class, + 'abilities' => 'json', + 'last_used_at' => 'datetime', + ]; + } } diff --git a/app/Models/Server.php b/app/Models/Server.php index 7e9cb1b3fe7..5a5103b9a0f 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -15,13 +15,6 @@ class Server extends Model { use HasFactory; - protected $casts = [ - 'memory' => StorageSizeCast::class, - 'disk' => StorageSizeCast::class, - 'bandwidth_usage' => StorageSizeCast::class, - 'bandwidth_limit' => StorageSizeCast::class, - ]; - protected $guarded = [ 'id', 'updated_at', @@ -47,6 +40,16 @@ class Server extends Model 'hydrated_at' => 'nullable|date', ]; + protected function casts(): array + { + return [ + 'memory' => StorageSizeCast::class, + 'disk' => StorageSizeCast::class, + 'bandwidth_usage' => StorageSizeCast::class, + 'bandwidth_limit' => StorageSizeCast::class, + ]; + } + public function node(): BelongsTo { return $this->belongsTo(Node::class); @@ -115,7 +118,7 @@ public function isSuspended(): bool public function validateCurrentState(): void { if ( - !is_null($this->status) + ! is_null($this->status) ) { throw new ServerStatusConflictException($this); } diff --git a/app/Models/Snapshot.php b/app/Models/Snapshot.php index 9a43f0647d9..d1f13a09136 100644 --- a/app/Models/Snapshot.php +++ b/app/Models/Snapshot.php @@ -37,12 +37,12 @@ public function server(): BelongsTo public function snapshot(): BelongsTo { - return $this->belongsTo(Snapshot::class); + return $this->belongsTo(self::class); } public function children(): HasMany { - return $this->hasMany(Snapshot::class, 'snapshot_id')->with('children'); + return $this->hasMany(self::class, 'snapshot_id')->with('children'); } protected static function boot(): void diff --git a/app/Models/Storage.php b/app/Models/Storage.php index 557178ba912..f308cf0b41b 100644 --- a/app/Models/Storage.php +++ b/app/Models/Storage.php @@ -16,10 +16,6 @@ class Storage extends Model 'id', ]; - protected $casts = [ - 'size' => StorageSizeCast::class, - ]; - public static array $validationRules = [ 'nickname' => 'required_if:is_shareable,1|string|max:40', 'description' => 'nullable|string|max:191', @@ -34,6 +30,13 @@ class Storage extends Model 'has_snippets' => 'required|boolean', ]; + protected function casts(): array + { + return [ + 'size' => StorageSizeCast::class, + ]; + } + public function nodes(): BelongsToMany { return $this->belongsToMany( diff --git a/app/Models/User.php b/app/Models/User.php index 78e6cf5e35f..5c99a1a85db 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -59,19 +59,22 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac ]; /** - * The attributes that should be cast. + * Get the attributes that should be cast. * - * @var array + * @return array */ - protected $casts = [ - 'email_verified_at' => 'datetime', - 'root_admin' => 'boolean', - ]; + protected function casts(): array + { + return [ + 'email_verified_at' => 'datetime', + 'root_admin' => 'boolean', + ]; + } public function createToken( - string $name, + string $name, ApiKeyType $type, - array $abilities = ['*'], + array $abilities = ['*'], ): NewAccessToken { $token = $this->tokens()->create([ 'type' => $type, @@ -80,7 +83,7 @@ public function createToken( 'abilities' => $abilities, ]); - return new NewAccessToken($token, $token->getKey() . '|' . $plainTextToken); + return new NewAccessToken($token, $token->getKey().'|'.$plainTextToken); } public function servers(): HasMany diff --git a/app/Providers/ActivityLogServiceProvider.php b/app/Providers/ActivityLogServiceProvider.php index f783a3fd082..611d4e9f75d 100644 --- a/app/Providers/ActivityLogServiceProvider.php +++ b/app/Providers/ActivityLogServiceProvider.php @@ -2,9 +2,9 @@ namespace App\Providers; -use Illuminate\Support\ServiceProvider; use App\Services\Activity\ActivityLogBatchService; use App\Services\Activity\ActivityLogTargetableService; +use Illuminate\Support\ServiceProvider; class ActivityLogServiceProvider extends ServiceProvider { diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 4faf484bd6b..6a2645fa1c8 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,11 +3,22 @@ namespace App\Providers; use App\Models\PersonalAccessToken; +use App\Models\Server; +use Illuminate\Support\Facades\Route; use Illuminate\Support\ServiceProvider; use Laravel\Sanctum\Sanctum; class AppServiceProvider extends ServiceProvider { + /** + * The path to the "home" route for your application. + * + * Typically, users are redirected here after authentication. + * + * @var string + */ + public const HOME = '/'; + /** * Register any application services. */ @@ -22,5 +33,15 @@ public function register(): void public function boot(): void { Sanctum::usePersonalAccessTokenModel(PersonalAccessToken::class); + + $this->bootRoute(); + } + + public function bootRoute(): void + { + Route::bind('server', function ($value) { + return Server::query()->where(strlen($value) === 8 ? 'uuid_short' : 'uuid', $value) + ->firstOrFail(); + }); } } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php deleted file mode 100644 index faa84c0da19..00000000000 --- a/app/Providers/AuthServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - */ - protected $policies = [ - // 'App\Models\Model' => 'App\Policies\ModelPolicy', - ]; - - /** - * Register any authentication / authorization services. - */ - public function boot(): void - { - // - } -} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index 8e326d05f44..00000000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,19 +0,0 @@ -> - */ - protected $listen = [ - Registered::class => [ - SendEmailVerificationNotification::class, - ], - ]; - - /** - * Register any events for your application. - */ - public function boot(): void - { - // - } - - /** - * Determine if events and listeners should be automatically discovered. - */ - public function shouldDiscoverEvents(): bool - { - return false; - } -} diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index 37109b81d64..cb3a30aa439 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -2,15 +2,15 @@ namespace App\Providers; -use Illuminate\Http\Request; -use Laravel\Fortify\Fortify; -use Illuminate\Support\ServiceProvider; -use Illuminate\Cache\RateLimiting\Limit; use App\Actions\Fortify\CreateNewUser; -use Illuminate\Support\Facades\RateLimiter; use App\Actions\Fortify\ResetUserPassword; use App\Actions\Fortify\UpdateUserPassword; use App\Actions\Fortify\UpdateUserProfileInformation; +use Illuminate\Cache\RateLimiting\Limit; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\RateLimiter; +use Illuminate\Support\ServiceProvider; +use Laravel\Fortify\Fortify; class FortifyServiceProvider extends ServiceProvider { diff --git a/app/Providers/RepositoryServiceProvider.php b/app/Providers/RepositoryServiceProvider.php index 8a1b99fd1e8..18597d40390 100644 --- a/app/Providers/RepositoryServiceProvider.php +++ b/app/Providers/RepositoryServiceProvider.php @@ -2,9 +2,9 @@ namespace App\Providers; -use Illuminate\Support\ServiceProvider; -use App\Repositories\Eloquent\ActivityRepository; use App\Contracts\Repository\ActivityRepositoryInterface; +use App\Repositories\Eloquent\ActivityRepository; +use Illuminate\Support\ServiceProvider; class RepositoryServiceProvider extends ServiceProvider { diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php deleted file mode 100644 index 9dbe4f027f1..00000000000 --- a/app/Providers/RouteServiceProvider.php +++ /dev/null @@ -1,66 +0,0 @@ -where(strlen($value) === 8 ? 'uuid_short' : 'uuid', $value) - ->firstOrFail(); - }); - - $this->routes(function () { - Route::middleware('web')->group(function () { - Route::middleware('guest')->group(base_path('routes/auth.php')); - - Route::middleware(['auth.session']) - ->group(base_path('routes/base.php')); - - Route::middleware(['auth'])->prefix('/api/client') - ->as('client.') - ->scopeBindings() - ->group(base_path('routes/api-client.php')); - - Route::middleware(['auth', AdminAuthenticate::class]) - ->prefix('/api/admin') - ->as('admin.') - ->scopeBindings() - ->group(base_path('routes/api-admin.php')); - }); - - Route::middleware(['api'])->group(function () { - Route::middleware(['auth:sanctum']) - ->prefix('/api/application') - ->as('application.') - ->scopeBindings() - ->group(base_path('routes/api-application.php')); - - Route::middleware([CotermAuthenticate::class]) - ->prefix('/api/coterm') - ->as('coterm.') - ->scopeBindings() - ->group(base_path('routes/api-coterm.php')); - }); - }); - } -} diff --git a/app/Repositories/Eloquent/ActivityRepository.php b/app/Repositories/Eloquent/ActivityRepository.php index b585e6e139f..dad0889fcbf 100644 --- a/app/Repositories/Eloquent/ActivityRepository.php +++ b/app/Repositories/Eloquent/ActivityRepository.php @@ -2,9 +2,9 @@ namespace App\Repositories\Eloquent; -use App\Models\Server; -use App\Models\ActivityLog; use App\Contracts\Repository\ActivityRepositoryInterface; +use App\Models\ActivityLog; +use App\Models\Server; class ActivityRepository extends EloquentRepository implements ActivityRepositoryInterface { diff --git a/app/Repositories/Eloquent/AddressRepository.php b/app/Repositories/Eloquent/AddressRepository.php index a1f17688598..e77a57f37f3 100644 --- a/app/Repositories/Eloquent/AddressRepository.php +++ b/app/Repositories/Eloquent/AddressRepository.php @@ -16,7 +16,6 @@ public function attachAddresses(Server $server, array $addressIds): void { $placeholders = implode(',', array_fill(0, count($addressIds), '?')); - $query = <<<'SQL' UPDATE ip_addresses SET server_id = ? diff --git a/app/Repositories/Eloquent/EloquentRepository.php b/app/Repositories/Eloquent/EloquentRepository.php index f4f6105c819..50d585fabc6 100644 --- a/app/Repositories/Eloquent/EloquentRepository.php +++ b/app/Repositories/Eloquent/EloquentRepository.php @@ -2,19 +2,19 @@ namespace App\Repositories\Eloquent; -use Closure; -use Illuminate\Http\Request; -use Webmozart\Assert\Assert; -use Illuminate\Support\Collection; -use App\Repositories\Repository; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\Builder; -use Illuminate\Database\Query\Expression; use App\Contracts\Repository\RepositoryInterface; use App\Exceptions\Model\DataValidationException; -use Illuminate\Database\Eloquent\ModelNotFoundException; use App\Exceptions\Repository\RecordNotFoundException; +use App\Repositories\Repository; +use Closure; use Illuminate\Contracts\Pagination\LengthAwarePaginator; +use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\ModelNotFoundException; +use Illuminate\Database\Query\Expression; +use Illuminate\Http\Request; +use Illuminate\Support\Collection; +use Webmozart\Assert\Assert; abstract class EloquentRepository extends Repository implements RepositoryInterface { diff --git a/app/Repositories/Eloquent/ServerRepository.php b/app/Repositories/Eloquent/ServerRepository.php index 7dcf1f520df..c4cb56a9593 100644 --- a/app/Repositories/Eloquent/ServerRepository.php +++ b/app/Repositories/Eloquent/ServerRepository.php @@ -17,7 +17,7 @@ public function model(): string public function isUniqueVmId(int $nodeId, int $vmid): bool { - return !$this->getBuilder() + return ! $this->getBuilder() ->where('vmid', '=', $vmid) ->where('node_id', '=', $nodeId) ->exists(); @@ -28,7 +28,7 @@ public function isUniqueVmId(int $nodeId, int $vmid): bool */ public function isUniqueUuidCombo(string $uuid, string $short): bool { - return !$this->getBuilder()->where('uuid', '=', $uuid)->orWhere('uuid_short', '=', $short) + return ! $this->getBuilder()->where('uuid', '=', $uuid)->orWhere('uuid_short', '=', $short) ->exists(); } diff --git a/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php b/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php index 6fed256010b..8ca4e1c5132 100644 --- a/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php +++ b/app/Repositories/Proxmox/Node/ProxmoxAccessRepository.php @@ -2,14 +2,14 @@ namespace App\Repositories\Proxmox\Node; -use App\Models\Node; -use Illuminate\Support\Str; -use Webmozart\Assert\Assert; -use App\Data\Node\Access\UserData; -use App\Enums\Node\Access\RealmType; use App\Data\Node\Access\CreateUserData; use App\Data\Node\Access\UserCredentialsData; +use App\Data\Node\Access\UserData; +use App\Enums\Node\Access\RealmType; +use App\Models\Node; use App\Repositories\Proxmox\ProxmoxRepository; +use Illuminate\Support\Str; +use Webmozart\Assert\Assert; class ProxmoxAccessRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Node/ProxmoxStorageRepository.php b/app/Repositories/Proxmox/Node/ProxmoxStorageRepository.php index e22cfd6c6da..47b535af9b4 100644 --- a/app/Repositories/Proxmox/Node/ProxmoxStorageRepository.php +++ b/app/Repositories/Proxmox/Node/ProxmoxStorageRepository.php @@ -32,7 +32,7 @@ public function getStorage(string $name): StorageData ->json(); $response = $this->getData($response); - + $has = fn (string $content) => Str::contains($response['content'], $content); return new StorageData( @@ -52,10 +52,10 @@ public function getStorage(string $name): StorageData } public function download( - ContentType $contentType, - string $fileName, - string $link, - ?bool $verifyCertificates = true, + ContentType $contentType, + string $fileName, + string $link, + ?bool $verifyCertificates = true, ?ChecksumData $checksumData = null, ) { Assert::isInstanceOf($this->node, Node::class); diff --git a/app/Repositories/Proxmox/Server/ProxmoxActivityRepository.php b/app/Repositories/Proxmox/Server/ProxmoxActivityRepository.php index 291ca20bd95..568f1d47b97 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxActivityRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxActivityRepository.php @@ -4,8 +4,8 @@ use App\Models\Node; use App\Models\Server; -use Webmozart\Assert\Assert; use App\Repositories\Proxmox\ProxmoxRepository; +use Webmozart\Assert\Assert; class ProxmoxActivityRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxBackupRepository.php b/app/Repositories/Proxmox/Server/ProxmoxBackupRepository.php index f15549c39a7..8db8f23df88 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxBackupRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxBackupRepository.php @@ -50,7 +50,7 @@ public function backup(BackupMode $mode, BackupCompressionType $compressionType) 'vmid' => $this->server->vmid, 'storage' => $this->node->backup_storage, 'mode' => $parsedMode, - 'compress' => $compressionType === BackupCompressionType::NONE ? (int)false : $compressionType->value, + 'compress' => $compressionType === BackupCompressionType::NONE ? (int) false : $compressionType->value, ]) ->json(); diff --git a/app/Repositories/Proxmox/Server/ProxmoxCloudinitRepository.php b/app/Repositories/Proxmox/Server/ProxmoxCloudinitRepository.php index 3d0f29820cd..1461baf7ba1 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxCloudinitRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxCloudinitRepository.php @@ -2,10 +2,10 @@ namespace App\Repositories\Proxmox\Server; +use App\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use App\Models\Server; -use Webmozart\Assert\Assert; use App\Repositories\Proxmox\ProxmoxRepository; -use App\Exceptions\Repository\Proxmox\ProxmoxConnectionException; +use Webmozart\Assert\Assert; class ProxmoxCloudinitRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxConfigRepository.php b/app/Repositories/Proxmox/Server/ProxmoxConfigRepository.php index 97b49b0789a..cc8cf859a2f 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxConfigRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxConfigRepository.php @@ -3,8 +3,8 @@ namespace App\Repositories\Proxmox\Server; use App\Models\Server; -use Webmozart\Assert\Assert; use App\Repositories\Proxmox\ProxmoxRepository; +use Webmozart\Assert\Assert; class ProxmoxConfigRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxConsoleRepository.php b/app/Repositories/Proxmox/Server/ProxmoxConsoleRepository.php index eb6f09d88e8..80292a1c343 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxConsoleRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxConsoleRepository.php @@ -2,13 +2,13 @@ namespace App\Repositories\Proxmox\Server; -use App\Models\Server; -use Webmozart\Assert\Assert; -use GuzzleHttp\Cookie\CookieJar; use App\Data\Node\Access\UserCredentialsData; -use App\Repositories\Proxmox\ProxmoxRepository; use App\Data\Server\Proxmox\Console\NoVncCredentialsData; use App\Data\Server\Proxmox\Console\XTermCredentialsData; +use App\Models\Server; +use App\Repositories\Proxmox\ProxmoxRepository; +use GuzzleHttp\Cookie\CookieJar; +use Webmozart\Assert\Assert; class ProxmoxConsoleRepository extends ProxmoxRepository { @@ -17,18 +17,18 @@ public function createNoVncCredentials(UserCredentialsData $credentials): NoVncC Assert::isInstanceOf($this->server, Server::class); $response = $this->getHttpClient(headers: [ - 'CSRFPreventionToken' => $credentials->csrf_token + 'CSRFPreventionToken' => $credentials->csrf_token, ], options: [ 'cookies' => CookieJar::fromArray([ 'PVEAuthCookie' => $credentials->ticket, - ], $this->node->fqdn) + ], $this->node->fqdn), ], shouldAuthorize: false) ->withUrlParameters([ 'node' => $this->node->cluster, 'server' => $this->server->vmid, ]) ->post('/api2/json/nodes/{node}/qemu/{server}/vncproxy', [ - 'websocket' => true + 'websocket' => true, ]) ->json(); @@ -46,18 +46,18 @@ public function createXTermjsCredentials(UserCredentialsData $credentials): XTer Assert::isInstanceOf($this->server, Server::class); $response = $this->getHttpClient(headers: [ - 'CSRFPreventionToken' => $credentials->csrf_token + 'CSRFPreventionToken' => $credentials->csrf_token, ], options: [ 'cookies' => CookieJar::fromArray([ 'PVEAuthCookie' => $credentials->ticket, - ], $this->node->fqdn) + ], $this->node->fqdn), ], shouldAuthorize: false) ->withUrlParameters([ 'node' => $this->node->cluster, 'server' => $this->server->vmid, ]) ->post('/api2/json/nodes/{node}/qemu/{server}/termproxy', [ - 'vmid' => $this->server->vmid // this is to fix the "NOT A HASH REFERENCE" stupid error Proxmox has if there's no JSON body + 'vmid' => $this->server->vmid, // this is to fix the "NOT A HASH REFERENCE" stupid error Proxmox has if there's no JSON body // bruh fix ur shit proxmox ]) ->json(); diff --git a/app/Repositories/Proxmox/Server/ProxmoxFirewallRepository.php b/app/Repositories/Proxmox/Server/ProxmoxFirewallRepository.php index f34045b3bce..6f45acf4899 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxFirewallRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxFirewallRepository.php @@ -3,8 +3,8 @@ namespace App\Repositories\Proxmox\Server; use App\Models\Server; -use Webmozart\Assert\Assert; use App\Repositories\Proxmox\ProxmoxRepository; +use Webmozart\Assert\Assert; class ProxmoxFirewallRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxPowerRepository.php b/app/Repositories/Proxmox/Server/ProxmoxPowerRepository.php index b6891d8d446..bd5296bf40b 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxPowerRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxPowerRepository.php @@ -2,10 +2,10 @@ namespace App\Repositories\Proxmox\Server; -use App\Models\Server; -use Webmozart\Assert\Assert; use App\Enums\Server\PowerAction; +use App\Models\Server; use App\Repositories\Proxmox\ProxmoxRepository; +use Webmozart\Assert\Assert; class ProxmoxPowerRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxServerRepository.php b/app/Repositories/Proxmox/Server/ProxmoxServerRepository.php index 0ab52ad7fe2..132ae57b06b 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxServerRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxServerRepository.php @@ -76,8 +76,8 @@ public function addUser(RealmType $realmType, string $userId, string $roleId) $response = $this->getHttpClient() ->put('/api2/json/access/acl', [ - 'path' => '/vms/' . $this->server->vmid, - 'users' => $userId . '@' . $realmType->value, + 'path' => '/vms/'.$this->server->vmid, + 'users' => $userId.'@'.$realmType->value, 'roles' => $roleId, ]) ->json(); diff --git a/app/Repositories/Proxmox/Server/ProxmoxSnapshotRepository.php b/app/Repositories/Proxmox/Server/ProxmoxSnapshotRepository.php index 7fb38ba48a5..790958124d3 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxSnapshotRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxSnapshotRepository.php @@ -3,8 +3,8 @@ namespace App\Repositories\Proxmox\Server; use App\Models\Server; -use Webmozart\Assert\Assert; use App\Repositories\Proxmox\ProxmoxRepository; +use Webmozart\Assert\Assert; class ProxmoxSnapshotRepository extends ProxmoxRepository { diff --git a/app/Repositories/Proxmox/Server/ProxmoxStatisticsRepository.php b/app/Repositories/Proxmox/Server/ProxmoxStatisticsRepository.php index 86190468665..9d6d8fe4627 100644 --- a/app/Repositories/Proxmox/Server/ProxmoxStatisticsRepository.php +++ b/app/Repositories/Proxmox/Server/ProxmoxStatisticsRepository.php @@ -2,7 +2,6 @@ namespace App\Repositories\Proxmox\Server; -use Carbon\CarbonImmutable; use App\Data\Server\Proxmox\Usages\ServerDiskData; use App\Data\Server\Proxmox\Usages\ServerNetworkData; use App\Data\Server\Proxmox\Usages\ServerTimepointData; @@ -10,6 +9,7 @@ use App\Enums\Server\StatisticTimeRange; use App\Models\Server; use App\Repositories\Proxmox\ProxmoxRepository; +use Carbon\CarbonImmutable; use Illuminate\Support\Arr; use Spatie\LaravelData\DataCollection; use Webmozart\Assert\Assert; @@ -17,7 +17,7 @@ class ProxmoxStatisticsRepository extends ProxmoxRepository { public function getStatistics( - StatisticTimeRange $from, + StatisticTimeRange $from, StatisticConsolidatorFunction $consolidator = StatisticConsolidatorFunction::AVERAGE, ): DataCollection { Assert::isInstanceOf($this->server, Server::class); diff --git a/app/Repositories/Repository.php b/app/Repositories/Repository.php index 22ef8d93627..63a0d593ae6 100644 --- a/app/Repositories/Repository.php +++ b/app/Repositories/Repository.php @@ -2,11 +2,11 @@ namespace App\Repositories; +use App\Contracts\Repository\RepositoryInterface; use Closure; -use InvalidArgumentException; -use Illuminate\Foundation\Application; use Illuminate\Database\Eloquent\Model; -use App\Contracts\Repository\RepositoryInterface; +use Illuminate\Foundation\Application; +use InvalidArgumentException; abstract class Repository implements RepositoryInterface { @@ -49,7 +49,7 @@ public function getModel(): Model * @param array|string $columns * @return $this */ - public function setColumns($columns = ['*']): Repository|static + public function setColumns($columns = ['*']): self|static { $clone = clone $this; $clone->columns = is_array($columns) ? $columns : func_get_args(); @@ -71,7 +71,7 @@ public function getColumns(): array * * @return $this */ - public function withoutFreshModel(): Repository|static + public function withoutFreshModel(): self|static { return $this->setFreshModel(false); } diff --git a/app/Rules/Fqdn.php b/app/Rules/Fqdn.php index 42fcf9c1bf3..af713482cc1 100644 --- a/app/Rules/Fqdn.php +++ b/app/Rules/Fqdn.php @@ -26,9 +26,9 @@ namespace App\Rules; use Closure; -use Illuminate\Support\Arr; use Illuminate\Contracts\Validation\DataAwareRule; use Illuminate\Contracts\Validation\ValidationRule; +use Illuminate\Support\Arr; class Fqdn implements ValidationRule, DataAwareRule { diff --git a/app/Rules/Hostname.php b/app/Rules/Hostname.php index 7d2864fb090..d5a1c6af6ee 100644 --- a/app/Rules/Hostname.php +++ b/app/Rules/Hostname.php @@ -14,7 +14,7 @@ class Hostname implements ValidationRule */ public function validate(string $attribute, $value, Closure $fail): void { - if (!(bool)filter_var($value, FILTER_VALIDATE_DOMAIN)) { + if (! (bool) filter_var($value, FILTER_VALIDATE_DOMAIN)) { $fail(__('validation.hostname')); } } diff --git a/app/Rules/Password.php b/app/Rules/Password.php index 45ef7e20da6..e9f90ac912e 100644 --- a/app/Rules/Password.php +++ b/app/Rules/Password.php @@ -14,7 +14,7 @@ class Password implements ValidationRule */ public function validate(string $attribute, $value, Closure $fail): void { - if (!(bool)preg_match('/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/', $value)) { + if (! (bool) preg_match('/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/', $value)) { $fail(__('validation.password.default')); } } diff --git a/app/Rules/USKeyboardCharacters.php b/app/Rules/USKeyboardCharacters.php index 23322f93cf6..2f160d6aa2e 100644 --- a/app/Rules/USKeyboardCharacters.php +++ b/app/Rules/USKeyboardCharacters.php @@ -9,7 +9,7 @@ class USKeyboardCharacters implements ValidationRule { public function validate(string $attribute, mixed $value, Closure $fail): void { - if (!(bool)preg_match('/^[\x20-\x7F]*$/', $value)) { + if (! (bool) preg_match('/^[\x20-\x7F]*$/', $value)) { $fail(__('validation.us_keyboard_characters')); } } diff --git a/app/Services/Activity/ActivityLogService.php b/app/Services/Activity/ActivityLogService.php index d0f38bee986..67b9fb58604 100644 --- a/app/Services/Activity/ActivityLogService.php +++ b/app/Services/Activity/ActivityLogService.php @@ -7,19 +7,19 @@ namespace App\Services\Activity; +use App\Models\ActivityLog; +use App\Models\ActivityLogSubject; use Closure; use Exception; -use Throwable; +use Illuminate\Contracts\Auth\Factory; +use Illuminate\Database\ConnectionInterface; +use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Arr; -use Webmozart\Assert\Assert; -use App\Models\ActivityLog; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Log; -use App\Models\ActivityLogSubject; -use Illuminate\Contracts\Auth\Factory; -use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Request; -use Illuminate\Database\ConnectionInterface; +use Throwable; +use Webmozart\Assert\Assert; class ActivityLogService { diff --git a/app/Services/Activity/BulkAddressCreationService.php b/app/Services/Activity/BulkAddressCreationService.php index 3ae3c2cafcc..2983a6ee4c4 100644 --- a/app/Services/Activity/BulkAddressCreationService.php +++ b/app/Services/Activity/BulkAddressCreationService.php @@ -3,21 +3,21 @@ namespace App\Services\Activity; use App\Enums\Network\AddressType; +use function App\Helpers\getAddressesFromRange; use App\Models\Address; use Illuminate\Support\Arr; -use function App\Helpers\getAddressesFromRange; class BulkAddressCreationService { public function handle( AddressType $type, - string $from, - string $to, - int $poolId, - ?int $serverId = null, - int $cidr, - string $gateway, - ?string $macAddress = null, + string $from, + string $to, + int $poolId, + ?int $serverId, + int $cidr, + string $gateway, + ?string $macAddress = null, ): void { $addresses = getAddressesFromRange($type, $from, $to); $existingAddresses = Address::where('address_pool_id', '=', $poolId) diff --git a/app/Services/Api/JWTService.php b/app/Services/Api/JWTService.php index 870e462cfc2..02a84262315 100644 --- a/app/Services/Api/JWTService.php +++ b/app/Services/Api/JWTService.php @@ -2,20 +2,20 @@ namespace App\Services\Api; +use App\Exceptions\Service\Api\InvalidJWTException; +use App\Extensions\Lcobucci\JWT\Validation\Clock; use App\Models\User; use Carbon\CarbonImmutable; use Illuminate\Support\Str; -use Lcobucci\JWT\Token\Plain; use Lcobucci\JWT\Configuration; -use Lcobucci\JWT\UnencryptedToken; +use Lcobucci\JWT\Encoding\CannotDecodeContent; use Lcobucci\JWT\Signer\Hmac\Sha256; use Lcobucci\JWT\Signer\Key\InMemory; use Lcobucci\JWT\Token\InvalidTokenStructure; -use Lcobucci\JWT\Encoding\CannotDecodeContent; +use Lcobucci\JWT\Token\Plain; use Lcobucci\JWT\Token\UnsupportedHeaderFound; -use App\Extensions\Lcobucci\JWT\Validation\Clock; +use Lcobucci\JWT\UnencryptedToken; use Lcobucci\JWT\Validation\Constraint\StrictValidAt; -use App\Exceptions\Service\Api\InvalidJWTException; class JWTService { @@ -86,7 +86,7 @@ public function handle(string $key, string $permittedFor, ?string $identifiedBy, $builder = $builder->expiresAt($this->expiresAt); } - if (!empty($this->subject)) { + if (! empty($this->subject)) { $builder = $builder->relatedTo($this->subject)->withHeader('sub', $this->subject); } @@ -94,7 +94,7 @@ public function handle(string $key, string $permittedFor, ?string $identifiedBy, $builder = $builder->withClaim($key, $value); } - if (!is_null($this->user)) { + if (! is_null($this->user)) { $builder = $builder ->withClaim('user_uuid', $this->user->uuid); } @@ -116,7 +116,7 @@ public function decode(string $key, string $token): UnencryptedToken assert($parsedToken instanceof UnencryptedToken); - if (!$config->validator()->validate($parsedToken, new StrictValidAt(new Clock))) { + if (! $config->validator()->validate($parsedToken, new StrictValidAt(new Clock))) { throw new InvalidJWTException; } diff --git a/app/Services/Backups/BackupCreationService.php b/app/Services/Backups/BackupCreationService.php index ec4b94778b2..f8036cce427 100644 --- a/app/Services/Backups/BackupCreationService.php +++ b/app/Services/Backups/BackupCreationService.php @@ -2,7 +2,6 @@ namespace App\Services\Backups; -use Carbon\CarbonImmutable; use App\Enums\Server\BackupCompressionType; use App\Enums\Server\BackupMode; use App\Exceptions\Service\Backup\TooManyBackupsException; @@ -11,6 +10,7 @@ use App\Models\Server; use App\Repositories\Eloquent\BackupRepository; use App\Repositories\Proxmox\Server\ProxmoxBackupRepository; +use Carbon\CarbonImmutable; use Illuminate\Database\ConnectionInterface; use Ramsey\Uuid\Uuid; use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException; @@ -20,7 +20,7 @@ class BackupCreationService public function __construct( private ConnectionInterface $connection, private ProxmoxBackupRepository $proxmoxRepository, - private BackupRepository $eloquentRepository, + private BackupRepository $eloquentRepository, ) { } @@ -29,7 +29,7 @@ public function create( string $name, BackupMode $mode, BackupCompressionType $compressionType, - ?bool $isLocked = false, + ?bool $isLocked = false, ): ?Backup { $limit = config('backups.throttles.limit'); $period = config('backups.throttles.period'); @@ -55,9 +55,9 @@ public function create( } $successful = $this->eloquentRepository->getNonFailedBackups($server); - if (!$server->backup_limit || $successful->count() >= $server->backup_limit) { + if (! $server->backup_limit || $successful->count() >= $server->backup_limit) { if (isset($server->backup_limit)) { - throw new TooManyBackupsException((int)$server->backup_limit); + throw new TooManyBackupsException((int) $server->backup_limit); } } diff --git a/app/Services/Backups/BackupDeletionService.php b/app/Services/Backups/BackupDeletionService.php index 8b9198852f5..5b1cefac203 100644 --- a/app/Services/Backups/BackupDeletionService.php +++ b/app/Services/Backups/BackupDeletionService.php @@ -10,14 +10,14 @@ class BackupDeletionService { public function __construct( - private ConnectionInterface $connection, + private ConnectionInterface $connection, private ProxmoxBackupRepository $proxmoxRepository, ) { } public function handle(Backup $backup) { - if ($backup->is_locked && ($backup->is_successful && !is_null($backup->completed_at))) { + if ($backup->is_locked && ($backup->is_successful && ! is_null($backup->completed_at))) { throw new BackupLockedException(); } diff --git a/app/Services/Backups/BackupMonitorService.php b/app/Services/Backups/BackupMonitorService.php index f6e1dafd1de..f5af654bd9e 100644 --- a/app/Services/Backups/BackupMonitorService.php +++ b/app/Services/Backups/BackupMonitorService.php @@ -2,12 +2,12 @@ namespace App\Services\Backups; -use Carbon\Carbon; -use Closure; use App\Models\Backup; use App\Models\Server; use App\Repositories\Proxmox\Server\ProxmoxActivityRepository; use App\Repositories\Proxmox\Server\ProxmoxBackupRepository; +use Carbon\Carbon; +use Closure; use Illuminate\Support\Arr; use Illuminate\Support\Str; @@ -15,7 +15,7 @@ class BackupMonitorService { public function __construct( private ProxmoxActivityRepository $repository, - private ProxmoxBackupRepository $backupRepository, + private ProxmoxBackupRepository $backupRepository, ) { } diff --git a/app/Services/Backups/PurgeBackupsService.php b/app/Services/Backups/PurgeBackupsService.php index 70c0ae327d5..b552c715b58 100644 --- a/app/Services/Backups/PurgeBackupsService.php +++ b/app/Services/Backups/PurgeBackupsService.php @@ -9,7 +9,7 @@ class PurgeBackupsService { public function __construct( - private BackupRepository $backupRepository, + private BackupRepository $backupRepository, private BackupDeletionService $backupDeletionService, ) { } diff --git a/app/Services/Backups/RestoreFromBackupService.php b/app/Services/Backups/RestoreFromBackupService.php index beb80af375f..b92d38f183b 100644 --- a/app/Services/Backups/RestoreFromBackupService.php +++ b/app/Services/Backups/RestoreFromBackupService.php @@ -15,7 +15,7 @@ class RestoreFromBackupService { public function __construct( - private ConnectionInterface $connection, + private ConnectionInterface $connection, private ProxmoxServerRepository $serverRepository, private ProxmoxBackupRepository $proxmoxRepository, ) { @@ -23,7 +23,7 @@ public function __construct( public function handle(Server $server, Backup $backup) { - if (!is_null($server->status)) { + if (! is_null($server->status)) { throw new BadRequestHttpException( 'This server is not currently in a state that allows for a backup to be restored.', ); @@ -36,7 +36,7 @@ public function handle(Server $server, Backup $backup) ); } - if (!$backup->successful && is_null($backup->completed_at)) { + if (! $backup->successful && is_null($backup->completed_at)) { throw new BadRequestHttpException( 'This backup cannot be restored at this time: not completed or failed.', ); diff --git a/app/Services/Coterm/CotermJWTService.php b/app/Services/Coterm/CotermJWTService.php index 1b61b904bf8..d4bde58a360 100644 --- a/app/Services/Coterm/CotermJWTService.php +++ b/app/Services/Coterm/CotermJWTService.php @@ -2,12 +2,12 @@ namespace App\Services\Coterm; -use Carbon\CarbonImmutable; use App\Enums\Server\ConsoleType; use App\Models\Coterm; use App\Models\Server; use App\Models\User; use App\Services\Api\JWTService; +use Carbon\CarbonImmutable; use Lcobucci\JWT\Token\Plain; use Webmozart\Assert\Assert; @@ -35,7 +35,7 @@ public function handle(Server $server, User $user, ConsoleType $consoleType): Pl ->handle( $server->node->coterm->token, $server->node->getCotermConnectionAddress(), - $user->uuid . $server->uuid, + $user->uuid.$server->uuid, ); return $token; diff --git a/app/Services/Isos/IsoMonitorService.php b/app/Services/Isos/IsoMonitorService.php index 655b29fbb46..f8ef427308d 100644 --- a/app/Services/Isos/IsoMonitorService.php +++ b/app/Services/Isos/IsoMonitorService.php @@ -2,10 +2,10 @@ namespace App\Services\Isos; -use Carbon\Carbon; -use Closure; use App\Models\ISO; use App\Repositories\Proxmox\Server\ProxmoxActivityRepository; +use Carbon\Carbon; +use Closure; use Illuminate\Support\Arr; use Illuminate\Support\Str; diff --git a/app/Services/Isos/IsoService.php b/app/Services/Isos/IsoService.php index c91bc3d61db..7ed1fd03494 100644 --- a/app/Services/Isos/IsoService.php +++ b/app/Services/Isos/IsoService.php @@ -21,7 +21,7 @@ public function __construct( } public function download( - Node $node, + Node $node, string $name, ?string $fileName, string $link, diff --git a/app/Services/Nodes/ServerRateLimitsSyncService.php b/app/Services/Nodes/ServerRateLimitsSyncService.php index a579528a183..a30534e8337 100644 --- a/app/Services/Nodes/ServerRateLimitsSyncService.php +++ b/app/Services/Nodes/ServerRateLimitsSyncService.php @@ -2,10 +2,10 @@ namespace App\Services\Nodes; +use App\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use App\Models\Node; use App\Models\Server; use App\Services\Servers\NetworkService; -use App\Exceptions\Repository\Proxmox\ProxmoxConnectionException; class ServerRateLimitsSyncService { diff --git a/app/Services/Nodes/ServerUsagesSyncService.php b/app/Services/Nodes/ServerUsagesSyncService.php index fd99076450d..5c22b7edc5a 100644 --- a/app/Services/Nodes/ServerUsagesSyncService.php +++ b/app/Services/Nodes/ServerUsagesSyncService.php @@ -2,13 +2,13 @@ namespace App\Services\Nodes; -use Carbon\Carbon; use App\Data\Server\Proxmox\Usages\ServerTimepointData; use App\Enums\Server\StatisticTimeRange; use App\Exceptions\Repository\Proxmox\ProxmoxConnectionException; use App\Models\Node; use App\Models\Server; use App\Repositories\Proxmox\Server\ProxmoxStatisticsRepository; +use Carbon\Carbon; class ServerUsagesSyncService { diff --git a/app/Services/Nodes/UserPruneService.php b/app/Services/Nodes/UserPruneService.php index 0c6673137f1..088d22ab78f 100644 --- a/app/Services/Nodes/UserPruneService.php +++ b/app/Services/Nodes/UserPruneService.php @@ -2,8 +2,8 @@ namespace App\Services\Nodes; -use App\Models\Node; use App\Data\Node\Access\UserData; +use App\Models\Node; use App\Repositories\Proxmox\Node\ProxmoxAccessRepository; class UserPruneService diff --git a/app/Services/Servers/AllocationService.php b/app/Services/Servers/AllocationService.php index 87e561ac8bb..e35cfb313c0 100644 --- a/app/Services/Servers/AllocationService.php +++ b/app/Services/Servers/AllocationService.php @@ -86,7 +86,7 @@ public function getBootOrder(Server $server): DataCollection array_filter( explode(';', Arr::last(explode('=', $raw['pending'] ?? $raw['value']))), function ($disk) { - return !ctype_space($disk) && in_array( + return ! ctype_space($disk) && in_array( $disk, array_column(DiskInterface::cases(), 'value'), ); // filter literally whitespace entries because Proxmox keeps empty strings for some reason >:( @@ -109,7 +109,7 @@ function ($disk) { public function setBootOrder(Server $server, array $disks) { return $this->repository->setServer($server)->update([ - 'boot' => count($disks) > 0 ? 'order=' . Arr::join($disks, ';') : '', + 'boot' => count($disks) > 0 ? 'order='.Arr::join($disks, ';') : '', ]); } @@ -141,7 +141,7 @@ public function mountIso(Server $server, ISO $iso): void throw new NoAvailableDiskInterfaceException(); } - if (!in_array("ide$i", $arrayToCheckForAvailableIdeIndex)) { + if (! in_array("ide$i", $arrayToCheckForAvailableIdeIndex)) { $ideIndex = $i; break; } @@ -165,7 +165,7 @@ public function unmountIso(Server $server, ISO $iso): void public function convertToBytes(string $from): ?int { $units = ['B', 'K', 'M', 'G', 'T', 'P']; - $number = (int)substr($from, 0, -1); + $number = (int) substr($from, 0, -1); $suffix = strtoupper(substr($from, -1)); //B or no suffix diff --git a/app/Services/Servers/CloudinitService.php b/app/Services/Servers/CloudinitService.php index 22fc827e9f6..3bcd6fedee3 100644 --- a/app/Services/Servers/CloudinitService.php +++ b/app/Services/Servers/CloudinitService.php @@ -2,12 +2,12 @@ namespace App\Services\Servers; -use App\Models\Server; -use Illuminate\Support\Arr; -use App\Data\Server\Proxmox\Config\AddressConfigData; use App\Data\Server\Deployments\CloudinitAddressConfigData; -use App\Repositories\Proxmox\Server\ProxmoxConfigRepository; +use App\Data\Server\Proxmox\Config\AddressConfigData; use App\Exceptions\Repository\Proxmox\ProxmoxConnectionException; +use App\Models\Server; +use App\Repositories\Proxmox\Server\ProxmoxConfigRepository; +use Illuminate\Support\Arr; /** * Class SnapshotService diff --git a/app/Services/Servers/NetworkService.php b/app/Services/Servers/NetworkService.php index 83b019462f8..66b78e701f2 100644 --- a/app/Services/Servers/NetworkService.php +++ b/app/Services/Servers/NetworkService.php @@ -12,20 +12,19 @@ use App\Repositories\Proxmox\Server\ProxmoxCloudinitRepository; use App\Repositories\Proxmox\Server\ProxmoxConfigRepository; use App\Repositories\Proxmox\Server\ProxmoxFirewallRepository; -use Illuminate\Support\Arr; use function collect; +use Illuminate\Support\Arr; use function is_null; class NetworkService { public function __construct( - private AddressRepository $repository, - private ProxmoxFirewallRepository $firewallRepository, - private CloudinitService $cloudinitService, + private AddressRepository $repository, + private ProxmoxFirewallRepository $firewallRepository, + private CloudinitService $cloudinitService, private ProxmoxCloudinitRepository $cloudinitRepository, - private ProxmoxConfigRepository $allocationRepository, - ) - { + private ProxmoxConfigRepository $allocationRepository, + ) { } public function deleteIpset(Server $server, string $name) @@ -64,8 +63,7 @@ public function lockIps(Server $server, array $addresses, string $ipsetName): vo } public function getMacAddresses(Server $server, bool $eloquent = true, bool $proxmox = false, - ): MacAddressData - { + ): MacAddressData { if ($eloquent) { $addresses = $this->getAddresses($server); @@ -160,8 +158,8 @@ public function updateRateLimit(Server $server, ?int $mebibytes = null): void } // If no model key exists, add the default model with the MAC address - if (!$modelFound) { - $parsedConfig[] = (object)['key' => 'virtio', 'value' => $macAddress]; + if (! $modelFound) { + $parsedConfig[] = (object) ['key' => 'virtio', 'value' => $macAddress]; } // Update or create the bridge value @@ -174,8 +172,8 @@ public function updateRateLimit(Server $server, ?int $mebibytes = null): void } } - if (!$bridgeFound) { - $parsedConfig[] = (object)['key' => 'bridge', 'value' => $server->node->network]; + if (! $bridgeFound) { + $parsedConfig[] = (object) ['key' => 'bridge', 'value' => $server->node->network]; } // Update or create the firewall key @@ -188,8 +186,8 @@ public function updateRateLimit(Server $server, ?int $mebibytes = null): void } } - if (!$firewallFound) { - $parsedConfig[] = (object)['key' => 'firewall', 'value' => 1]; + if (! $firewallFound) { + $parsedConfig[] = (object) ['key' => 'firewall', 'value' => 1]; } // Handle the rate limit @@ -207,8 +205,8 @@ public function updateRateLimit(Server $server, ?int $mebibytes = null): void } } - if (!$rateUpdated) { - $parsedConfig[] = (object)['key' => 'rate', 'value' => $mebibytes]; + if (! $rateUpdated) { + $parsedConfig[] = (object) ['key' => 'rate', 'value' => $mebibytes]; } } @@ -234,7 +232,7 @@ private function parseConfig(string $config): array [$key, $value] = explode('=', $component); // Create an associative array (or object) for key-value pairs - $parsedObjects[] = (object)['key' => $key, 'value' => $value]; + $parsedObjects[] = (object) ['key' => $key, 'value' => $value]; } return $parsedObjects; @@ -247,14 +245,14 @@ public function updateAddresses(Server $server, array $addressIds): void $addressesToAdd = array_diff($addressIds, $currentAddresses); $addressesToRemove = array_filter( $currentAddresses, - fn ($id) => !in_array($id, $addressIds), + fn ($id) => ! in_array($id, $addressIds), ); - if (!empty($addressesToAdd)) { + if (! empty($addressesToAdd)) { $this->repository->attachAddresses($server, $addressesToAdd); } - if (!empty($addressesToRemove)) { + if (! empty($addressesToRemove)) { Address::query() ->where('server_id', $server->id) ->whereIn('id', $addressesToRemove) diff --git a/app/Services/Servers/ServerBuildDispatchService.php b/app/Services/Servers/ServerBuildDispatchService.php index 3079f5cdb1b..22d823e30cb 100644 --- a/app/Services/Servers/ServerBuildDispatchService.php +++ b/app/Services/Servers/ServerBuildDispatchService.php @@ -2,20 +2,20 @@ namespace App\Services\Servers; -use App\Models\Server; +use App\Data\Server\Deployments\ServerDeploymentData; +use App\Enums\Server\PowerAction; use App\Enums\Server\State; use App\Enums\Server\Status; -use Illuminate\Support\Facades\Bus; -use App\Enums\Server\PowerAction; -use App\Jobs\Server\SyncBuildJob; use App\Jobs\Server\BuildServerJob; use App\Jobs\Server\DeleteServerJob; use App\Jobs\Server\MonitorStateJob; -use App\Jobs\Server\UpdatePasswordJob; use App\Jobs\Server\SendPowerCommandJob; +use App\Jobs\Server\SyncBuildJob; +use App\Jobs\Server\UpdatePasswordJob; use App\Jobs\Server\WaitUntilVmIsCreatedJob; use App\Jobs\Server\WaitUntilVmIsDeletedJob; -use App\Data\Server\Deployments\ServerDeploymentData; +use App\Models\Server; +use Illuminate\Support\Facades\Bus; class ServerBuildDispatchService { diff --git a/app/Services/Servers/ServerConsoleService.php b/app/Services/Servers/ServerConsoleService.php index a66eb9493ff..2cbf7c0e822 100644 --- a/app/Services/Servers/ServerConsoleService.php +++ b/app/Services/Servers/ServerConsoleService.php @@ -2,16 +2,16 @@ namespace App\Services\Servers; -use Exception; -use App\Models\Server; -use App\Enums\Node\Access\RealmType; use App\Data\Node\Access\CreateUserData; use App\Data\Node\Access\UserCredentialsData; use App\Data\Server\Proxmox\Console\NoVncCredentialsData; use App\Data\Server\Proxmox\Console\XTermCredentialsData; +use App\Enums\Node\Access\RealmType; +use App\Models\Server; use App\Repositories\Proxmox\Node\ProxmoxAccessRepository; -use App\Repositories\Proxmox\Server\ProxmoxServerRepository; use App\Repositories\Proxmox\Server\ProxmoxConsoleRepository; +use App\Repositories\Proxmox\Server\ProxmoxServerRepository; +use Exception; class ServerConsoleService { diff --git a/app/Services/Servers/ServerCreationService.php b/app/Services/Servers/ServerCreationService.php index d053f0ce4c3..f5ebc96912d 100644 --- a/app/Services/Servers/ServerCreationService.php +++ b/app/Services/Servers/ServerCreationService.php @@ -19,7 +19,7 @@ class ServerCreationService { public function __construct( - private NetworkService $networkService, + private NetworkService $networkService, private ServerRepository $repository, private ServerBuildDispatchService $buildDispatchService, ) { @@ -87,7 +87,7 @@ public function generateUniqueVmId(int $nodeId): int $vmid = random_int(100, 999999999); $attempts = 0; - while (!$this->repository->isUniqueVmId($nodeId, $vmid)) { + while (! $this->repository->isUniqueVmId($nodeId, $vmid)) { $vmid = random_int(100, 999999999); if ($attempts++ > 10) { @@ -104,7 +104,7 @@ public function generateUniqueUuidCombo(): string $short = substr($uuid, 0, 8); $attempts = 0; - while (!$this->repository->isUniqueUuidCombo($uuid, $short)) { + while (! $this->repository->isUniqueUuidCombo($uuid, $short)) { $uuid = Str::uuid()->toString(); $short = substr($uuid, 0, 8); diff --git a/app/Services/Servers/ServerDeletionService.php b/app/Services/Servers/ServerDeletionService.php index 976222ac7e7..87749bf8ab4 100644 --- a/app/Services/Servers/ServerDeletionService.php +++ b/app/Services/Servers/ServerDeletionService.php @@ -2,11 +2,11 @@ namespace App\Services\Servers; -use App\Models\Server; use App\Enums\Server\Status; -use Illuminate\Support\Facades\Bus; -use App\Jobs\Server\PurgeBackupsJob; use App\Exceptions\Http\Server\ServerStatusConflictException; +use App\Jobs\Server\PurgeBackupsJob; +use App\Models\Server; +use Illuminate\Support\Facades\Bus; class ServerDeletionService { diff --git a/app/Services/Servers/ServerDetailService.php b/app/Services/Servers/ServerDetailService.php index 851e177769d..819583d538e 100644 --- a/app/Services/Servers/ServerDetailService.php +++ b/app/Services/Servers/ServerDetailService.php @@ -2,11 +2,11 @@ namespace App\Services\Servers; -use App\Models\Server; -use Illuminate\Support\Arr; -use App\Data\Server\Proxmox\ServerProxmoxData; use App\Data\Server\Eloquent\ServerEloquentData; +use App\Data\Server\Proxmox\ServerProxmoxData; +use App\Models\Server; use App\Repositories\Proxmox\Server\ProxmoxConfigRepository; +use Illuminate\Support\Arr; class ServerDetailService { diff --git a/app/Services/Servers/ServerSuspensionService.php b/app/Services/Servers/ServerSuspensionService.php index 8c8991f188d..9ae43237ece 100644 --- a/app/Services/Servers/ServerSuspensionService.php +++ b/app/Services/Servers/ServerSuspensionService.php @@ -2,12 +2,12 @@ namespace App\Services\Servers; -use Exception; -use App\Models\Server; -use App\Enums\Server\Status; use App\Enums\Server\PowerAction; +use App\Enums\Server\Status; use App\Enums\Server\SuspensionAction; +use App\Models\Server; use App\Repositories\Proxmox\Server\ProxmoxPowerRepository; +use Exception; class ServerSuspensionService { diff --git a/app/Services/Servers/SyncBuildService.php b/app/Services/Servers/SyncBuildService.php index e6cb781bead..09257c11991 100644 --- a/app/Services/Servers/SyncBuildService.php +++ b/app/Services/Servers/SyncBuildService.php @@ -12,12 +12,12 @@ readonly class SyncBuildService { public function __construct( - private AllocationService $allocationService, - private CloudinitService $cloudinitService, - private NetworkService $networkService, - private ServerDetailService $detailService, + private AllocationService $allocationService, + private CloudinitService $cloudinitService, + private NetworkService $networkService, + private ServerDetailService $detailService, private ProxmoxConfigRepository $allocationRepository, - private ProxmoxDiskRepository $diskRepository, + private ProxmoxDiskRepository $diskRepository, ) { } @@ -40,7 +40,7 @@ public function handle(Server $server): void // find a disk that has a corresponding disk in the deployment $disksArray = collect($disks->toArray())->pluck('interface')->all(); $bootOrder = array_filter( - collect($bootOrder->filter(fn (DiskData $disk) => !$disk->is_media)->toArray())->pluck( + collect($bootOrder->filter(fn (DiskData $disk) => ! $disk->is_media)->toArray())->pluck( 'interface', )->toArray(), fn ($disk) => in_array($disk, $disksArray), diff --git a/app/Transformers/Admin/AddressPoolTransformer.php b/app/Transformers/Admin/AddressPoolTransformer.php index 7ec026710dc..b14311b8d79 100644 --- a/app/Transformers/Admin/AddressPoolTransformer.php +++ b/app/Transformers/Admin/AddressPoolTransformer.php @@ -3,8 +3,8 @@ namespace App\Transformers\Admin; use App\Models\AddressPool; -use League\Fractal\TransformerAbstract; use League\Fractal\Resource\Collection; +use League\Fractal\TransformerAbstract; class AddressPoolTransformer extends TransformerAbstract { diff --git a/app/Transformers/Admin/AddressTransformer.php b/app/Transformers/Admin/AddressTransformer.php index 5e9d282fb7d..c5f0ec1146b 100644 --- a/app/Transformers/Admin/AddressTransformer.php +++ b/app/Transformers/Admin/AddressTransformer.php @@ -21,7 +21,7 @@ public function transform(Address $address): array public function includeServer(Address $address): ?Item { - return !is_null($address->server) ? $this->item( + return ! is_null($address->server) ? $this->item( $address->server, new ServerTransformer(), ) : null; diff --git a/app/Transformers/Admin/CotermTransformer.php b/app/Transformers/Admin/CotermTransformer.php index 2e92a02dfe6..007763e6784 100644 --- a/app/Transformers/Admin/CotermTransformer.php +++ b/app/Transformers/Admin/CotermTransformer.php @@ -14,12 +14,12 @@ public function __construct(private bool $includeToken = false) public function transform(Coterm $coterm): array { $transformed = [ - 'id' => (int)$coterm->id, + 'id' => (int) $coterm->id, 'name' => $coterm->name, - 'is_tls_enabled' => (boolean)$coterm->is_tls_enabled, + 'is_tls_enabled' => (bool) $coterm->is_tls_enabled, 'fqdn' => $coterm->fqdn, - 'port' => (int)$coterm->port, - 'nodes_count' => (int)$coterm->nodes_count, + 'port' => (int) $coterm->port, + 'nodes_count' => (int) $coterm->nodes_count, ]; if ($this->includeToken) { diff --git a/app/Transformers/Admin/FileMetadataTransformer.php b/app/Transformers/Admin/FileMetadataTransformer.php index 84c9ddf7f3e..eb8512b00c9 100644 --- a/app/Transformers/Admin/FileMetadataTransformer.php +++ b/app/Transformers/Admin/FileMetadataTransformer.php @@ -2,8 +2,8 @@ namespace App\Transformers\Admin; -use League\Fractal\TransformerAbstract; use App\Data\Node\Storage\FileMetaData; +use League\Fractal\TransformerAbstract; class FileMetadataTransformer extends TransformerAbstract { diff --git a/app/Transformers/Admin/NodeTransformer.php b/app/Transformers/Admin/NodeTransformer.php index 4f20324fbe4..be4837c11b9 100644 --- a/app/Transformers/Admin/NodeTransformer.php +++ b/app/Transformers/Admin/NodeTransformer.php @@ -28,7 +28,7 @@ public function transform(Node $node): array 'iso_storage' => $node->iso_storage, 'network' => $node->network, 'coterm_id' => $node->coterm_id, - 'servers_count' => (int)$node->servers_count, + 'servers_count' => (int) $node->servers_count, ]; } } diff --git a/app/Transformers/Admin/ServerBuildTransformer.php b/app/Transformers/Admin/ServerBuildTransformer.php index ff91e38d280..3c7c42fbdf1 100644 --- a/app/Transformers/Admin/ServerBuildTransformer.php +++ b/app/Transformers/Admin/ServerBuildTransformer.php @@ -3,9 +3,9 @@ namespace App\Transformers\Admin; use App\Models\Server; +use App\Services\Servers\ServerDetailService; use Illuminate\Support\Facades\App; use League\Fractal\TransformerAbstract; -use App\Services\Servers\ServerDetailService; class ServerBuildTransformer extends TransformerAbstract { diff --git a/app/Transformers/Client/ActivityLogTransformer.php b/app/Transformers/Client/ActivityLogTransformer.php index beb1e0d58d1..27d9417fdfb 100644 --- a/app/Transformers/Client/ActivityLogTransformer.php +++ b/app/Transformers/Client/ActivityLogTransformer.php @@ -2,12 +2,12 @@ namespace App\Transformers\Client; -use App\Models\User; -use Illuminate\Support\Str; -use Illuminate\Http\Request; use App\Models\ActivityLog; +use App\Models\User; use Illuminate\Container\Container; use Illuminate\Database\Eloquent\Model; +use Illuminate\Http\Request; +use Illuminate\Support\Str; use League\Fractal\TransformerAbstract; class ActivityLogTransformer extends TransformerAbstract diff --git a/app/Transformers/Client/ServerDetailTransformer.php b/app/Transformers/Client/ServerDetailTransformer.php index 3233175bc71..1fedacb0f58 100644 --- a/app/Transformers/Client/ServerDetailTransformer.php +++ b/app/Transformers/Client/ServerDetailTransformer.php @@ -2,8 +2,8 @@ namespace App\Transformers\Client; -use League\Fractal\TransformerAbstract; use App\Data\Server\Proxmox\ServerProxmoxData; +use League\Fractal\TransformerAbstract; class ServerDetailTransformer extends TransformerAbstract { diff --git a/app/Transformers/Client/ServerStateTransformer.php b/app/Transformers/Client/ServerStateTransformer.php index 8fc436fce85..0aa1cee2ad1 100644 --- a/app/Transformers/Client/ServerStateTransformer.php +++ b/app/Transformers/Client/ServerStateTransformer.php @@ -2,8 +2,8 @@ namespace App\Transformers\Client; -use League\Fractal\TransformerAbstract; use App\Data\Server\Proxmox\ServerStateData; +use League\Fractal\TransformerAbstract; class ServerStateTransformer extends TransformerAbstract { diff --git a/app/Transformers/Coterm/NoVncCredentialsTransformer.php b/app/Transformers/Coterm/NoVncCredentialsTransformer.php index 4bc068e0ac5..84fc67e7d15 100644 --- a/app/Transformers/Coterm/NoVncCredentialsTransformer.php +++ b/app/Transformers/Coterm/NoVncCredentialsTransformer.php @@ -2,9 +2,9 @@ namespace App\Transformers\Coterm; +use App\Data\Server\Proxmox\Console\NoVncCredentialsData; use App\Models\Server; use League\Fractal\TransformerAbstract; -use App\Data\Server\Proxmox\Console\NoVncCredentialsData; class NoVncCredentialsTransformer extends TransformerAbstract { diff --git a/app/Transformers/Coterm/XTermCredentialsTransformer.php b/app/Transformers/Coterm/XTermCredentialsTransformer.php index 219df5112e7..bf776ca34df 100644 --- a/app/Transformers/Coterm/XTermCredentialsTransformer.php +++ b/app/Transformers/Coterm/XTermCredentialsTransformer.php @@ -2,9 +2,9 @@ namespace App\Transformers\Coterm; +use App\Data\Server\Proxmox\Console\XTermCredentialsData; use App\Models\Server; use League\Fractal\TransformerAbstract; -use App\Data\Server\Proxmox\Console\XTermCredentialsData; class XTermCredentialsTransformer extends TransformerAbstract { diff --git a/app/Validation/ValidateAddressType.php b/app/Validation/ValidateAddressType.php index ea2f54df473..4ca7a099465 100644 --- a/app/Validation/ValidateAddressType.php +++ b/app/Validation/ValidateAddressType.php @@ -2,8 +2,8 @@ namespace App\Validation; -use Illuminate\Validation\Validator; use App\Enums\Network\AddressType; +use Illuminate\Validation\Validator; class ValidateAddressType { diff --git a/app/Validation/ValidateAddressUniqueness.php b/app/Validation/ValidateAddressUniqueness.php index 0b3702f08db..206bb401dd2 100644 --- a/app/Validation/ValidateAddressUniqueness.php +++ b/app/Validation/ValidateAddressUniqueness.php @@ -15,7 +15,7 @@ public function __invoke(Validator $validator): void { $data = $validator->validated(); - if (!$this->existingAddress) { + if (! $this->existingAddress) { if (Address::where( [['address_pool_id', '=', $this->addressPoolId], ['address', '=', $data['address']]], )->exists()) { diff --git a/artisan b/artisan index 67a3329b183..8e04b42240f 100644 --- a/artisan +++ b/artisan @@ -1,53 +1,15 @@ #!/usr/bin/env php make(Illuminate\Contracts\Console\Kernel::class); - -$status = $kernel->handle( - $input = new Symfony\Component\Console\Input\ArgvInput, - new Symfony\Component\Console\Output\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. -| -*/ - -$kernel->terminate($input, $status); +// Bootstrap Laravel and handle the command... +$status = (require_once __DIR__.'/bootstrap/app.php') + ->handleCommand(new ArgvInput); exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php index 722c30df1c2..2c61344ee93 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,55 +1,59 @@ singleton( - Illuminate\Contracts\Http\Kernel::class, - \App\Http\Kernel::class, -); - -$app->singleton( - Illuminate\Contracts\Console\Kernel::class, - App\Console\Kernel::class, -); - -$app->singleton( - Illuminate\Contracts\Debug\ExceptionHandler::class, - App\Exceptions\Handler::class, -); - -/* -|-------------------------------------------------------------------------- -| Return The Application -|-------------------------------------------------------------------------- -| -| This script returns the application instance. The instance is given to -| the calling script so we can separate the building of the instances -| from the actual running of the application and sending responses. -| -*/ - -return $app; +use App\Http\Middleware\AdminAuthenticate; +use App\Http\Middleware\Coterm\CotermAuthenticate; +use App\Providers\AppServiceProvider; +use Illuminate\Foundation\Application; +use Illuminate\Foundation\Configuration\Exceptions; +use Illuminate\Foundation\Configuration\Middleware; + +return Application::configure(basePath: dirname(__DIR__)) + ->withProviders() + ->withRouting( + commands: __DIR__.'/../routes/console.php', + channels: __DIR__.'/../routes/channels.php', + health: '/up', + then: function () { + Route::middleware('web')->group(function () { + Route::middleware('guest')->group(base_path('routes/auth.php')); + + Route::middleware(['auth.session']) + ->group(base_path('routes/base.php')); + + Route::middleware(['auth'])->prefix('/api/client') + ->as('client.') + ->scopeBindings() + ->group(base_path('routes/api-client.php')); + + Route::middleware(['auth', AdminAuthenticate::class]) + ->prefix('/api/admin') + ->as('admin.') + ->scopeBindings() + ->group(base_path('routes/api-admin.php')); + }); + + Route::middleware(['api'])->group(function () { + Route::middleware(['auth:sanctum']) + ->prefix('/api/application') + ->as('application.') + ->scopeBindings() + ->group(base_path('routes/api-application.php')); + + Route::middleware([CotermAuthenticate::class]) + ->prefix('/api/coterm') + ->as('coterm.') + ->scopeBindings() + ->group(base_path('routes/api-coterm.php')); + }); + } + ) + ->withMiddleware(function (Middleware $middleware) { + $middleware->redirectUsersTo(AppServiceProvider::HOME); + + $middleware->alias([ + 'auth' => \App\Http\Middleware\Authenticate::class, + ]); + }) + ->withExceptions(function (Exceptions $exceptions) { + // + })->create(); diff --git a/bootstrap/providers.php b/bootstrap/providers.php new file mode 100644 index 00000000000..ee19beefab3 --- /dev/null +++ b/bootstrap/providers.php @@ -0,0 +1,9 @@ +=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "5.23.1" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php", + "src/Future/functions.php", + "src/Internal/functions.php" + ], + "psr-4": { + "Amp\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "https://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "support": { + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v3.0.2" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-05-10T21:37:46+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/daa00f2efdbd71565bf64ffefa89e37542addf93", + "reference": "daa00f2efdbd71565bf64ffefa89e37542addf93", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/parser": "^1.1", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2.3" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.22.1" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php", + "src/Internal/functions.php" + ], + "psr-4": { + "Amp\\ByteStream\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "https://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "support": { + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v2.1.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-02-17T04:49:38+00:00" + }, + { + "name": "amphp/cache", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/cache.git", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/cache/zipball/46912e387e6aa94933b61ea1ead9cf7540b7797c", + "reference": "46912e387e6aa94933b61ea1ead9cf7540b7797c", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/serialization": "^1", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Cache\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + } + ], + "description": "A fiber-aware cache API based on Amp and Revolt.", + "homepage": "https://amphp.org/cache", + "support": { + "issues": "https://github.com/amphp/cache/issues", + "source": "https://github.com/amphp/cache/tree/v2.0.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-19T03:38:06+00:00" + }, + { + "name": "amphp/dns", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/dns.git", + "reference": "758266b0ea7470e2e42cd098493bc6d6c7100cf7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/dns/zipball/758266b0ea7470e2e42cd098493bc6d6c7100cf7", + "reference": "758266b0ea7470e2e42cd098493bc6d6c7100cf7", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/windows-registry": "^1.0.1", + "daverandom/libdns": "^2.0.2", + "ext-filter": "*", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.20" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Dns\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Wright", + "email": "addr@daverandom.com" + }, + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + } + ], + "description": "Async DNS resolution for Amp.", + "homepage": "https://github.com/amphp/dns", + "keywords": [ + "amp", + "amphp", + "async", + "client", + "dns", + "resolve" + ], + "support": { + "issues": "https://github.com/amphp/dns/issues", + "source": "https://github.com/amphp/dns/tree/v2.2.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-06-02T19:54:12+00:00" + }, + { + "name": "amphp/parallel", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/parallel.git", + "reference": "9777db1460d1535bc2a843840684fb1205225b87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/parallel/zipball/9777db1460d1535bc2a843840684fb1205225b87", + "reference": "9777db1460d1535bc2a843840684fb1205225b87", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/cache": "^2", + "amphp/parser": "^1", + "amphp/pipeline": "^1", + "amphp/process": "^2", + "amphp/serialization": "^1", + "amphp/socket": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.18" + }, + "type": "library", + "autoload": { + "files": [ + "src/Context/functions.php", + "src/Context/Internal/functions.php", + "src/Ipc/functions.php", + "src/Worker/functions.php" + ], + "psr-4": { + "Amp\\Parallel\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" + } + ], + "description": "Parallel processing component for Amp.", + "homepage": "https://github.com/amphp/parallel", + "keywords": [ + "async", + "asynchronous", + "concurrent", + "multi-processing", + "multi-threading" + ], + "support": { + "issues": "https://github.com/amphp/parallel/issues", + "source": "https://github.com/amphp/parallel/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-09-14T19:16:14+00:00" + }, + { + "name": "amphp/parser", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/parser.git", + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/parser/zipball/3cf1f8b32a0171d4b1bed93d25617637a77cded7", + "reference": "3cf1f8b32a0171d4b1bed93d25617637a77cded7", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Parser\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A generator parser to make streaming parsers simple.", + "homepage": "https://github.com/amphp/parser", + "keywords": [ + "async", + "non-blocking", + "parser", + "stream" + ], + "support": { + "issues": "https://github.com/amphp/parser/issues", + "source": "https://github.com/amphp/parser/tree/v1.1.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-03-21T19:16:53+00:00" + }, + { + "name": "amphp/pipeline", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/pipeline.git", + "reference": "66c095673aa5b6e689e63b52d19e577459129ab3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/pipeline/zipball/66c095673aa5b6e689e63b52d19e577459129ab3", + "reference": "66c095673aa5b6e689e63b52d19e577459129ab3", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "php": ">=8.1", + "revolt/event-loop": "^1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.18" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\Pipeline\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Asynchronous iterators and operators.", + "homepage": "https://amphp.org/pipeline", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "iterator", + "non-blocking" + ], + "support": { + "issues": "https://github.com/amphp/pipeline/issues", + "source": "https://github.com/amphp/pipeline/tree/v1.2.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-07-04T00:56:47+00:00" + }, + { + "name": "amphp/process", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/amphp/process.git", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/process/zipball/52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "reference": "52e08c09dec7511d5fbc1fb00d3e4e79fc77d58d", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/sync": "^2", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.4" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Process\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A fiber-aware process manager based on Amp and Revolt.", + "homepage": "https://amphp.org/process", + "support": { + "issues": "https://github.com/amphp/process/issues", + "source": "https://github.com/amphp/process/tree/v2.0.3" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-19T03:13:44+00:00" + }, + { + "name": "amphp/serialization", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/serialization.git", + "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/serialization/zipball/693e77b2fb0b266c3c7d622317f881de44ae94a1", + "reference": "693e77b2fb0b266c3c7d622317f881de44ae94a1", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "phpunit/phpunit": "^9 || ^8 || ^7" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Serialization\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Serialization tools for IPC and data storage in PHP.", + "homepage": "https://github.com/amphp/serialization", + "keywords": [ + "async", + "asynchronous", + "serialization", + "serialize" + ], + "support": { + "issues": "https://github.com/amphp/serialization/issues", + "source": "https://github.com/amphp/serialization/tree/master" + }, + "time": "2020-03-25T21:39:07+00:00" + }, + { + "name": "amphp/socket", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/socket.git", + "reference": "58e0422221825b79681b72c50c47a930be7bf1e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/socket/zipball/58e0422221825b79681b72c50c47a930be7bf1e1", + "reference": "58e0422221825b79681b72c50c47a930be7bf1e1", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/byte-stream": "^2", + "amphp/dns": "^2", + "ext-openssl": "*", + "kelunik/certificate": "^1.1", + "league/uri": "^6.5 | ^7", + "league/uri-interfaces": "^2.3 | ^7", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "amphp/process": "^2", + "phpunit/phpunit": "^9", + "psalm/phar": "5.20" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php", + "src/Internal/functions.php", + "src/SocketAddress/functions.php" + ], + "psr-4": { + "Amp\\Socket\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@gmail.com" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Non-blocking socket connection / server implementations based on Amp and Revolt.", + "homepage": "https://github.com/amphp/socket", + "keywords": [ + "amp", + "async", + "encryption", + "non-blocking", + "sockets", + "tcp", + "tls" + ], + "support": { + "issues": "https://github.com/amphp/socket/issues", + "source": "https://github.com/amphp/socket/tree/v2.3.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-04-21T14:33:03+00:00" + }, + { + "name": "amphp/sync", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/amphp/sync.git", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/sync/zipball/217097b785130d77cfcc58ff583cf26cd1770bf1", + "reference": "217097b785130d77cfcc58ff583cf26cd1770bf1", + "shasum": "" + }, + "require": { + "amphp/amp": "^3", + "amphp/pipeline": "^1", + "amphp/serialization": "^1", + "php": ">=8.1", + "revolt/event-loop": "^1 || ^0.2" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "amphp/phpunit-util": "^3", + "phpunit/phpunit": "^9", + "psalm/phar": "5.23" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Amp\\Sync\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + }, + { + "name": "Stephen Coakley", + "email": "me@stephencoakley.com" + } + ], + "description": "Non-blocking synchronization primitives for PHP based on Amp and Revolt.", + "homepage": "https://github.com/amphp/sync", + "keywords": [ + "async", + "asynchronous", + "mutex", + "semaphore", + "synchronization" + ], + "support": { + "issues": "https://github.com/amphp/sync/issues", + "source": "https://github.com/amphp/sync/tree/v2.3.0" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-08-03T19:31:26+00:00" + }, + { + "name": "amphp/windows-registry", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/windows-registry.git", + "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/windows-registry/zipball/0d569e8f256cca974e3842b6e78b4e434bf98306", + "reference": "0d569e8f256cca974e3842b6e78b4e434bf98306", + "shasum": "" + }, + "require": { + "amphp/byte-stream": "^2", + "amphp/process": "^2", + "php": ">=8.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "psalm/phar": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Amp\\WindowsRegistry\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Windows Registry Reader.", + "support": { + "issues": "https://github.com/amphp/windows-registry/issues", + "source": "https://github.com/amphp/windows-registry/tree/v1.0.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2024-01-30T23:01:51+00:00" + }, { "name": "bacon/bacon-qr-code", "version": "v3.0.1", @@ -122,109 +981,33 @@ }, { "name": "carbonphp/carbon-doctrine-types", - "version": "2.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", - "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb" + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", - "reference": "99f76ffa36cce3b70a4a6abce41dba15ca2e84cb", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0" + "php": "^8.1" }, "conflict": { - "doctrine/dbal": "<3.7.0 || >=4.0.0" - }, - "require-dev": { - "doctrine/dbal": "^3.7.0", - "nesbot/carbon": "^2.71.0 || ^3.0.0", - "phpunit/phpunit": "^10.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "KyleKatarn", - "email": "kylekatarnls@gmail.com" - } - ], - "description": "Types to use Carbon in Doctrine", - "keywords": [ - "carbon", - "date", - "datetime", - "doctrine", - "time" - ], - "support": { - "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", - "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/2.1.0" - }, - "funding": [ - { - "url": "https://github.com/kylekatarnls", - "type": "github" - }, - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], - "time": "2023-12-11T17:09:12+00:00" - }, - { - "name": "caseyamcl/guzzle_retry_middleware", - "version": "v2.12.0", - "source": { - "type": "git", - "url": "https://github.com/caseyamcl/guzzle_retry_middleware.git", - "reference": "5867f6e6bda922f2a7aa748ae38bb832e96eb62b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/caseyamcl/guzzle_retry_middleware/zipball/5867f6e6bda922f2a7aa748ae38bb832e96eb62b", - "reference": "5867f6e6bda922f2a7aa748ae38bb832e96eb62b", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.3|^7.0", - "php": "^7.1|^8.0" + "doctrine/dbal": "<4.0.0 || >=5.0.0" }, "require-dev": { - "jaschilz/php-coverage-badger": "^2.0", - "nesbot/carbon": "^2.0|^3.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^1.0", - "phpunit/phpunit": "^7.5|^8.0|^9.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/var-dumper": "^5.0|^6.0|^7.0" + "doctrine/dbal": "^4.0.0", + "nesbot/carbon": "^2.71.0 || ^3.0.0", + "phpunit/phpunit": "^10.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { "psr-4": { - "GuzzleRetry\\": "src" + "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" } }, "notification-url": "https://packagist.org/downloads/", @@ -233,34 +1016,37 @@ ], "authors": [ { - "name": "Casey McLaughlin", - "email": "caseyamcl@gmail.com", - "homepage": "https://caseymclaughlin.com", - "role": "Developer" + "name": "KyleKatarn", + "email": "kylekatarnls@gmail.com" } ], - "description": "Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts", - "homepage": "https://github.com/caseyamcl/guzzle_retry_middleware", + "description": "Types to use Carbon in Doctrine", "keywords": [ - "Guzzle", - "back-off", - "caseyamcl", - "guzzle_retry_middleware", - "middleware", - "retry", - "retry-after" + "carbon", + "date", + "datetime", + "doctrine", + "time" ], "support": { - "issues": "https://github.com/caseyamcl/guzzle_retry_middleware/issues", - "source": "https://github.com/caseyamcl/guzzle_retry_middleware/tree/v2.12.0" + "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" }, "funding": [ { - "url": "https://github.com/caseyamcl", + "url": "https://github.com/kylekatarnls", "type": "github" + }, + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" } ], - "time": "2024-10-10T17:30:16+00:00" + "time": "2024-02-09T16:56:22+00:00" }, { "name": "dasprid/enum", @@ -312,6 +1098,50 @@ }, "time": "2024-08-09T14:30:48+00:00" }, + { + "name": "daverandom/libdns", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/DaveRandom/LibDNS.git", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DaveRandom/LibDNS/zipball/b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "reference": "b84c94e8fe6b7ee4aecfe121bfe3b6177d303c8a", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "Required for IDN support" + }, + "type": "library", + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "LibDNS\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "DNS protocol implementation written in pure PHP", + "keywords": [ + "dns" + ], + "support": { + "issues": "https://github.com/DaveRandom/LibDNS/issues", + "source": "https://github.com/DaveRandom/LibDNS/tree/v2.1.0" + }, + "time": "2024-04-12T12:12:48+00:00" + }, { "name": "dflydev/dot-access-data", "version": "v3.0.3", @@ -869,22 +1699,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.5", + "version": "7.9.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" + "reference": "d281ed313b989f213357e3be1a179f02196ac99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", + "reference": "d281ed313b989f213357e3be1a179f02196ac99b", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9 || ^2.4", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^2.7.0", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -893,10 +1723,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -906,8 +1737,9 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "7.4-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -973,7 +1805,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.5" + "source": "https://github.com/guzzle/guzzle/tree/7.9.2" }, "funding": [ { @@ -989,33 +1821,37 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:13+00:00" + "time": "2024-07-24T11:22:20+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e", - "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -1052,7 +1888,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.3" + "source": "https://github.com/guzzle/promises/tree/2.0.3" }, "funding": [ { @@ -1068,7 +1904,7 @@ "type": "tidelift" } ], - "time": "2023-05-21T12:31:43+00:00" + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", @@ -1272,6 +2108,64 @@ ], "time": "2023-12-03T19:50:20+00:00" }, + { + "name": "kelunik/certificate", + "version": "v1.1.3", + "source": { + "type": "git", + "url": "https://github.com/kelunik/certificate.git", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/kelunik/certificate/zipball/7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "reference": "7e00d498c264d5eb4f78c69f41c8bd6719c0199e", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "php": ">=7.0" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "^2", + "phpunit/phpunit": "^6 | 7 | ^8 | ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Kelunik\\Certificate\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Access certificate details and transform between different formats.", + "keywords": [ + "DER", + "certificate", + "certificates", + "openssl", + "pem", + "x509" + ], + "support": { + "issues": "https://github.com/kelunik/certificate/issues", + "source": "https://github.com/kelunik/certificate/tree/v1.1.3" + }, + "time": "2023-02-03T21:26:53+00:00" + }, { "name": "laravel/fortify", "version": "v1.24.2", @@ -1339,16 +2233,16 @@ }, { "name": "laravel/framework", - "version": "v10.48.22", + "version": "v11.27.2", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "c4ea52bb044faef4a103d7dd81746c01b2ec860e" + "reference": "a51d1f2b771c542324a3d9b76a98b1bbc75c0ee9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/c4ea52bb044faef4a103d7dd81746c01b2ec860e", - "reference": "c4ea52bb044faef4a103d7dd81746c01b2ec860e", + "url": "https://api.github.com/repos/laravel/framework/zipball/a51d1f2b771c542324a3d9b76a98b1bbc75c0ee9", + "reference": "a51d1f2b771c542324a3d9b76a98b1bbc75c0ee9", "shasum": "" }, "require": { @@ -1364,44 +2258,44 @@ "ext-openssl": "*", "ext-session": "*", "ext-tokenizer": "*", - "fruitcake/php-cors": "^1.2", + "fruitcake/php-cors": "^1.3", + "guzzlehttp/guzzle": "^7.8", "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.1.9", + "laravel/prompts": "^0.1.18|^0.2.0|^0.3.0", "laravel/serializable-closure": "^1.3", "league/commonmark": "^2.2.1", "league/flysystem": "^3.8.0", "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.67", - "nunomaduro/termwind": "^1.13", - "php": "^8.1", + "nesbot/carbon": "^2.72.2|^3.0", + "nunomaduro/termwind": "^2.0", + "php": "^8.2", "psr/container": "^1.1.1|^2.0.1", "psr/log": "^1.0|^2.0|^3.0", "psr/simple-cache": "^1.0|^2.0|^3.0", "ramsey/uuid": "^4.7", - "symfony/console": "^6.2", - "symfony/error-handler": "^6.2", - "symfony/finder": "^6.2", - "symfony/http-foundation": "^6.4", - "symfony/http-kernel": "^6.2", - "symfony/mailer": "^6.2", - "symfony/mime": "^6.2", - "symfony/process": "^6.2", - "symfony/routing": "^6.2", - "symfony/uid": "^6.2", - "symfony/var-dumper": "^6.2", + "symfony/console": "^7.0", + "symfony/error-handler": "^7.0", + "symfony/finder": "^7.0", + "symfony/http-foundation": "^7.0", + "symfony/http-kernel": "^7.0", + "symfony/mailer": "^7.0", + "symfony/mime": "^7.0", + "symfony/polyfill-php83": "^1.28", + "symfony/process": "^7.0", + "symfony/routing": "^7.0", + "symfony/uid": "^7.0", + "symfony/var-dumper": "^7.0", "tijsverkoyen/css-to-inline-styles": "^2.2.5", "vlucas/phpdotenv": "^5.4.1", "voku/portable-ascii": "^2.0" }, "conflict": { - "carbonphp/carbon-doctrine-types": ">=3.0", - "doctrine/dbal": ">=4.0", "mockery/mockery": "1.6.8", - "phpunit/phpunit": ">=11.0.0", "tightenco/collect": "<5.5.33" }, "provide": { "psr/container-implementation": "1.1|2.0", + "psr/log-implementation": "1.0|2.0|3.0", "psr/simple-cache-implementation": "1.0|2.0|3.0" }, "replace": { @@ -1410,6 +2304,7 @@ "illuminate/bus": "self.version", "illuminate/cache": "self.version", "illuminate/collections": "self.version", + "illuminate/concurrency": "self.version", "illuminate/conditionable": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", @@ -1437,36 +2332,35 @@ "illuminate/testing": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", - "illuminate/view": "self.version" + "illuminate/view": "self.version", + "spatie/once": "*" }, "require-dev": { "ably/ably-php": "^1.0", "aws/aws-sdk-php": "^3.235.5", - "doctrine/dbal": "^3.5.1", "ext-gmp": "*", - "fakerphp/faker": "^1.21", - "guzzlehttp/guzzle": "^7.5", + "fakerphp/faker": "^1.23", "league/flysystem-aws-s3-v3": "^3.0", "league/flysystem-ftp": "^3.0", "league/flysystem-path-prefixing": "^3.3", "league/flysystem-read-only": "^3.3", "league/flysystem-sftp-v3": "^3.0", - "mockery/mockery": "^1.5.1", + "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^8.23.4", - "pda/pheanstalk": "^4.0", - "phpstan/phpstan": "^1.4.7", - "phpunit/phpunit": "^10.0.7", + "orchestra/testbench-core": "^9.5", + "pda/pheanstalk": "^5.0", + "phpstan/phpstan": "^1.11.5", + "phpunit/phpunit": "^10.5|^11.0", "predis/predis": "^2.0.2", - "symfony/cache": "^6.2", - "symfony/http-client": "^6.2.4", - "symfony/psr-http-message-bridge": "^2.0" + "resend/resend-php": "^0.10.0", + "symfony/cache": "^7.0", + "symfony/http-client": "^7.0", + "symfony/psr-http-message-bridge": "^7.0" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", - "brianium/paratest": "Required to run tests in parallel (^6.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^3.5.1).", + "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", "ext-apcu": "Required to use the APC cache driver.", "ext-fileinfo": "Required to use the Filesystem class.", "ext-ftp": "Required to use the Flysystem FTP driver.", @@ -1475,34 +2369,34 @@ "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", "ext-pdo": "Required to use all database features.", "ext-posix": "Required to use all features of the queue worker.", - "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", - "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.5).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", "league/flysystem-read-only": "Required to use read-only disks (^3.3)", "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", - "mockery/mockery": "Required to use mocking (^1.5.1).", + "mockery/mockery": "Required to use mocking (^1.6).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8|^10.0.7).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "phpunit/phpunit": "Required to use assertions and run tests (^10.5|^11.0).", "predis/predis": "Required to use the predis connector (^2.0.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^6.2).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^6.2).", - "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.2).", - "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.2).", - "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.2).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." + "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^7.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "10.x-dev" + "dev-master": "11.x-dev" } }, "autoload": { @@ -1511,6 +2405,8 @@ "src/Illuminate/Events/functions.php", "src/Illuminate/Filesystem/functions.php", "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Log/functions.php", + "src/Illuminate/Support/functions.php", "src/Illuminate/Support/helpers.php" ], "psr-4": { @@ -1542,7 +2438,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-09-12T15:00:09+00:00" + "time": "2024-10-09T04:17:35+00:00" }, { "name": "laravel/helpers", @@ -1682,21 +2578,21 @@ }, { "name": "laravel/prompts", - "version": "v0.1.25", + "version": "v0.3.0", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "7b4029a84c37cb2725fc7f011586e2997040bc95" + "reference": "ea57a2261093986721d4a5f4f9524d76f21f9fa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/7b4029a84c37cb2725fc7f011586e2997040bc95", - "reference": "7b4029a84c37cb2725fc7f011586e2997040bc95", + "url": "https://api.github.com/repos/laravel/prompts/zipball/ea57a2261093986721d4a5f4f9524d76f21f9fa0", + "reference": "ea57a2261093986721d4a5f4f9524d76f21f9fa0", "shasum": "" }, "require": { + "composer-runtime-api": "^2.2", "ext-mbstring": "*", - "illuminate/collections": "^10.0|^11.0", "php": "^8.1", "symfony/console": "^6.2|^7.0" }, @@ -1705,6 +2601,7 @@ "laravel/framework": ">=10.17.0 <10.25.0" }, "require-dev": { + "illuminate/collections": "^10.0|^11.0", "mockery/mockery": "^1.5", "pestphp/pest": "^2.3", "phpstan/phpstan": "^1.11", @@ -1716,7 +2613,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.1.x-dev" + "dev-main": "0.3.x-dev" } }, "autoload": { @@ -1734,43 +2631,41 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.25" + "source": "https://github.com/laravel/prompts/tree/v0.3.0" }, - "time": "2024-08-12T22:06:33+00:00" + "time": "2024-09-30T14:27:51+00:00" }, { "name": "laravel/sanctum", - "version": "v3.3.3", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5" + "reference": "54aea9d13743ae8a6cdd3c28dbef128a17adecab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/8c104366459739f3ada0e994bcd3e6fd681ce3d5", - "reference": "8c104366459739f3ada0e994bcd3e6fd681ce3d5", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/54aea9d13743ae8a6cdd3c28dbef128a17adecab", + "reference": "54aea9d13743ae8a6cdd3c28dbef128a17adecab", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/console": "^9.21|^10.0", - "illuminate/contracts": "^9.21|^10.0", - "illuminate/database": "^9.21|^10.0", - "illuminate/support": "^9.21|^10.0", - "php": "^8.0.2" + "illuminate/console": "^11.0", + "illuminate/contracts": "^11.0", + "illuminate/database": "^11.0", + "illuminate/support": "^11.0", + "php": "^8.2", + "symfony/console": "^7.0" }, "require-dev": { - "mockery/mockery": "^1.0", - "orchestra/testbench": "^7.28.2|^8.8.3", + "mockery/mockery": "^1.6", + "orchestra/testbench": "^9.0", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "^10.5" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - }, "laravel": { "providers": [ "Laravel\\Sanctum\\SanctumServiceProvider" @@ -1802,7 +2697,7 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2023-12-19T18:44:48+00:00" + "time": "2024-09-27T14:55:41+00:00" }, { "name": "laravel/serializable-closure", @@ -2319,53 +3214,177 @@ "filesystem", "local" ], - "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.29.0" - }, - "time": "2024-08-09T21:24:39+00:00" + "support": { + "source": "https://github.com/thephpleague/flysystem-local/tree/3.29.0" + }, + "time": "2024-08-09T21:24:39+00:00" + }, + { + "name": "league/fractal", + "version": "0.20.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/fractal.git", + "reference": "8b9d39b67624db9195c06f9c1ffd0355151eaf62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/fractal/zipball/8b9d39b67624db9195c06f9c1ffd0355151eaf62", + "reference": "8b9d39b67624db9195c06f9c1ffd0355151eaf62", + "shasum": "" + }, + "require": { + "php": ">=7.4" + }, + "require-dev": { + "doctrine/orm": "^2.5", + "illuminate/contracts": "~5.0", + "mockery/mockery": "^1.3", + "pagerfanta/pagerfanta": "~1.0.0", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9.5", + "squizlabs/php_codesniffer": "~3.4", + "vimeo/psalm": "^4.22", + "zendframework/zend-paginator": "~2.3" + }, + "suggest": { + "illuminate/pagination": "The Illuminate Pagination component.", + "pagerfanta/pagerfanta": "Pagerfanta Paginator", + "zendframework/zend-paginator": "Zend Framework Paginator" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.20.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Fractal\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Phil Sturgeon", + "email": "me@philsturgeon.uk", + "homepage": "http://philsturgeon.uk/", + "role": "Developer" + } + ], + "description": "Handle the output of complex data structures ready for API output.", + "homepage": "http://fractal.thephpleague.com/", + "keywords": [ + "api", + "json", + "league", + "rest" + ], + "support": { + "issues": "https://github.com/thephpleague/fractal/issues", + "source": "https://github.com/thephpleague/fractal/tree/0.20.1" + }, + "time": "2022-04-11T12:47:17+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.16.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2024-09-21T08:32:55+00:00" }, { - "name": "league/fractal", - "version": "0.20.1", + "name": "league/uri", + "version": "7.4.1", "source": { "type": "git", - "url": "https://github.com/thephpleague/fractal.git", - "reference": "8b9d39b67624db9195c06f9c1ffd0355151eaf62" + "url": "https://github.com/thephpleague/uri.git", + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/fractal/zipball/8b9d39b67624db9195c06f9c1ffd0355151eaf62", - "reference": "8b9d39b67624db9195c06f9c1ffd0355151eaf62", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/bedb6e55eff0c933668addaa7efa1e1f2c417cc4", + "reference": "bedb6e55eff0c933668addaa7efa1e1f2c417cc4", "shasum": "" }, "require": { - "php": ">=7.4" + "league/uri-interfaces": "^7.3", + "php": "^8.1" }, - "require-dev": { - "doctrine/orm": "^2.5", - "illuminate/contracts": "~5.0", - "mockery/mockery": "^1.3", - "pagerfanta/pagerfanta": "~1.0.0", - "phpstan/phpstan": "^1.4", - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "~3.4", - "vimeo/psalm": "^4.22", - "zendframework/zend-paginator": "~2.3" + "conflict": { + "league/uri-schemes": "^1.0" }, "suggest": { - "illuminate/pagination": "The Illuminate Pagination component.", - "pagerfanta/pagerfanta": "Pagerfanta Paginator", - "zendframework/zend-paginator": "Zend Framework Paginator" + "ext-bcmath": "to improve IPV4 host parsing", + "ext-fileinfo": "to create Data URI from file contennts", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", + "league/uri-components": "Needed to easily manipulate URI objects components", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.20.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { "psr-4": { - "League\\Fractal\\": "src" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2374,53 +3393,84 @@ ], "authors": [ { - "name": "Phil Sturgeon", - "email": "me@philsturgeon.uk", - "homepage": "http://philsturgeon.uk/", - "role": "Developer" + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" } ], - "description": "Handle the output of complex data structures ready for API output.", - "homepage": "http://fractal.thephpleague.com/", + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", "keywords": [ - "api", - "json", - "league", - "rest" + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" ], "support": { - "issues": "https://github.com/thephpleague/fractal/issues", - "source": "https://github.com/thephpleague/fractal/tree/0.20.1" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri/tree/7.4.1" }, - "time": "2022-04-11T12:47:17+00:00" + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-03-23T07:42:40+00:00" }, { - "name": "league/mime-type-detection", - "version": "1.16.0", + "name": "league/uri-interfaces", + "version": "7.4.1", "source": { "type": "git", - "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", - "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/8d43ef5c841032c87e2de015972c06f3865ef718", + "reference": "8d43ef5c841032c87e2de015972c06f3865ef718", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "php": "^7.4 || ^8.0" + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.0" }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.2", - "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + "suggest": { + "ext-bcmath": "to improve IPV4 host parsing", + "ext-gmp": "to improve IPV4 host parsing", + "ext-intl": "to handle IDN host with the best performance", + "php-64bit": "to improve IPV4 host parsing", + "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, "autoload": { "psr-4": { - "League\\MimeTypeDetection\\": "src" + "League\\Uri\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2429,26 +3479,45 @@ ], "authors": [ { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" } ], - "description": "Mime-type detection for Flysystem", + "description": "Common interfaces and classes for URI representation and interaction", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "url", + "ws" + ], "support": { - "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri-src/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.4.1" }, "funding": [ { - "url": "https://github.com/frankdejonge", + "url": "https://github.com/sponsors/nyamsprod", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" } ], - "time": "2024-09-21T08:32:55+00:00" + "time": "2024-03-23T07:42:40+00:00" }, { "name": "monolog/monolog", @@ -2553,42 +3622,41 @@ }, { "name": "nesbot/carbon", - "version": "2.72.5", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed" + "reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/afd46589c216118ecd48ff2b95d77596af1e57ed", - "reference": "afd46589c216118ecd48ff2b95d77596af1e57ed", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bbd3eef89af8ba66a3aa7952b5439168fbcc529f", + "reference": "bbd3eef89af8ba66a3aa7952b5439168fbcc529f", "shasum": "" }, "require": { "carbonphp/carbon-doctrine-types": "*", "ext-json": "*", - "php": "^7.1.8 || ^8.0", + "php": "^8.1", "psr/clock": "^1.0", + "symfony/clock": "^6.3 || ^7.0", "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" + "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" }, "provide": { "psr/clock-implementation": "1.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", - "doctrine/orm": "^2.7 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.0", - "kylekatarnls/multi-tester": "^2.0", - "ondrejmirtes/better-reflection": "*", - "phpmd/phpmd": "^2.9", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.99 || ^1.7.14", - "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", - "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", - "squizlabs/php_codesniffer": "^3.4" + "doctrine/dbal": "^3.6.3 || ^4.0", + "doctrine/orm": "^2.15.2 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.57.2", + "kylekatarnls/multi-tester": "^2.5.3", + "ondrejmirtes/better-reflection": "^6.25.0.4", + "phpmd/phpmd": "^2.15.0", + "phpstan/extension-installer": "^1.3.1", + "phpstan/phpstan": "^1.11.2", + "phpunit/phpunit": "^10.5.20", + "squizlabs/php_codesniffer": "^3.9.0" }, "bin": [ "bin/carbon" @@ -2656,7 +3724,7 @@ "type": "tidelift" } ], - "time": "2024-06-03T19:18:41+00:00" + "time": "2024-08-19T06:22:39+00:00" }, { "name": "nette/schema", @@ -2866,33 +3934,32 @@ }, { "name": "nunomaduro/termwind", - "version": "v1.15.1", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc" + "reference": "e5f21eade88689536c0cdad4c3cd75f3ed26e01a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/8ab0b32c8caa4a2e09700ea32925441385e4a5dc", - "reference": "8ab0b32c8caa4a2e09700ea32925441385e4a5dc", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/e5f21eade88689536c0cdad4c3cd75f3ed26e01a", + "reference": "e5f21eade88689536c0cdad4c3cd75f3ed26e01a", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^8.0", - "symfony/console": "^5.3.0|^6.0.0" - }, - "require-dev": { - "ergebnis/phpstan-rules": "^1.0.", - "illuminate/console": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", - "laravel/pint": "^1.0.0", - "pestphp/pest": "^1.21.0", - "pestphp/pest-plugin-mock": "^1.0", - "phpstan/phpstan": "^1.4.6", - "phpstan/phpstan-strict-rules": "^1.1.0", - "symfony/var-dumper": "^5.2.7|^6.0.0", + "php": "^8.2", + "symfony/console": "^7.0.4" + }, + "require-dev": { + "ergebnis/phpstan-rules": "^2.2.0", + "illuminate/console": "^11.1.1", + "laravel/pint": "^1.15.0", + "mockery/mockery": "^1.6.11", + "pestphp/pest": "^2.34.6", + "phpstan/phpstan": "^1.10.66", + "phpstan/phpstan-strict-rules": "^1.5.2", + "symfony/var-dumper": "^7.0.4", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -2901,6 +3968,9 @@ "providers": [ "Termwind\\Laravel\\TermwindServiceProvider" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -2932,7 +4002,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v1.15.1" + "source": "https://github.com/nunomaduro/termwind/tree/v2.1.0" }, "funding": [ { @@ -2948,7 +4018,7 @@ "type": "github" } ], - "time": "2023-02-08T01:06:31+00:00" + "time": "2024-09-05T15:25:50+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -3067,6 +4137,73 @@ }, "time": "2020-10-15T08:29:30+00:00" }, + { + "name": "phpdocumentor/reflection", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/Reflection.git", + "reference": "61e2f1fe7683e9647b9ed8d9e53d08699385267d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/Reflection/zipball/61e2f1fe7683e9647b9ed8d9e53d08699385267d", + "reference": "61e2f1fe7683e9647b9ed8d9e53d08699385267d", + "shasum": "" + }, + "require": { + "nikic/php-parser": "~4.18 || ^5.0", + "php": "8.1.*|8.2.*|8.3.*", + "phpdocumentor/reflection-common": "^2.1", + "phpdocumentor/reflection-docblock": "^5", + "phpdocumentor/type-resolver": "^1.2", + "symfony/polyfill-php80": "^1.28", + "webmozart/assert": "^1.7" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "doctrine/coding-standard": "^12.0", + "mikey179/vfsstream": "~1.2", + "mockery/mockery": "~1.6.0", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^10.0", + "psalm/phar": "^5.24", + "rector/rector": "^1.0.0", + "squizlabs/php_codesniffer": "^3.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-5.x": "5.3.x-dev", + "dev-6.x": "6.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\": "src/phpDocumentor" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Reflection library to do Static Analysis for PHP Projects", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/Reflection/issues", + "source": "https://github.com/phpDocumentor/Reflection/tree/6.0.0" + }, + "time": "2024-05-23T19:28:12+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -3120,6 +4257,70 @@ }, "time": "2020-06-27T09:03:43+00:00" }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.4.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.1", + "ext-filter": "*", + "php": "^7.4 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.7", + "phpstan/phpdoc-parser": "^1.7", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.5", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + }, + "time": "2024-05-21T05:55:05+00:00" + }, { "name": "phpdocumentor/type-resolver", "version": "1.8.2", @@ -3365,16 +4566,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.32.0", + "version": "1.33.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4" + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6ca22b154efdd9e3c68c56f5d94670920a1c19a4", - "reference": "6ca22b154efdd9e3c68c56f5d94670920a1c19a4", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140", + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140", "shasum": "" }, "require": { @@ -3406,9 +4607,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.32.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0" }, - "time": "2024-09-26T07:23:32+00:00" + "time": "2024-10-13T11:25:22+00:00" }, { "name": "pragmarx/google2fa", @@ -4178,6 +5379,78 @@ ], "time": "2024-04-27T21:32:50+00:00" }, + { + "name": "revolt/event-loop", + "version": "v1.0.6", + "source": { + "type": "git", + "url": "https://github.com/revoltphp/event-loop.git", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/revoltphp/event-loop/zipball/25de49af7223ba039f64da4ae9a28ec2d10d0254", + "reference": "25de49af7223ba039f64da4ae9a28ec2d10d0254", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^9", + "psalm/phar": "^5.15" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Revolt\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Cees-Jan Kiewiet", + "email": "ceesjank@gmail.com" + }, + { + "name": "Christian Lück", + "email": "christian@clue.engineering" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "Rock-solid event loop for concurrent PHP applications.", + "keywords": [ + "async", + "asynchronous", + "concurrency", + "event", + "event-loop", + "non-blocking", + "scheduler" + ], + "support": { + "issues": "https://github.com/revoltphp/event-loop/issues", + "source": "https://github.com/revoltphp/event-loop/tree/v1.0.6" + }, + "time": "2023-11-30T05:34:44+00:00" + }, { "name": "spatie/eloquent-sortable", "version": "4.4.0", @@ -4315,40 +5588,43 @@ }, { "name": "spatie/laravel-data", - "version": "2.2.3", + "version": "4.10.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-data.git", - "reference": "cbc712e5fac04173b49662eff777500f850c8a64" + "reference": "d3113c6bc03a6f1c241074d6f5832e05daa7ca77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-data/zipball/cbc712e5fac04173b49662eff777500f850c8a64", - "reference": "cbc712e5fac04173b49662eff777500f850c8a64", + "url": "https://api.github.com/repos/spatie/laravel-data/zipball/d3113c6bc03a6f1c241074d6f5832e05daa7ca77", + "reference": "d3113c6bc03a6f1c241074d6f5832e05daa7ca77", "shasum": "" }, "require": { - "illuminate/contracts": "^8.83|^9.30|^10.0", + "illuminate/contracts": "^10.0|^11.0", "php": "^8.1", - "phpdocumentor/type-resolver": "^1.5", - "spatie/laravel-package-tools": "^1.9.0" + "phpdocumentor/reflection": "^6.0", + "spatie/laravel-package-tools": "^1.9.0", + "spatie/php-structure-discoverer": "^2.0" }, "require-dev": { "fakerphp/faker": "^1.14", "friendsofphp/php-cs-fixer": "^3.0", - "inertiajs/inertia-laravel": "^0.6.3", + "inertiajs/inertia-laravel": "^1.2", + "livewire/livewire": "^3.0", + "mockery/mockery": "^1.6", "nesbot/carbon": "^2.63", - "nette/php-generator": "^3.5", - "nunomaduro/larastan": "^2.0|^1.0.3", - "orchestra/testbench": "^6.24|^7.6|^8.0", - "pestphp/pest": "^1.22", - "pestphp/pest-plugin-laravel": "^1.3", + "nunomaduro/larastan": "^2.0", + "orchestra/testbench": "^8.0|^9.0", + "pestphp/pest": "^2.31", + "pestphp/pest-plugin-laravel": "^2.0", + "pestphp/pest-plugin-livewire": "^2.1", + "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.1", - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "spatie/invade": "^1.0", - "spatie/laravel-typescript-transformer": "^2.1.6", - "spatie/pest-plugin-snapshots": "^1.1", - "spatie/phpunit-snapshot-assertions": "^4.2", + "spatie/laravel-typescript-transformer": "^2.3", + "spatie/pest-plugin-snapshots": "^2.1", "spatie/test-time": "^1.2" }, "type": "library", @@ -4361,8 +5637,7 @@ }, "autoload": { "psr-4": { - "Spatie\\LaravelData\\": "src", - "Spatie\\LaravelData\\Database\\Factories\\": "database/factories" + "Spatie\\LaravelData\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4385,7 +5660,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-data/issues", - "source": "https://github.com/spatie/laravel-data/tree/2.2.3" + "source": "https://github.com/spatie/laravel-data/tree/4.10.1" }, "funding": [ { @@ -4393,7 +5668,7 @@ "type": "github" } ], - "time": "2023-01-24T08:23:58+00:00" + "time": "2024-10-07T08:36:46+00:00" }, { "name": "spatie/laravel-fractal", @@ -4609,49 +5884,202 @@ ], "time": "2024-05-10T08:19:35+00:00" }, + { + "name": "spatie/php-structure-discoverer", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/php-structure-discoverer.git", + "reference": "271542206169d95dd2ffe346ddf11f37672553a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/php-structure-discoverer/zipball/271542206169d95dd2ffe346ddf11f37672553a2", + "reference": "271542206169d95dd2ffe346ddf11f37672553a2", + "shasum": "" + }, + "require": { + "amphp/amp": "^v3.0", + "amphp/parallel": "^2.2", + "illuminate/collections": "^10.0|^11.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.4.3", + "symfony/finder": "^6.0|^7.0" + }, + "require-dev": { + "illuminate/console": "^10.0|^11.0", + "laravel/pint": "^1.0", + "nunomaduro/collision": "^7.0|^8.0", + "nunomaduro/larastan": "^2.0.1", + "orchestra/testbench": "^7.0|^8.0|^9.0", + "pestphp/pest": "^2.0", + "pestphp/pest-plugin-laravel": "^2.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5|^10.0", + "spatie/laravel-ray": "^1.26" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\StructureDiscoverer\\StructureDiscovererServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\StructureDiscoverer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ruben Van Assche", + "email": "ruben@spatie.be", + "role": "Developer" + } + ], + "description": "Automatically discover structures within your PHP application", + "homepage": "https://github.com/spatie/php-structure-discoverer", + "keywords": [ + "discover", + "laravel", + "php", + "php-structure-discoverer" + ], + "support": { + "issues": "https://github.com/spatie/php-structure-discoverer/issues", + "source": "https://github.com/spatie/php-structure-discoverer/tree/2.2.0" + }, + "funding": [ + { + "url": "https://github.com/LaravelAutoDiscoverer", + "type": "github" + } + ], + "time": "2024-08-29T10:43:45+00:00" + }, + { + "name": "symfony/clock", + "version": "v7.1.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/clock.git", + "reference": "3dfc8b084853586de51dd1441c6242c76a28cbe7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/clock/zipball/3dfc8b084853586de51dd1441c6242c76a28cbe7", + "reference": "3dfc8b084853586de51dd1441c6242c76a28cbe7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/clock": "^1.0", + "symfony/polyfill-php83": "^1.28" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/now.php" + ], + "psr-4": { + "Symfony\\Component\\Clock\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Decouples applications from the system clock", + "homepage": "https://symfony.com", + "keywords": [ + "clock", + "psr20", + "time" + ], + "support": { + "source": "https://github.com/symfony/clock/tree/v7.1.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:57:53+00:00" + }, { "name": "symfony/console", - "version": "v6.4.12", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765" + "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/72d080eb9edf80e36c19be61f72c98ed8273b765", - "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765", + "url": "https://api.github.com/repos/symfony/console/zipball/0fa539d12b3ccf068a722bbbffa07ca7079af9ee", + "reference": "0fa539d12b3ccf068a722bbbffa07ca7079af9ee", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" + "symfony/string": "^6.4|^7.0" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -4685,7 +6113,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.12" + "source": "https://github.com/symfony/console/tree/v7.1.5" }, "funding": [ { @@ -4701,7 +6129,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:15:52+00:00" + "time": "2024-09-20T08:28:38+00:00" }, { "name": "symfony/css-selector", @@ -4837,22 +6265,22 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.10", + "version": "v7.1.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "231f1b2ee80f72daa1972f7340297d67439224f0" + "reference": "432bb369952795c61ca1def65e078c4a80dad13c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/231f1b2ee80f72daa1972f7340297d67439224f0", - "reference": "231f1b2ee80f72daa1972f7340297d67439224f0", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/432bb369952795c61ca1def65e078c4a80dad13c", + "reference": "432bb369952795c61ca1def65e078c4a80dad13c", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/var-dumper": "^6.4|^7.0" }, "conflict": { "symfony/deprecation-contracts": "<2.5", @@ -4861,7 +6289,7 @@ "require-dev": { "symfony/deprecation-contracts": "^2.5|^3", "symfony/http-kernel": "^6.4|^7.0", - "symfony/serializer": "^5.4|^6.0|^7.0" + "symfony/serializer": "^6.4|^7.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -4892,7 +6320,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.10" + "source": "https://github.com/symfony/error-handler/tree/v7.1.3" }, "funding": [ { @@ -4908,7 +6336,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:30:32+00:00" + "time": "2024-07-26T13:02:51+00:00" }, { "name": "symfony/event-dispatcher", @@ -5068,23 +6496,23 @@ }, { "name": "symfony/finder", - "version": "v6.4.11", + "version": "v7.1.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453" + "reference": "d95bbf319f7d052082fb7af147e0f835a695e823" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d7eb6daf8cd7e9ac4976e9576b32042ef7253453", - "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453", + "url": "https://api.github.com/repos/symfony/finder/zipball/d95bbf319f7d052082fb7af147e0f835a695e823", + "reference": "d95bbf319f7d052082fb7af147e0f835a695e823", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "symfony/filesystem": "^6.0|^7.0" + "symfony/filesystem": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -5112,7 +6540,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.11" + "source": "https://github.com/symfony/finder/tree/v7.1.4" }, "funding": [ { @@ -5128,40 +6556,40 @@ "type": "tidelift" } ], - "time": "2024-08-13T14:27:37+00:00" + "time": "2024-08-13T14:28:19+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.4.12", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "133ac043875f59c26c55e79cf074562127cce4d2" + "reference": "e30ef73b1e44eea7eb37ba69600a354e553f694b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/133ac043875f59c26c55e79cf074562127cce4d2", - "reference": "133ac043875f59c26c55e79cf074562127cce4d2", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e30ef73b1e44eea7eb37ba69600a354e553f694b", + "reference": "e30ef73b1e44eea7eb37ba69600a354e553f694b", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-php83": "^1.27" }, "conflict": { - "symfony/cache": "<6.3" + "doctrine/dbal": "<3.6", + "symfony/cache": "<6.4" }, "require-dev": { - "doctrine/dbal": "^2.13.1|^3|^4", + "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.3|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4|^7.0", - "symfony/mime": "^5.4|^6.0|^7.0", - "symfony/rate-limiter": "^5.4|^6.0|^7.0" + "symfony/cache": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/rate-limiter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -5189,7 +6617,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.12" + "source": "https://github.com/symfony/http-foundation/tree/v7.1.5" }, "funding": [ { @@ -5205,77 +6633,77 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:18:25+00:00" + "time": "2024-09-20T08:28:38+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.12", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "96df83d51b5f78804f70c093b97310794fd6257b" + "reference": "44204d96150a9df1fc57601ec933d23fefc2d65b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/96df83d51b5f78804f70c093b97310794fd6257b", - "reference": "96df83d51b5f78804f70c093b97310794fd6257b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/44204d96150a9df1fc57601ec933d23fefc2d65b", + "reference": "44204d96150a9df1fc57601ec933d23fefc2d65b", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.4|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.4", - "symfony/config": "<6.1", - "symfony/console": "<5.4", + "symfony/browser-kit": "<6.4", + "symfony/cache": "<6.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", "symfony/dependency-injection": "<6.4", - "symfony/doctrine-bridge": "<5.4", - "symfony/form": "<5.4", - "symfony/http-client": "<5.4", + "symfony/doctrine-bridge": "<6.4", + "symfony/form": "<6.4", + "symfony/http-client": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<5.4", - "symfony/messenger": "<5.4", - "symfony/translation": "<5.4", + "symfony/mailer": "<6.4", + "symfony/messenger": "<6.4", + "symfony/translation": "<6.4", "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<5.4", + "symfony/twig-bridge": "<6.4", "symfony/validator": "<6.4", - "symfony/var-dumper": "<6.3", - "twig/twig": "<2.13" + "symfony/var-dumper": "<6.4", + "twig/twig": "<3.0.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0|^7.0", - "symfony/clock": "^6.2|^7.0", - "symfony/config": "^6.1|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/css-selector": "^5.4|^6.0|^7.0", + "symfony/browser-kit": "^6.4|^7.0", + "symfony/clock": "^6.4|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/css-selector": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", - "symfony/dom-crawler": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/dom-crawler": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/property-access": "^5.4.5|^6.0.5|^7.0", - "symfony/routing": "^5.4|^6.0|^7.0", - "symfony/serializer": "^6.4.4|^7.0.4", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/translation": "^5.4|^6.0|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^7.1", + "symfony/routing": "^6.4|^7.0", + "symfony/serializer": "^7.1", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/translation": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^5.4|^6.0|^7.0", + "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", - "symfony/var-dumper": "^5.4|^6.4|^7.0", - "symfony/var-exporter": "^6.2|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/var-dumper": "^6.4|^7.0", + "symfony/var-exporter": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "type": "library", "autoload": { @@ -5303,7 +6731,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.12" + "source": "https://github.com/symfony/http-kernel/tree/v7.1.5" }, "funding": [ { @@ -5319,43 +6747,43 @@ "type": "tidelift" } ], - "time": "2024-09-21T06:02:57+00:00" + "time": "2024-09-21T06:09:21+00:00" }, { "name": "symfony/mailer", - "version": "v6.4.12", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "b6a25408c569ae2366b3f663a4edad19420a9c26" + "reference": "bbf21460c56f29810da3df3e206e38dfbb01e80b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/b6a25408c569ae2366b3f663a4edad19420a9c26", - "reference": "b6a25408c569ae2366b3f663a4edad19420a9c26", + "url": "https://api.github.com/repos/symfony/mailer/zipball/bbf21460c56f29810da3df3e206e38dfbb01e80b", + "reference": "bbf21460c56f29810da3df3e206e38dfbb01e80b", "shasum": "" }, "require": { "egulias/email-validator": "^2.1.10|^3|^4", - "php": ">=8.1", + "php": ">=8.2", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", - "symfony/mime": "^6.2|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3" }, "conflict": { "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<5.4", - "symfony/messenger": "<6.2", - "symfony/mime": "<6.2", - "symfony/twig-bridge": "<6.2.1" + "symfony/http-kernel": "<6.4", + "symfony/messenger": "<6.4", + "symfony/mime": "<6.4", + "symfony/twig-bridge": "<6.4" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/messenger": "^6.2|^7.0", - "symfony/twig-bridge": "^6.2|^7.0" + "symfony/console": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/twig-bridge": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -5383,7 +6811,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.4.12" + "source": "https://github.com/symfony/mailer/tree/v7.1.5" }, "funding": [ { @@ -5399,25 +6827,24 @@ "type": "tidelift" } ], - "time": "2024-09-08T12:30:05+00:00" + "time": "2024-09-08T12:32:26+00:00" }, { "name": "symfony/mime", - "version": "v6.4.12", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "abe16ee7790b16aa525877419deb0f113953f0e1" + "reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/abe16ee7790b16aa525877419deb0f113953f0e1", - "reference": "abe16ee7790b16aa525877419deb0f113953f0e1", + "url": "https://api.github.com/repos/symfony/mime/zipball/711d2e167e8ce65b05aea6b258c449671cdd38ff", + "reference": "711d2e167e8ce65b05aea6b258c449671cdd38ff", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -5425,17 +6852,17 @@ "egulias/email-validator": "~3.0.0", "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<5.4", + "symfony/mailer": "<6.4", "symfony/serializer": "<6.4.3|>7.0,<7.0.3" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", "league/html-to-markdown": "^5.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.4|^7.0", - "symfony/property-access": "^5.4|^6.0|^7.0", - "symfony/property-info": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/property-access": "^6.4|^7.0", + "symfony/property-info": "^6.4|^7.0", "symfony/serializer": "^6.4.3|^7.0.3" }, "type": "library", @@ -5468,7 +6895,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.4.12" + "source": "https://github.com/symfony/mime/tree/v7.1.5" }, "funding": [ { @@ -5484,7 +6911,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:18:25+00:00" + "time": "2024-09-20T08:28:38+00:00" }, { "name": "symfony/polyfill-ctype", @@ -6124,20 +7551,20 @@ }, { "name": "symfony/process", - "version": "v6.4.12", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "3f94e5f13ff58df371a7ead461b6e8068900fbb3" + "reference": "5c03ee6369281177f07f7c68252a280beccba847" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3f94e5f13ff58df371a7ead461b6e8068900fbb3", - "reference": "3f94e5f13ff58df371a7ead461b6e8068900fbb3", + "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", + "reference": "5c03ee6369281177f07f7c68252a280beccba847", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "autoload": { @@ -6165,7 +7592,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.12" + "source": "https://github.com/symfony/process/tree/v7.1.5" }, "funding": [ { @@ -6181,40 +7608,38 @@ "type": "tidelift" } ], - "time": "2024-09-17T12:47:12+00:00" + "time": "2024-09-19T21:48:23+00:00" }, { "name": "symfony/routing", - "version": "v6.4.12", + "version": "v7.1.4", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "a7c8036bd159486228dc9be3e846a00a0dda9f9f" + "reference": "1500aee0094a3ce1c92626ed8cf3c2037e86f5a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/a7c8036bd159486228dc9be3e846a00a0dda9f9f", - "reference": "a7c8036bd159486228dc9be3e846a00a0dda9f9f", + "url": "https://api.github.com/repos/symfony/routing/zipball/1500aee0094a3ce1c92626ed8cf3c2037e86f5a7", + "reference": "1500aee0094a3ce1c92626ed8cf3c2037e86f5a7", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { - "doctrine/annotations": "<1.12", - "symfony/config": "<6.2", - "symfony/dependency-injection": "<5.4", - "symfony/yaml": "<5.4" + "symfony/config": "<6.4", + "symfony/dependency-injection": "<6.4", + "symfony/yaml": "<6.4" }, "require-dev": { - "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3", - "symfony/config": "^6.2|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/expression-language": "^5.4|^6.0|^7.0", - "symfony/http-foundation": "^5.4|^6.0|^7.0", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/expression-language": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6248,7 +7673,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.12" + "source": "https://github.com/symfony/routing/tree/v7.1.4" }, "funding": [ { @@ -6264,7 +7689,7 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:32:26+00:00" + "time": "2024-08-29T08:16:25+00:00" }, { "name": "symfony/service-contracts", @@ -6438,33 +7863,32 @@ }, { "name": "symfony/translation", - "version": "v6.4.12", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "cf8360b8352b086be620fae8342c4d96e391a489" + "reference": "235535e3f84f3dfbdbde0208ede6ca75c3a489ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/cf8360b8352b086be620fae8342c4d96e391a489", - "reference": "cf8360b8352b086be620fae8342c4d96e391a489", + "url": "https://api.github.com/repos/symfony/translation/zipball/235535e3f84f3dfbdbde0208ede6ca75c3a489ea", + "reference": "235535e3f84f3dfbdbde0208ede6ca75c3a489ea", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { - "symfony/config": "<5.4", - "symfony/console": "<5.4", - "symfony/dependency-injection": "<5.4", + "symfony/config": "<6.4", + "symfony/console": "<6.4", + "symfony/dependency-injection": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<5.4", + "symfony/http-kernel": "<6.4", "symfony/service-contracts": "<2.5", - "symfony/twig-bundle": "<5.4", - "symfony/yaml": "<5.4" + "symfony/twig-bundle": "<6.4", + "symfony/yaml": "<6.4" }, "provide": { "symfony/translation-implementation": "2.3|3.0" @@ -6472,17 +7896,17 @@ "require-dev": { "nikic/php-parser": "^4.18|^5.0", "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/finder": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/console": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/intl": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^5.4|^6.0|^7.0", + "symfony/routing": "^6.4|^7.0", "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^5.4|^6.0|^7.0" + "symfony/yaml": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6513,7 +7937,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.12" + "source": "https://github.com/symfony/translation/tree/v7.1.5" }, "funding": [ { @@ -6529,7 +7953,7 @@ "type": "tidelift" } ], - "time": "2024-09-16T06:02:54+00:00" + "time": "2024-09-16T06:30:38+00:00" }, { "name": "symfony/translation-contracts", @@ -6611,24 +8035,24 @@ }, { "name": "symfony/uid", - "version": "v6.4.12", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "2f16054e0a9b194b8ca581d4a64eee3f7d4a9d4d" + "reference": "8c7bb8acb933964055215d89f9a9871df0239317" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/2f16054e0a9b194b8ca581d4a64eee3f7d4a9d4d", - "reference": "2f16054e0a9b194b8ca581d4a64eee3f7d4a9d4d", + "url": "https://api.github.com/repos/symfony/uid/zipball/8c7bb8acb933964055215d89f9a9871df0239317", + "reference": "8c7bb8acb933964055215d89f9a9871df0239317", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-uuid": "^1.15" }, "require-dev": { - "symfony/console": "^5.4|^6.0|^7.0" + "symfony/console": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -6665,7 +8089,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.4.12" + "source": "https://github.com/symfony/uid/tree/v7.1.5" }, "funding": [ { @@ -6681,38 +8105,36 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:32:26+00:00" + "time": "2024-09-17T09:16:35+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.11", + "version": "v7.1.5", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "ee14c8254a480913268b1e3b1cba8045ed122694" + "reference": "e20e03889539fd4e4211e14d2179226c513c010d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ee14c8254a480913268b1e3b1cba8045ed122694", - "reference": "ee14c8254a480913268b1e3b1cba8045ed122694", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e20e03889539fd4e4211e14d2179226c513c010d", + "reference": "e20e03889539fd4e4211e14d2179226c513c010d", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/console": "<5.4" + "symfony/console": "<6.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/error-handler": "^6.3|^7.0", - "symfony/http-kernel": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/uid": "^5.4|^6.0|^7.0", - "twig/twig": "^2.13|^3.0.4" + "symfony/console": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/uid": "^6.4|^7.0", + "twig/twig": "^3.0.4" }, "bin": [ "Resources/bin/var-dump-server" @@ -6750,7 +8172,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.11" + "source": "https://github.com/symfony/var-dumper/tree/v7.1.5" }, "funding": [ { @@ -6766,7 +8188,7 @@ "type": "tidelift" } ], - "time": "2024-08-30T16:03:21+00:00" + "time": "2024-09-16T10:07:02+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -8191,40 +9613,38 @@ }, { "name": "nunomaduro/collision", - "version": "v7.10.0", + "version": "v8.4.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "49ec67fa7b002712da8526678abd651c09f375b2" + "reference": "e7d1aa8ed753f63fa816932bbc89678238843b4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/49ec67fa7b002712da8526678abd651c09f375b2", - "reference": "49ec67fa7b002712da8526678abd651c09f375b2", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/e7d1aa8ed753f63fa816932bbc89678238843b4a", + "reference": "e7d1aa8ed753f63fa816932bbc89678238843b4a", "shasum": "" }, "require": { - "filp/whoops": "^2.15.3", - "nunomaduro/termwind": "^1.15.1", - "php": "^8.1.0", - "symfony/console": "^6.3.4" + "filp/whoops": "^2.15.4", + "nunomaduro/termwind": "^2.0.1", + "php": "^8.2.0", + "symfony/console": "^7.1.3" }, "conflict": { - "laravel/framework": ">=11.0.0" + "laravel/framework": "<11.0.0 || >=12.0.0", + "phpunit/phpunit": "<10.5.1 || >=12.0.0" }, "require-dev": { - "brianium/paratest": "^7.3.0", - "laravel/framework": "^10.28.0", - "laravel/pint": "^1.13.3", - "laravel/sail": "^1.25.0", - "laravel/sanctum": "^3.3.1", - "laravel/tinker": "^2.8.2", - "nunomaduro/larastan": "^2.6.4", - "orchestra/testbench-core": "^8.13.0", - "pestphp/pest": "^2.23.2", - "phpunit/phpunit": "^10.4.1", - "sebastian/environment": "^6.0.1", - "spatie/laravel-ignition": "^2.3.1" + "larastan/larastan": "^2.9.8", + "laravel/framework": "^11.19.0", + "laravel/pint": "^1.17.1", + "laravel/sail": "^1.31.0", + "laravel/sanctum": "^4.0.2", + "laravel/tinker": "^2.9.0", + "orchestra/testbench-core": "^9.2.3", + "pestphp/pest": "^2.35.0 || ^3.0.0", + "sebastian/environment": "^6.1.0 || ^7.0.0" }, "type": "library", "extra": { @@ -8232,6 +9652,9 @@ "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" ] + }, + "branch-alias": { + "dev-8.x": "8.x-dev" } }, "autoload": { @@ -8283,7 +9706,7 @@ "type": "patreon" } ], - "time": "2023-10-11T15:45:01+00:00" + "time": "2024-08-03T15:32:23+00:00" }, { "name": "pestphp/pest", @@ -8714,81 +10137,17 @@ "role": "Developer" }, { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.4.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "reference": "9d07b3f7fdcf5efec5d1609cba3c19c5ea2bdc9c", - "shasum": "" - }, - "require": { - "doctrine/deprecations": "^1.1", - "ext-filter": "*", - "php": "^7.4 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.5", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-webmozart-assert": "^1.2", - "phpunit/phpunit": "^9.5", - "vimeo/psalm": "^5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "description": "Library for handling version information and constraints", "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.4.1" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2024-05-21T05:55:05+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpmyadmin/sql-parser", @@ -10803,386 +12162,6 @@ ], "time": "2023-02-07T11:34:05+00:00" }, - { - "name": "spatie/backtrace", - "version": "1.6.2", - "source": { - "type": "git", - "url": "https://github.com/spatie/backtrace.git", - "reference": "1a9a145b044677ae3424693f7b06479fc8c137a9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/backtrace/zipball/1a9a145b044677ae3424693f7b06479fc8c137a9", - "reference": "1a9a145b044677ae3424693f7b06479fc8c137a9", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "ext-json": "*", - "laravel/serializable-closure": "^1.3", - "phpunit/phpunit": "^9.3", - "spatie/phpunit-snapshot-assertions": "^4.2", - "symfony/var-dumper": "^5.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\Backtrace\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van de Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "A better backtrace", - "homepage": "https://github.com/spatie/backtrace", - "keywords": [ - "Backtrace", - "spatie" - ], - "support": { - "source": "https://github.com/spatie/backtrace/tree/1.6.2" - }, - "funding": [ - { - "url": "https://github.com/sponsors/spatie", - "type": "github" - }, - { - "url": "https://spatie.be/open-source/support-us", - "type": "other" - } - ], - "time": "2024-07-22T08:21:24+00:00" - }, - { - "name": "spatie/error-solutions", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/spatie/error-solutions.git", - "reference": "ae7393122eda72eed7cc4f176d1e96ea444f2d67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/error-solutions/zipball/ae7393122eda72eed7cc4f176d1e96ea444f2d67", - "reference": "ae7393122eda72eed7cc4f176d1e96ea444f2d67", - "shasum": "" - }, - "require": { - "php": "^8.0" - }, - "require-dev": { - "illuminate/broadcasting": "^10.0|^11.0", - "illuminate/cache": "^10.0|^11.0", - "illuminate/support": "^10.0|^11.0", - "livewire/livewire": "^2.11|^3.3.5", - "openai-php/client": "^0.10.1", - "orchestra/testbench": "^7.0|8.22.3|^9.0", - "pestphp/pest": "^2.20", - "phpstan/phpstan": "^1.11", - "psr/simple-cache": "^3.0", - "psr/simple-cache-implementation": "^3.0", - "spatie/ray": "^1.28", - "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "vlucas/phpdotenv": "^5.5" - }, - "suggest": { - "openai-php/client": "Require get solutions from OpenAI", - "simple-cache-implementation": "To cache solutions from OpenAI" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\Ignition\\": "legacy/ignition", - "Spatie\\ErrorSolutions\\": "src", - "Spatie\\LaravelIgnition\\": "legacy/laravel-ignition" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ruben Van Assche", - "email": "ruben@spatie.be", - "role": "Developer" - } - ], - "description": "This is my package error-solutions", - "homepage": "https://github.com/spatie/error-solutions", - "keywords": [ - "error-solutions", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/error-solutions/issues", - "source": "https://github.com/spatie/error-solutions/tree/1.1.1" - }, - "funding": [ - { - "url": "https://github.com/Spatie", - "type": "github" - } - ], - "time": "2024-07-25T11:06:04+00:00" - }, - { - "name": "spatie/flare-client-php", - "version": "1.8.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/flare-client-php.git", - "reference": "180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122", - "reference": "180f8ca4c0d0d6fc51477bd8c53ce37ab5a96122", - "shasum": "" - }, - "require": { - "illuminate/pipeline": "^8.0|^9.0|^10.0|^11.0", - "php": "^8.0", - "spatie/backtrace": "^1.6.1", - "symfony/http-foundation": "^5.2|^6.0|^7.0", - "symfony/mime": "^5.2|^6.0|^7.0", - "symfony/process": "^5.2|^6.0|^7.0", - "symfony/var-dumper": "^5.2|^6.0|^7.0" - }, - "require-dev": { - "dms/phpunit-arraysubset-asserts": "^0.5.0", - "pestphp/pest": "^1.20|^2.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "spatie/pest-plugin-snapshots": "^1.0|^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.3.x-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Spatie\\FlareClient\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Send PHP errors to Flare", - "homepage": "https://github.com/spatie/flare-client-php", - "keywords": [ - "exception", - "flare", - "reporting", - "spatie" - ], - "support": { - "issues": "https://github.com/spatie/flare-client-php/issues", - "source": "https://github.com/spatie/flare-client-php/tree/1.8.0" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2024-08-01T08:27:26+00:00" - }, - { - "name": "spatie/ignition", - "version": "1.15.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/ignition.git", - "reference": "e3a68e137371e1eb9edc7f78ffa733f3b98991d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/e3a68e137371e1eb9edc7f78ffa733f3b98991d2", - "reference": "e3a68e137371e1eb9edc7f78ffa733f3b98991d2", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": "^8.0", - "spatie/error-solutions": "^1.0", - "spatie/flare-client-php": "^1.7", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" - }, - "require-dev": { - "illuminate/cache": "^9.52|^10.0|^11.0", - "mockery/mockery": "^1.4", - "pestphp/pest": "^1.20|^2.0", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", - "psr/simple-cache-implementation": "*", - "symfony/cache": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "vlucas/phpdotenv": "^5.5" - }, - "suggest": { - "openai-php/client": "Require get solutions from OpenAI", - "simple-cache-implementation": "To cache solutions from OpenAI" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.5.x-dev" - } - }, - "autoload": { - "psr-4": { - "Spatie\\Ignition\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Spatie", - "email": "info@spatie.be", - "role": "Developer" - } - ], - "description": "A beautiful error page for PHP applications.", - "homepage": "https://flareapp.io/ignition", - "keywords": [ - "error", - "flare", - "laravel", - "page" - ], - "support": { - "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", - "forum": "https://twitter.com/flareappio", - "issues": "https://github.com/spatie/ignition/issues", - "source": "https://github.com/spatie/ignition" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2024-06-12T14:55:22+00:00" - }, - { - "name": "spatie/laravel-ignition", - "version": "2.8.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/laravel-ignition.git", - "reference": "3c067b75bfb50574db8f7e2c3978c65eed71126c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/3c067b75bfb50574db8f7e2c3978c65eed71126c", - "reference": "3c067b75bfb50574db8f7e2c3978c65eed71126c", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "illuminate/support": "^10.0|^11.0", - "php": "^8.1", - "spatie/ignition": "^1.15", - "symfony/console": "^6.2.3|^7.0", - "symfony/var-dumper": "^6.2.3|^7.0" - }, - "require-dev": { - "livewire/livewire": "^2.11|^3.3.5", - "mockery/mockery": "^1.5.1", - "openai-php/client": "^0.8.1", - "orchestra/testbench": "8.22.3|^9.0", - "pestphp/pest": "^2.34", - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan-deprecation-rules": "^1.1.1", - "phpstan/phpstan-phpunit": "^1.3.16", - "vlucas/phpdotenv": "^5.5" - }, - "suggest": { - "openai-php/client": "Require get solutions from OpenAI", - "psr/simple-cache-implementation": "Needed to cache solutions from OpenAI" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Spatie\\LaravelIgnition\\IgnitionServiceProvider" - ], - "aliases": { - "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" - } - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Spatie\\LaravelIgnition\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Spatie", - "email": "info@spatie.be", - "role": "Developer" - } - ], - "description": "A beautiful error page for Laravel applications.", - "homepage": "https://flareapp.io/ignition", - "keywords": [ - "error", - "flare", - "laravel", - "page" - ], - "support": { - "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", - "forum": "https://twitter.com/flareappio", - "issues": "https://github.com/spatie/laravel-ignition/issues", - "source": "https://github.com/spatie/laravel-ignition" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2024-06-12T15:01:18+00:00" - }, { "name": "symfony/filesystem", "version": "v7.1.5", @@ -11566,7 +12545,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { @@ -11574,6 +12553,6 @@ "ext-gmp": "*", "ext-pcntl": "*" }, - "platform-dev": {}, + "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/config/.gitkeep b/config/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/config/app.php b/config/app.php index 3d941694a2b..7e2faba64d0 100644 --- a/config/app.php +++ b/config/app.php @@ -1,204 +1,14 @@ 'canary', - /* - |-------------------------------------------------------------------------- - | Application Name - |-------------------------------------------------------------------------- - | - | This value is the name of your application. This value is used when the - | framework needs to place the application's name in a notification or - | any other location as required by the application or its packages. - | - */ - - 'name' => env('APP_NAME', 'Laravel'), - - /* - |-------------------------------------------------------------------------- - | Application Environment - |-------------------------------------------------------------------------- - | - | This value determines the "environment" your application is currently - | running in. This may determine how you prefer to configure various - | services the application utilizes. Set this in your ".env" file. - | - */ - - 'env' => env('APP_ENV', 'production'), - - /* - |-------------------------------------------------------------------------- - | Application Debug Mode - |-------------------------------------------------------------------------- - | - | When your application is in debug mode, detailed error messages with - | stack traces will be shown on every error that occurs within your - | application. If disabled, a simple generic error page is shown. - | - */ - - 'debug' => (bool) env('APP_DEBUG', false), - - /* - |-------------------------------------------------------------------------- - | Application URL - |-------------------------------------------------------------------------- - | - | This URL is used by the console to properly generate URLs when using - | the Artisan command line tool. You should set this to the root of - | your application so that it is used when running Artisan tasks. - | - */ - - 'url' => env('APP_URL', 'http://localhost'), - - 'asset_url' => env('ASSET_URL'), - - /* - |-------------------------------------------------------------------------- - | Application Timezone - |-------------------------------------------------------------------------- - | - | Here you may specify the default timezone for your application, which - | will be used by the PHP date and date-time functions. We have gone - | ahead and set this to a sensible default for you out of the box. - | - */ - - 'timezone' => 'UTC', - - /* - |-------------------------------------------------------------------------- - | Application Locale Configuration - |-------------------------------------------------------------------------- - | - | The application locale determines the default locale that will be used - | by the translation service provider. You are free to set this value - | to any of the locales which will be supported by the application. - | - */ - - 'locale' => 'en_US', - - /* - |-------------------------------------------------------------------------- - | Application Fallback Locale - |-------------------------------------------------------------------------- - | - | The fallback locale determines the locale to use when the current one - | is not available. You may change the value to correspond to any of - | the language folders that are provided through your application. - | - */ - - 'fallback_locale' => 'en_US', - - /* - |-------------------------------------------------------------------------- - | Faker Locale - |-------------------------------------------------------------------------- - | - | This locale will be used by the Faker PHP library when generating fake - | data for your database seeds. For example, this will be used to get - | localized telephone numbers, street address information and more. - | - */ - - 'faker_locale' => 'en_US', - - /* - |-------------------------------------------------------------------------- - | Encryption Key - |-------------------------------------------------------------------------- - | - | This key is used by the Illuminate encrypter service and should be set - | to a random, 32 character string, otherwise these encrypted strings - | will not be safe. Please do this before deploying an application! - | - */ - - 'key' => env('APP_KEY'), - - 'cipher' => 'AES-256-CBC', - - /* - |-------------------------------------------------------------------------- - | Maintenance Mode Driver - |-------------------------------------------------------------------------- - | - | These configuration options determine the driver used to determine and - | manage Laravel's "maintenance mode" status. The "cache" driver will - | allow maintenance mode to be controlled across multiple machines. - | - | Supported drivers: "file", "cache" - | - */ - - 'maintenance' => [ - 'driver' => 'file', - // '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' => ServiceProvider::defaultProviders()->merge([ - /* - * Package Service Providers... - */ - - /* - * Application Service Providers... - */ - App\Providers\ActivityLogServiceProvider::class, - App\Providers\AppServiceProvider::class, - App\Providers\AuthServiceProvider::class, - App\Providers\BroadcastServiceProvider::class, - App\Providers\EventServiceProvider::class, - App\Providers\HorizonServiceProvider::class, - App\Providers\RouteServiceProvider::class, - App\Providers\RepositoryServiceProvider::class, - App\Providers\FortifyServiceProvider::class, - ])->toArray(), - - /* - |-------------------------------------------------------------------------- - | Class Aliases - |-------------------------------------------------------------------------- - | - | This array of class aliases will be registered when this application - | is started. However, feel free to register as many as you wish as - | the aliases are "lazy" loaded so they don't hinder performance. - | - */ - 'aliases' => Facade::defaultAliases()->merge([ // Custom Facades 'Activity' => App\Facades\Activity::class, 'LogBatch' => App\Facades\LogBatch::class, 'LogTarget' => App\Facades\LogTarget::class, ])->toArray(), - ]; diff --git a/config/auth.php b/config/auth.php deleted file mode 100644 index 9548c15de94..00000000000 --- a/config/auth.php +++ /dev/null @@ -1,115 +0,0 @@ - [ - 'guard' => 'web', - 'passwords' => 'users', - ], - - /* - |-------------------------------------------------------------------------- - | Authentication Guards - |-------------------------------------------------------------------------- - | - | Next, you may define every authentication guard for your application. - | Of course, a great default configuration has been defined for you - | here which uses session storage and the Eloquent user provider. - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | Supported: "session" - | - */ - - 'guards' => [ - 'web' => [ - 'driver' => 'session', - 'provider' => 'users', - ], - ], - - /* - |-------------------------------------------------------------------------- - | User Providers - |-------------------------------------------------------------------------- - | - | All authentication drivers have a user provider. This defines how the - | users are actually retrieved out of your database or other storage - | mechanisms used by this application to persist your user's data. - | - | If you have multiple user tables or models you may configure multiple - | sources which represent each model / table. These sources may then - | be assigned to any extra authentication guards you have defined. - | - | Supported: "database", "eloquent" - | - */ - - 'providers' => [ - 'users' => [ - 'driver' => 'eloquent', - 'model' => App\Models\User::class, - ], - - // 'users' => [ - // 'driver' => 'database', - // 'table' => 'users', - // ], - ], - - /* - |-------------------------------------------------------------------------- - | Resetting Passwords - |-------------------------------------------------------------------------- - | - | You may specify multiple password reset configurations if you have more - | than one user table or model in the application and you want to have - | separate password reset settings based on the specific user types. - | - | The expiry time is the number of minutes that each reset token will be - | considered valid. This security feature keeps tokens short-lived so - | they have less time to be guessed. You may change this as needed. - | - | The throttle setting is the number of seconds a user must wait before - | generating more password reset tokens. This prevents the user from - | quickly generating a very large amount of password reset tokens. - | - */ - - 'passwords' => [ - 'users' => [ - 'provider' => 'users', - 'table' => 'password_reset_tokens', - 'expire' => 60, - 'throttle' => 60, - ], - ], - - /* - |-------------------------------------------------------------------------- - | Password Confirmation Timeout - |-------------------------------------------------------------------------- - | - | Here you may define the amount of seconds before a password confirmation - | times out and the user is prompted to re-enter their password via the - | confirmation screen. By default, the timeout lasts for three hours. - | - */ - - 'password_timeout' => 10800, - -]; diff --git a/config/broadcasting.php b/config/broadcasting.php deleted file mode 100644 index 9e4d4aa44b5..00000000000 --- a/config/broadcasting.php +++ /dev/null @@ -1,70 +0,0 @@ - env('BROADCAST_DRIVER', 'null'), - - /* - |-------------------------------------------------------------------------- - | Broadcast Connections - |-------------------------------------------------------------------------- - | - | Here you may define all of the broadcast connections that will be used - | to broadcast events to other systems or over websockets. Samples of - | each available type of connection are provided inside this array. - | - */ - - 'connections' => [ - - 'pusher' => [ - 'driver' => 'pusher', - 'key' => env('PUSHER_APP_KEY'), - 'secret' => env('PUSHER_APP_SECRET'), - 'app_id' => env('PUSHER_APP_ID'), - 'options' => [ - 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', - 'port' => env('PUSHER_PORT', 443), - 'scheme' => env('PUSHER_SCHEME', 'https'), - 'encrypted' => true, - 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', - ], - 'client_options' => [ - // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html - ], - ], - - 'ably' => [ - 'driver' => 'ably', - 'key' => env('ABLY_KEY'), - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - ], - - 'log' => [ - 'driver' => 'log', - ], - - 'null' => [ - 'driver' => 'null', - ], - - ], - -]; diff --git a/config/cache.php b/config/cache.php deleted file mode 100644 index 33bb29546eb..00000000000 --- a/config/cache.php +++ /dev/null @@ -1,110 +0,0 @@ - env('CACHE_DRIVER', 'file'), - - /* - |-------------------------------------------------------------------------- - | Cache Stores - |-------------------------------------------------------------------------- - | - | Here you may define all of the cache "stores" for your application as - | well as their drivers. You may even define multiple stores for the - | same cache driver to group types of items stored in your caches. - | - | Supported drivers: "apc", "array", "database", "file", - | "memcached", "redis", "dynamodb", "octane", "null" - | - */ - - 'stores' => [ - - 'apc' => [ - 'driver' => 'apc', - ], - - 'array' => [ - 'driver' => 'array', - 'serialize' => false, - ], - - 'database' => [ - 'driver' => 'database', - 'table' => 'cache', - 'connection' => null, - 'lock_connection' => null, - ], - - 'file' => [ - 'driver' => 'file', - 'path' => storage_path('framework/cache/data'), - ], - - 'memcached' => [ - 'driver' => 'memcached', - 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), - 'sasl' => [ - env('MEMCACHED_USERNAME'), - env('MEMCACHED_PASSWORD'), - ], - 'options' => [ - // Memcached::OPT_CONNECT_TIMEOUT => 2000, - ], - 'servers' => [ - [ - 'host' => env('MEMCACHED_HOST', '127.0.0.1'), - 'port' => env('MEMCACHED_PORT', 11211), - 'weight' => 100, - ], - ], - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'cache', - 'lock_connection' => 'default', - ], - - 'dynamodb' => [ - 'driver' => 'dynamodb', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'), - 'endpoint' => env('DYNAMODB_ENDPOINT'), - ], - - 'octane' => [ - 'driver' => 'octane', - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Cache Key Prefix - |-------------------------------------------------------------------------- - | - | When utilizing the APC, database, memcached, Redis, or DynamoDB cache - | stores there might be other applications using the same cache. For - | that reason, you may prefix every cache key to avoid collisions. - | - */ - - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), - -]; diff --git a/config/cors.php b/config/cors.php deleted file mode 100644 index 8a39e6daa63..00000000000 --- a/config/cors.php +++ /dev/null @@ -1,34 +0,0 @@ - ['api/*', 'sanctum/csrf-cookie'], - - 'allowed_methods' => ['*'], - - 'allowed_origins' => ['*'], - - 'allowed_origins_patterns' => [], - - 'allowed_headers' => ['*'], - - 'exposed_headers' => [], - - 'max_age' => 0, - - 'supports_credentials' => false, - -]; diff --git a/config/database.php b/config/database.php index 137ad18ce38..1fc80662a4d 100644 --- a/config/database.php +++ b/config/database.php @@ -1,151 +1,10 @@ env('DB_CONNECTION', 'mysql'), - - /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. - | - */ - - 'connections' => [ - - 'sqlite' => [ - 'driver' => 'sqlite', - 'url' => env('DATABASE_URL'), - 'database' => env('DB_DATABASE', database_path('database.sqlite')), - 'prefix' => '', - 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), - ], - - 'mysql' => [ - 'driver' => 'mysql', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '3306'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'unix_socket' => env('DB_SOCKET', ''), - 'charset' => 'utf8mb4', - 'collation' => 'utf8mb4_unicode_ci', - 'prefix' => '', - 'prefix_indexes' => true, - 'strict' => true, - 'engine' => null, - 'options' => extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), - ]) : [], - ], - - 'pgsql' => [ - 'driver' => 'pgsql', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', '127.0.0.1'), - 'port' => env('DB_PORT', '5432'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - 'prefix_indexes' => true, - 'search_path' => 'public', - 'sslmode' => 'prefer', - ], - - 'sqlsrv' => [ - 'driver' => 'sqlsrv', - 'url' => env('DATABASE_URL'), - 'host' => env('DB_HOST', 'localhost'), - 'port' => env('DB_PORT', '1433'), - 'database' => env('DB_DATABASE', 'forge'), - 'username' => env('DB_USERNAME', 'forge'), - 'password' => env('DB_PASSWORD', ''), - 'charset' => 'utf8', - 'prefix' => '', - 'prefix_indexes' => true, - // 'encrypt' => env('DB_ENCRYPT', 'yes'), - // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk haven't actually been run in the database. - | - */ - - 'migrations' => 'migrations', - - /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer body of commands than a typical key-value system - | such as APC or Memcached. Laravel makes it easy to dig right in. - | - */ - - 'redis' => [ - - 'client' => env('REDIS_CLIENT', 'phpredis'), - - 'options' => [ - 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), - ], - - 'default' => [ - 'url' => env('REDIS_URL'), - 'host' => env('REDIS_HOST', '127.0.0.1'), - 'username' => env('REDIS_USERNAME'), - 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_DB', '0'), - ], - - 'cache' => [ - 'url' => env('REDIS_URL'), - 'host' => env('REDIS_HOST', '127.0.0.1'), - 'username' => env('REDIS_USERNAME'), - 'password' => env('REDIS_PASSWORD'), - 'port' => env('REDIS_PORT', '6379'), - 'database' => env('REDIS_CACHE_DB', '1'), - ], - + 'migrations' => [ + 'table' => 'migrations', + 'update_date_on_publish' => false, // disable to preserve original behavior for existing applications ], ]; diff --git a/config/filesystems.php b/config/filesystems.php deleted file mode 100644 index e9d9dbdbe8a..00000000000 --- a/config/filesystems.php +++ /dev/null @@ -1,76 +0,0 @@ - env('FILESYSTEM_DISK', 'local'), - - /* - |-------------------------------------------------------------------------- - | Filesystem Disks - |-------------------------------------------------------------------------- - | - | Here you may configure as many filesystem "disks" as you wish, and you - | may even configure multiple disks of the same driver. Defaults have - | been set up for each driver as an example of the required values. - | - | Supported Drivers: "local", "ftp", "sftp", "s3" - | - */ - - 'disks' => [ - - 'local' => [ - 'driver' => 'local', - 'root' => storage_path('app'), - 'throw' => false, - ], - - 'public' => [ - 'driver' => 'local', - 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', - 'visibility' => 'public', - 'throw' => false, - ], - - 's3' => [ - 'driver' => 's3', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION'), - 'bucket' => env('AWS_BUCKET'), - 'url' => env('AWS_URL'), - 'endpoint' => env('AWS_ENDPOINT'), - 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), - 'throw' => false, - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Symbolic Links - |-------------------------------------------------------------------------- - | - | Here you may configure the symbolic links that will be created when the - | `storage:link` Artisan command is executed. The array keys should be - | the locations of the links and the values should be their targets. - | - */ - - 'links' => [ - public_path('storage') => storage_path('app/public'), - ], - -]; diff --git a/config/fortify.php b/config/fortify.php index cec4bc2cfd5..5e4825cead6 100644 --- a/config/fortify.php +++ b/config/fortify.php @@ -1,5 +1,6 @@ RouteServiceProvider::HOME, + 'home' => AppServiceProvider::HOME, /* |-------------------------------------------------------------------------- diff --git a/config/hashing.php b/config/hashing.php deleted file mode 100644 index bcd3be4c28a..00000000000 --- a/config/hashing.php +++ /dev/null @@ -1,52 +0,0 @@ - 'bcrypt', - - /* - |-------------------------------------------------------------------------- - | Bcrypt Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Bcrypt algorithm. This will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'bcrypt' => [ - 'rounds' => env('BCRYPT_ROUNDS', 10), - ], - - /* - |-------------------------------------------------------------------------- - | Argon Options - |-------------------------------------------------------------------------- - | - | Here you may specify the configuration options that should be used when - | passwords are hashed using the Argon algorithm. These will allow you - | to control the amount of time it takes to hash the given password. - | - */ - - 'argon' => [ - 'memory' => 65536, - 'threads' => 1, - 'time' => 4, - ], - -]; diff --git a/config/logging.php b/config/logging.php deleted file mode 100644 index c44d27639aa..00000000000 --- a/config/logging.php +++ /dev/null @@ -1,131 +0,0 @@ - env('LOG_CHANNEL', 'stack'), - - /* - |-------------------------------------------------------------------------- - | Deprecations Log Channel - |-------------------------------------------------------------------------- - | - | This option controls the log channel that should be used to log warnings - | regarding deprecated PHP and library features. This allows you to get - | your application ready for upcoming major versions of dependencies. - | - */ - - 'deprecations' => [ - 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), - 'trace' => false, - ], - - /* - |-------------------------------------------------------------------------- - | Log Channels - |-------------------------------------------------------------------------- - | - | Here you may configure the log channels for your application. Out of - | the box, Laravel uses the Monolog PHP logging library. This gives - | you a variety of powerful log handlers / formatters to utilize. - | - | Available Drivers: "single", "daily", "slack", "syslog", - | "errorlog", "monolog", - | "custom", "stack" - | - */ - - 'channels' => [ - 'stack' => [ - 'driver' => 'stack', - 'channels' => ['single'], - 'ignore_exceptions' => false, - ], - - 'single' => [ - 'driver' => 'single', - 'path' => storage_path('logs/laravel.log'), - 'level' => env('LOG_LEVEL', 'debug'), - 'replace_placeholders' => true, - ], - - 'daily' => [ - 'driver' => 'daily', - 'path' => storage_path('logs/laravel.log'), - 'level' => env('LOG_LEVEL', 'debug'), - 'days' => 14, - 'replace_placeholders' => true, - ], - - 'slack' => [ - 'driver' => 'slack', - 'url' => env('LOG_SLACK_WEBHOOK_URL'), - 'username' => 'Laravel Log', - 'emoji' => ':boom:', - 'level' => env('LOG_LEVEL', 'critical'), - 'replace_placeholders' => true, - ], - - 'papertrail' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), - 'handler_with' => [ - 'host' => env('PAPERTRAIL_URL'), - 'port' => env('PAPERTRAIL_PORT'), - 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - - 'stderr' => [ - 'driver' => 'monolog', - 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => StreamHandler::class, - 'formatter' => env('LOG_STDERR_FORMATTER'), - 'with' => [ - 'stream' => 'php://stderr', - ], - 'processors' => [PsrLogMessageProcessor::class], - ], - - 'syslog' => [ - 'driver' => 'syslog', - 'level' => env('LOG_LEVEL', 'debug'), - 'facility' => LOG_USER, - 'replace_placeholders' => true, - ], - - 'errorlog' => [ - 'driver' => 'errorlog', - 'level' => env('LOG_LEVEL', 'debug'), - 'replace_placeholders' => true, - ], - - 'null' => [ - 'driver' => 'monolog', - 'handler' => NullHandler::class, - ], - - 'emergency' => [ - 'path' => storage_path('logs/laravel.log'), - ], - ], - -]; diff --git a/config/mail.php b/config/mail.php index 542d98c37c4..77815a61977 100644 --- a/config/mail.php +++ b/config/mail.php @@ -2,123 +2,13 @@ return [ - /* - |-------------------------------------------------------------------------- - | Default Mailer - |-------------------------------------------------------------------------- - | - | This option controls the default mailer that is used to send any email - | messages sent by your application. Alternative mailers may be setup - | and used as needed; however, this mailer will be used by default. - | - */ - - 'default' => env('MAIL_MAILER', 'smtp'), - - /* - |-------------------------------------------------------------------------- - | Mailer Configurations - |-------------------------------------------------------------------------- - | - | Here you may configure all of the mailers used by your application plus - | their respective settings. Several examples have been configured for - | you and you are free to add your own as your application requires. - | - | Laravel supports a variety of mail "transport" drivers to be used while - | sending an e-mail. You will specify which one you are using for your - | mailers below. You are free to add additional mailers as required. - | - | Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2", - | "postmark", "log", "array", "failover" - | - */ - 'mailers' => [ - 'smtp' => [ - 'transport' => 'smtp', - 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), - 'port' => env('MAIL_PORT', 587), - 'encryption' => env('MAIL_ENCRYPTION', 'tls'), - 'username' => env('MAIL_USERNAME'), - 'password' => env('MAIL_PASSWORD'), - 'timeout' => null, - 'local_domain' => env('MAIL_EHLO_DOMAIN'), - ], - - 'ses' => [ - 'transport' => 'ses', - ], - 'mailgun' => [ 'transport' => 'mailgun', // 'client' => [ // 'timeout' => 5, // ], ], - - 'postmark' => [ - 'transport' => 'postmark', - // 'client' => [ - // 'timeout' => 5, - // ], - ], - - 'sendmail' => [ - 'transport' => 'sendmail', - 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), - ], - - 'log' => [ - 'transport' => 'log', - 'channel' => env('MAIL_LOG_CHANNEL'), - ], - - 'array' => [ - 'transport' => 'array', - ], - - 'failover' => [ - 'transport' => 'failover', - 'mailers' => [ - 'smtp', - 'log', - ], - ], - ], - - /* - |-------------------------------------------------------------------------- - | Global "From" Address - |-------------------------------------------------------------------------- - | - | You may wish for all e-mails sent by your application to be sent from - | the same address. Here, you may specify a name and address that is - | used globally for all e-mails that are sent by your application. - | - */ - - 'from' => [ - 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), - 'name' => env('MAIL_FROM_NAME', 'Example'), - ], - - /* - |-------------------------------------------------------------------------- - | Markdown Mail Settings - |-------------------------------------------------------------------------- - | - | If you are using Markdown based email rendering, you may configure your - | theme and component paths here, allowing you to customize the design - | of the emails. Or, you may simply stick with the Laravel defaults! - | - */ - - 'markdown' => [ - 'theme' => 'default', - - 'paths' => [ - resource_path('views/vendor/mail'), - ], ], ]; diff --git a/config/queue.php b/config/queue.php deleted file mode 100644 index 25ea5a81935..00000000000 --- a/config/queue.php +++ /dev/null @@ -1,93 +0,0 @@ - env('QUEUE_CONNECTION', 'sync'), - - /* - |-------------------------------------------------------------------------- - | Queue Connections - |-------------------------------------------------------------------------- - | - | Here you may configure the connection information for each server that - | is used by your application. A default configuration has been added - | for each back-end shipped with Laravel. You are free to add more. - | - | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null" - | - */ - - 'connections' => [ - - 'sync' => [ - 'driver' => 'sync', - ], - - 'database' => [ - 'driver' => 'database', - 'table' => 'jobs', - 'queue' => 'default', - 'retry_after' => 90, - 'after_commit' => false, - ], - - 'beanstalkd' => [ - 'driver' => 'beanstalkd', - 'host' => 'localhost', - 'queue' => 'default', - 'retry_after' => 90, - 'block_for' => 0, - 'after_commit' => false, - ], - - 'sqs' => [ - 'driver' => 'sqs', - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'default'), - 'suffix' => env('SQS_SUFFIX'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - 'after_commit' => false, - ], - - 'redis' => [ - 'driver' => 'redis', - 'connection' => 'default', - 'queue' => env('REDIS_QUEUE', 'default'), - 'retry_after' => 90, - 'block_for' => null, - 'after_commit' => false, - ], - - ], - - /* - |-------------------------------------------------------------------------- - | Failed Queue Jobs - |-------------------------------------------------------------------------- - | - | These options configure the behavior of failed queue job logging so you - | can control which database and table are used to store the jobs that - | have failed. You may change them to any database / table you wish. - | - */ - - 'failed' => [ - 'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'), - 'database' => env('DB_CONNECTION', 'mysql'), - 'table' => 'failed_jobs', - ], - -]; diff --git a/config/sanctum.php b/config/sanctum.php index 295bbe9fdfa..79e7e241268 100644 --- a/config/sanctum.php +++ b/config/sanctum.php @@ -66,8 +66,8 @@ */ 'middleware' => [ - 'verify_csrf_token' => \App\Http\Middleware\VerifyCsrfToken::class, - 'encrypt_cookies' => \App\Http\Middleware\EncryptCookies::class, + 'validate_csrf_token' => Illuminate\Foundation\Http\Middleware\ValidateCsrfToken::class, + 'encrypt_cookies' => Illuminate\Cookie\Middleware\EncryptCookies::class, ], ]; diff --git a/config/scout.php b/config/scout.php deleted file mode 100644 index 5c8b7d20f11..00000000000 --- a/config/scout.php +++ /dev/null @@ -1,137 +0,0 @@ - env('SCOUT_DRIVER', 'algolia'), - - /* - |-------------------------------------------------------------------------- - | Index Prefix - |-------------------------------------------------------------------------- - | - | Here you may specify a prefix that will be applied to all search index - | names used by Scout. This prefix may be useful if you have multiple - | "tenants" or applications sharing the same search infrastructure. - | - */ - - 'prefix' => env('SCOUT_PREFIX', ''), - - /* - |-------------------------------------------------------------------------- - | Queue Data Syncing - |-------------------------------------------------------------------------- - | - | This option allows you to control if the operations that sync your data - | with your search engines are queued. When this is set to "true" then - | all automatic data syncing will get queued for better performance. - | - */ - - 'queue' => env('SCOUT_QUEUE', false), - - /* - |-------------------------------------------------------------------------- - | Database Transactions - |-------------------------------------------------------------------------- - | - | This configuration option determines if your data will only be synced - | with your search indexes after every open database transaction has - | been committed, thus preventing any discarded data from syncing. - | - */ - - 'after_commit' => false, - - /* - |-------------------------------------------------------------------------- - | Chunk Sizes - |-------------------------------------------------------------------------- - | - | These options allow you to control the maximum chunk size when you are - | mass importing data into the search engine. This allows you to fine - | tune each of these chunk sizes based on the power of the servers. - | - */ - - 'chunk' => [ - 'searchable' => 500, - 'unsearchable' => 500, - ], - - /* - |-------------------------------------------------------------------------- - | Soft Deletes - |-------------------------------------------------------------------------- - | - | This option allows to control whether to keep soft deleted records in - | the search indexes. Maintaining soft deleted records can be useful - | if your application still needs to search for the records later. - | - */ - - 'soft_delete' => false, - - /* - |-------------------------------------------------------------------------- - | Identify User - |-------------------------------------------------------------------------- - | - | This option allows you to control whether to notify the search engine - | of the user performing the search. This is sometimes useful if the - | engine supports any analytics based on this application's users. - | - | Supported engines: "algolia" - | - */ - - 'identify' => env('SCOUT_IDENTIFY', false), - - /* - |-------------------------------------------------------------------------- - | Algolia Configuration - |-------------------------------------------------------------------------- - | - | Here you may configure your Algolia settings. Algolia is a cloud hosted - | search engine which works great with Scout out of the box. Just plug - | in your application ID and admin API key to get started searching. - | - */ - - 'algolia' => [ - 'id' => env('ALGOLIA_APP_ID', ''), - 'secret' => env('ALGOLIA_SECRET', ''), - ], - - /* - |-------------------------------------------------------------------------- - | MeiliSearch Configuration - |-------------------------------------------------------------------------- - | - | Here you may configure your MeiliSearch settings. MeiliSearch is an open - | source search engine with minimal configuration. Below, you can state - | the host and key information for your own MeiliSearch installation. - | - | See: https://docs.meilisearch.com/guides/advanced_guides/configuration.html - | - */ - - 'meilisearch' => [ - 'host' => env('MEILISEARCH_HOST', 'http://localhost:7700'), - 'key' => env('MEILISEARCH_KEY', null), - ], - -]; diff --git a/config/services.php b/config/services.php index 0ace530e8d2..62e0a08a8b8 100644 --- a/config/services.php +++ b/config/services.php @@ -2,18 +2,6 @@ return [ - /* - |-------------------------------------------------------------------------- - | Third Party Services - |-------------------------------------------------------------------------- - | - | This file is for storing the credentials for third party services such - | as Mailgun, Postmark, AWS and more. This file provides the de facto - | location for this type of information, allowing packages to have - | a conventional file to locate the various service credentials. - | - */ - 'mailgun' => [ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), @@ -21,14 +9,4 @@ 'scheme' => 'https', ], - 'postmark' => [ - 'token' => env('POSTMARK_TOKEN'), - ], - - 'ses' => [ - 'key' => env('AWS_ACCESS_KEY_ID'), - 'secret' => env('AWS_SECRET_ACCESS_KEY'), - 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), - ], - ]; diff --git a/config/session.php b/config/session.php deleted file mode 100644 index 8fed97c0141..00000000000 --- a/config/session.php +++ /dev/null @@ -1,201 +0,0 @@ - env('SESSION_DRIVER', 'file'), - - /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle before it expires. If you want them - | to immediately expire on the browser closing, set that option. - | - */ - - 'lifetime' => env('SESSION_LIFETIME', 120), - - 'expire_on_close' => false, - - /* - |-------------------------------------------------------------------------- - | Session Encryption - |-------------------------------------------------------------------------- - | - | This option allows you to easily specify that all of your session data - | should be encrypted before it is stored. All encryption will be run - | automatically by Laravel and you can use the Session like normal. - | - */ - - 'encrypt' => false, - - /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When using the native session driver, we need a location where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | - */ - - 'files' => storage_path('framework/sessions'), - - /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" or "redis" session drivers, you may specify a - | connection that should be used to manage these sessions. This should - | correspond to a connection in your database configuration options. - | - */ - - 'connection' => env('SESSION_CONNECTION'), - - /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | - */ - - 'table' => 'sessions', - - /* - |-------------------------------------------------------------------------- - | Session Cache Store - |-------------------------------------------------------------------------- - | - | While using one of the framework's cache driven session backends you may - | list a cache store that should be used for these sessions. This value - | must match with one of the application's configured cache "stores". - | - | Affects: "apc", "dynamodb", "memcached", "redis" - | - */ - - 'store' => env('SESSION_STORE'), - - /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | - */ - - 'lottery' => [2, 100], - - /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | - */ - - 'cookie' => env( - 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_').'_session' - ), - - /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | - */ - - 'path' => '/', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | - */ - - 'domain' => env('SESSION_DOMAIN'), - - /* - |-------------------------------------------------------------------------- - | HTTPS Only Cookies - |-------------------------------------------------------------------------- - | - | By setting this option to true, session cookies will only be sent back - | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you when it can't be done securely. - | - */ - - 'secure' => env('SESSION_SECURE_COOKIE'), - - /* - |-------------------------------------------------------------------------- - | HTTP Access Only - |-------------------------------------------------------------------------- - | - | Setting this value to true will prevent JavaScript from accessing the - | value of the cookie and the cookie will only be accessible through - | the HTTP protocol. You are free to modify this option if needed. - | - */ - - 'http_only' => true, - - /* - |-------------------------------------------------------------------------- - | Same-Site Cookies - |-------------------------------------------------------------------------- - | - | This option determines how your cookies behave when cross-site requests - | take place, and can be used to mitigate CSRF attacks. By default, we - | will set this value to "lax" since this is a secure default value. - | - | Supported: "lax", "strict", "none", null - | - */ - - 'same_site' => 'lax', - -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index 22b8a18d325..00000000000 --- a/config/view.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - resource_path('views'), - ], - - /* - |-------------------------------------------------------------------------- - | Compiled View Path - |-------------------------------------------------------------------------- - | - | This option determines where all the compiled Blade templates will be - | stored for your application. Typically, this is within the storage - | directory. However, as usual, you are free to change this value. - | - */ - - 'compiled' => env( - 'VIEW_COMPILED_PATH', - realpath(storage_path('framework/views')) - ), - -]; diff --git a/database/factories/AddressFactory.php b/database/factories/AddressFactory.php index 7f9304c3a18..298e79beed9 100644 --- a/database/factories/AddressFactory.php +++ b/database/factories/AddressFactory.php @@ -18,13 +18,13 @@ class AddressFactory extends Factory public function definition(): array { $type = $this->faker->randomElement(['ipv4', 'ipv6']); - + return [ 'type' => $type, - 'address' => $type === 'ipv4' ? $this->faker->ipv4 : $this->faker->ipv6, + 'address' => $type === 'ipv4' ? $this->faker->ipv4() : $this->faker->ipv6(), 'cidr' => $this->faker->numberBetween(0, 128), - 'gateway' => $type === 'ipv4' ? $this->faker->ipv4 : $this->faker->ipv6, - 'mac_address' => $this->faker->randomElement([null, $this->faker->macAddress]), + 'gateway' => $type === 'ipv4' ? $this->faker->ipv4() : $this->faker->ipv6(), + 'mac_address' => $this->faker->randomElement([null, $this->faker->macAddress()]), ]; } } diff --git a/database/factories/AddressPoolFactory.php b/database/factories/AddressPoolFactory.php index b61fa3d22f8..f2219c3c229 100644 --- a/database/factories/AddressPoolFactory.php +++ b/database/factories/AddressPoolFactory.php @@ -8,8 +8,6 @@ class AddressPoolFactory extends Factory { - protected $model = AddressPool::class; - public function definition(): array { return [ diff --git a/database/factories/BackupFactory.php b/database/factories/BackupFactory.php index 35e23cc5dc0..0e742f97153 100644 --- a/database/factories/BackupFactory.php +++ b/database/factories/BackupFactory.php @@ -11,13 +11,6 @@ */ class BackupFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = Backup::class; - /** * Define the model's default state. * diff --git a/database/factories/ISOFactory.php b/database/factories/ISOFactory.php index 09b575721e8..7e88f9d18d8 100644 --- a/database/factories/ISOFactory.php +++ b/database/factories/ISOFactory.php @@ -10,8 +10,6 @@ */ class ISOFactory extends Factory { - protected $model = ISO::class; - /** * Define the model's default state. * diff --git a/database/factories/LocationFactory.php b/database/factories/LocationFactory.php index ca3c124b143..399589b5522 100644 --- a/database/factories/LocationFactory.php +++ b/database/factories/LocationFactory.php @@ -10,13 +10,6 @@ */ class LocationFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = Location::class; - /** * Define the model's default state. * diff --git a/database/factories/NodeFactory.php b/database/factories/NodeFactory.php index 25474c80bb1..f2c3a26b99c 100644 --- a/database/factories/NodeFactory.php +++ b/database/factories/NodeFactory.php @@ -7,8 +7,6 @@ class NodeFactory extends Factory { - protected $model = Node::class; - public function definition(): array { return [ diff --git a/database/factories/ServerFactory.php b/database/factories/ServerFactory.php index 010047147d4..702b76b1e87 100644 --- a/database/factories/ServerFactory.php +++ b/database/factories/ServerFactory.php @@ -9,13 +9,6 @@ class ServerFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = Server::class; - /** * Define the model's default state. */ diff --git a/database/factories/SnapshotFactory.php b/database/factories/SnapshotFactory.php index e3c505740e7..3751bd60aad 100644 --- a/database/factories/SnapshotFactory.php +++ b/database/factories/SnapshotFactory.php @@ -7,8 +7,6 @@ class SnapshotFactory extends Factory { - protected $model = Snapshot::class; - public function definition(): array { return [ diff --git a/database/factories/StorageFactory.php b/database/factories/StorageFactory.php index 70a593a6ce2..d02d70037ab 100644 --- a/database/factories/StorageFactory.php +++ b/database/factories/StorageFactory.php @@ -8,8 +8,6 @@ class StorageFactory extends Factory { - protected $model = Storage::class; - public function definition(): array { return [ diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index 6c0eff793f8..de938e04c80 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index 4f42fe6909e..6733802c7c8 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php index 5cc9f78b1b6..cf824d68afb 100644 --- a/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php +++ b/database/migrations/2014_10_12_200000_add_two_factor_columns_to_users_table.php @@ -5,8 +5,7 @@ use Illuminate\Support\Facades\Schema; use Laravel\Fortify\Fortify; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index 249da8171ac..51aaa6f9fc4 100644 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php index e43a6a6c2ca..64872a2541a 100644 --- a/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php +++ b/database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_14_232223_nodes_table.php b/database/migrations/2022_07_14_232223_nodes_table.php index 68a72752f5e..1144665e242 100644 --- a/database/migrations/2022_07_14_232223_nodes_table.php +++ b/database/migrations/2022_07_14_232223_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_14_232304_servers_table.php b/database/migrations/2022_07_14_232304_servers_table.php index 4b8c283282e..0f4838ba064 100644 --- a/database/migrations/2022_07_14_232304_servers_table.php +++ b/database/migrations/2022_07_14_232304_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_22_004345_add_ip_address_column_to_servers_table.php b/database/migrations/2022_07_22_004345_add_ip_address_column_to_servers_table.php index da5841a08b2..a807bbb02c6 100644 --- a/database/migrations/2022_07_22_004345_add_ip_address_column_to_servers_table.php +++ b/database/migrations/2022_07_22_004345_add_ip_address_column_to_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_23_233402_remove_old_columns_from_servers_table.php b/database/migrations/2022_07_23_233402_remove_old_columns_from_servers_table.php index 9a0503e6a12..81ee0b77a78 100644 --- a/database/migrations/2022_07_23_233402_remove_old_columns_from_servers_table.php +++ b/database/migrations/2022_07_23_233402_remove_old_columns_from_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_24_023016_add_make_template_visible_column_to_servers_table.php b/database/migrations/2022_07_24_023016_add_make_template_visible_column_to_servers_table.php index 7b33e3b6ddf..168380b7ae4 100644 --- a/database/migrations/2022_07_24_023016_add_make_template_visible_column_to_servers_table.php +++ b/database/migrations/2022_07_24_023016_add_make_template_visible_column_to_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_25_015911_add_is_installing_column_to_servers_table.php b/database/migrations/2022_07_25_015911_add_is_installing_column_to_servers_table.php index 46b12a848ea..f8cdf3a2562 100644 --- a/database/migrations/2022_07_25_015911_add_is_installing_column_to_servers_table.php +++ b/database/migrations/2022_07_25_015911_add_is_installing_column_to_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_25_025600_create_templates_table.php b/database/migrations/2022_07_25_025600_create_templates_table.php index 3e025f1639f..dbe34f66778 100644 --- a/database/migrations/2022_07_25_025600_create_templates_table.php +++ b/database/migrations/2022_07_25_025600_create_templates_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_25_025928_remove_template_columns_from_servers_table.php b/database/migrations/2022_07_25_025928_remove_template_columns_from_servers_table.php index b29510a49cc..ca1bf0323af 100644 --- a/database/migrations/2022_07_25_025928_remove_template_columns_from_servers_table.php +++ b/database/migrations/2022_07_25_025928_remove_template_columns_from_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_25_030214_remove_is_template_column_from_templates_table.php b/database/migrations/2022_07_25_030214_remove_is_template_column_from_templates_table.php index 1036cdcc0a0..884b1d092b0 100644 --- a/database/migrations/2022_07_25_030214_remove_is_template_column_from_templates_table.php +++ b/database/migrations/2022_07_25_030214_remove_is_template_column_from_templates_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_25_030354_rename_make_templates_visible_column_in_templates_table.php b/database/migrations/2022_07_25_030354_rename_make_templates_visible_column_in_templates_table.php index b62c2e5439b..677147481ab 100644 --- a/database/migrations/2022_07_25_030354_rename_make_templates_visible_column_in_templates_table.php +++ b/database/migrations/2022_07_25_030354_rename_make_templates_visible_column_in_templates_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_26_003508_create_i_p_addresses_table.php b/database/migrations/2022_07_26_003508_create_i_p_addresses_table.php index 46edacb97df..763ed717b8e 100644 --- a/database/migrations/2022_07_26_003508_create_i_p_addresses_table.php +++ b/database/migrations/2022_07_26_003508_create_i_p_addresses_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_26_004509_remove_ip_address_column_from_servers_table.php b/database/migrations/2022_07_26_004509_remove_ip_address_column_from_servers_table.php index 09ccf8e197a..242988b9167 100644 --- a/database/migrations/2022_07_26_004509_remove_ip_address_column_from_servers_table.php +++ b/database/migrations/2022_07_26_004509_remove_ip_address_column_from_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_26_005058_fix_ip_addresses_table_columns.php b/database/migrations/2022_07_26_005058_fix_ip_addresses_table_columns.php index 8d5488f9554..0090fca4780 100644 --- a/database/migrations/2022_07_26_005058_fix_ip_addresses_table_columns.php +++ b/database/migrations/2022_07_26_005058_fix_ip_addresses_table_columns.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_27_001056_clear_server_id_on_server_delete_in_ip_tables.php b/database/migrations/2022_07_27_001056_clear_server_id_on_server_delete_in_ip_tables.php index 903090828e2..a5dc394859d 100644 --- a/database/migrations/2022_07_27_001056_clear_server_id_on_server_delete_in_ip_tables.php +++ b/database/migrations/2022_07_27_001056_clear_server_id_on_server_delete_in_ip_tables.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_28_010809_change_subnet_column_to_cid_in_ip_addresses_table.php b/database/migrations/2022_07_28_010809_change_subnet_column_to_cid_in_ip_addresses_table.php index 091da063855..870c526731b 100644 --- a/database/migrations/2022_07_28_010809_change_subnet_column_to_cid_in_ip_addresses_table.php +++ b/database/migrations/2022_07_28_010809_change_subnet_column_to_cid_in_ip_addresses_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_07_31_152015_create_sso_tokens_table.php b/database/migrations/2022_07_31_152015_create_sso_tokens_table.php index 1b47e8ff54c..92d829a8466 100644 --- a/database/migrations/2022_07_31_152015_create_sso_tokens_table.php +++ b/database/migrations/2022_07_31_152015_create_sso_tokens_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_08_02_042345_replace_is_installing_column_with_installing_in_servers_table.php b/database/migrations/2022_08_02_042345_replace_is_installing_column_with_installing_in_servers_table.php index 64b330c16a8..ddcd13fcf26 100644 --- a/database/migrations/2022_08_02_042345_replace_is_installing_column_with_installing_in_servers_table.php +++ b/database/migrations/2022_08_02_042345_replace_is_installing_column_with_installing_in_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_08_04_052834_add_api_key_columns_to_nodes_table.php b/database/migrations/2022_08_04_052834_add_api_key_columns_to_nodes_table.php index ddf6c03708e..554093ecd70 100644 --- a/database/migrations/2022_08_04_052834_add_api_key_columns_to_nodes_table.php +++ b/database/migrations/2022_08_04_052834_add_api_key_columns_to_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_08_09_003453_remove_username_password_columns_from_nodes_table.php b/database/migrations/2022_08_09_003453_remove_username_password_columns_from_nodes_table.php index 87cdfd5ff2b..29bca6aa200 100644 --- a/database/migrations/2022_08_09_003453_remove_username_password_columns_from_nodes_table.php +++ b/database/migrations/2022_08_09_003453_remove_username_password_columns_from_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_08_09_003757_remove_auth_type_column_from_nodes_table.php b/database/migrations/2022_08_09_003757_remove_auth_type_column_from_nodes_table.php index 56292e22fdb..46b32432a95 100644 --- a/database/migrations/2022_08_09_003757_remove_auth_type_column_from_nodes_table.php +++ b/database/migrations/2022_08_09_003757_remove_auth_type_column_from_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_08_09_194438_add_mac_address_column_to_ip_addresses_table.php b/database/migrations/2022_08_09_194438_add_mac_address_column_to_ip_addresses_table.php index 7ff668261ea..e2feda33ac6 100644 --- a/database/migrations/2022_08_09_194438_add_mac_address_column_to_ip_addresses_table.php +++ b/database/migrations/2022_08_09_194438_add_mac_address_column_to_ip_addresses_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_09_08_031709_create_activity_logs_table.php b/database/migrations/2022_09_08_031709_create_activity_logs_table.php index 6c03cb7ac6d..fa9a1074498 100644 --- a/database/migrations/2022_09_08_031709_create_activity_logs_table.php +++ b/database/migrations/2022_09_08_031709_create_activity_logs_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_09_09_214058_create_activity_log_subjects_table.php b/database/migrations/2022_09_09_214058_create_activity_log_subjects_table.php index 9d24d640491..485ad53e3ad 100644 --- a/database/migrations/2022_09_09_214058_create_activity_log_subjects_table.php +++ b/database/migrations/2022_09_09_214058_create_activity_log_subjects_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_09_25_133215_add_limits_to_servers_table.php b/database/migrations/2022_09_25_133215_add_limits_to_servers_table.php index 2f89f4fbbeb..5eb38721611 100644 --- a/database/migrations/2022_09_25_133215_add_limits_to_servers_table.php +++ b/database/migrations/2022_09_25_133215_add_limits_to_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_09_25_135328_add_network_and_storage_columns_to_nodes_table.php b/database/migrations/2022_09_25_135328_add_network_and_storage_columns_to_nodes_table.php index f67910d2ff0..2dc6b694626 100644 --- a/database/migrations/2022_09_25_135328_add_network_and_storage_columns_to_nodes_table.php +++ b/database/migrations/2022_09_25_135328_add_network_and_storage_columns_to_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_10_08_035450_add_uuid_columns_to_servers_table.php b/database/migrations/2022_10_08_035450_add_uuid_columns_to_servers_table.php index c92e7d08868..9967cc548cd 100644 --- a/database/migrations/2022_10_08_035450_add_uuid_columns_to_servers_table.php +++ b/database/migrations/2022_10_08_035450_add_uuid_columns_to_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_10_16_134515_add_bandwidth_metrics_to_servers_table.php b/database/migrations/2022_10_16_134515_add_bandwidth_metrics_to_servers_table.php index fb25b0518d1..48acd0f9645 100644 --- a/database/migrations/2022_10_16_134515_add_bandwidth_metrics_to_servers_table.php +++ b/database/migrations/2022_10_16_134515_add_bandwidth_metrics_to_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_10_20_215932_add_default_value_to_bandwidth_usage_column_in_servers_table.php b/database/migrations/2022_10_20_215932_add_default_value_to_bandwidth_usage_column_in_servers_table.php index a617bf35396..fcb1a080e37 100644 --- a/database/migrations/2022_10_20_215932_add_default_value_to_bandwidth_usage_column_in_servers_table.php +++ b/database/migrations/2022_10_20_215932_add_default_value_to_bandwidth_usage_column_in_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_10_30_165927_rename_uuid_short_column_in_servers_table.php b/database/migrations/2022_10_30_165927_rename_uuid_short_column_in_servers_table.php index 3820bc82150..ce13d9eaa0e 100644 --- a/database/migrations/2022_10_30_165927_rename_uuid_short_column_in_servers_table.php +++ b/database/migrations/2022_10_30_165927_rename_uuid_short_column_in_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_11_02_223634_refactor_activity_logs_table.php b/database/migrations/2022_11_02_223634_refactor_activity_logs_table.php index f52c34fa339..e411ef0f345 100644 --- a/database/migrations/2022_11_02_223634_refactor_activity_logs_table.php +++ b/database/migrations/2022_11_02_223634_refactor_activity_logs_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_11_13_154340_create_backups_table.php b/database/migrations/2022_11_13_154340_create_backups_table.php index be3764d9b38..00904a39a55 100644 --- a/database/migrations/2022_11_13_154340_create_backups_table.php +++ b/database/migrations/2022_11_13_154340_create_backups_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_11_13_203213_add_uuid_column_to_backups_table.php b/database/migrations/2022_11_13_203213_add_uuid_column_to_backups_table.php index b8c14614ebb..17337cb09db 100644 --- a/database/migrations/2022_11_13_203213_add_uuid_column_to_backups_table.php +++ b/database/migrations/2022_11_13_203213_add_uuid_column_to_backups_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_11_23_155133_add_storage_and_specification_columns_to_nodes_table.php b/database/migrations/2022_11_23_155133_add_storage_and_specification_columns_to_nodes_table.php index 6e0a698804b..7116a31f454 100644 --- a/database/migrations/2022_11_23_155133_add_storage_and_specification_columns_to_nodes_table.php +++ b/database/migrations/2022_11_23_155133_add_storage_and_specification_columns_to_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_11_23_180140_rename_columns_in_backups_table.php b/database/migrations/2022_11_23_180140_rename_columns_in_backups_table.php index 91461a1975f..4febcf2b100 100644 --- a/database/migrations/2022_11_23_180140_rename_columns_in_backups_table.php +++ b/database/migrations/2022_11_23_180140_rename_columns_in_backups_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_11_23_221039_add_soft_deletes_to_backups_table.php b/database/migrations/2022_11_23_221039_add_soft_deletes_to_backups_table.php index e15dd01e830..3f4bdbfc2e8 100644 --- a/database/migrations/2022_11_23_221039_add_soft_deletes_to_backups_table.php +++ b/database/migrations/2022_11_23_221039_add_soft_deletes_to_backups_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_11_24_205004_add_hostname_column_to_servers_table.php b/database/migrations/2022_11_24_205004_add_hostname_column_to_servers_table.php index c222f4fb294..8d715a1c2cd 100644 --- a/database/migrations/2022_11_24_205004_add_hostname_column_to_servers_table.php +++ b/database/migrations/2022_11_24_205004_add_hostname_column_to_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_06_233100_move_network_column_in_nodes_table.php b/database/migrations/2022_12_06_233100_move_network_column_in_nodes_table.php index c718ccabe66..383ca59b40b 100644 --- a/database/migrations/2022_12_06_233100_move_network_column_in_nodes_table.php +++ b/database/migrations/2022_12_06_233100_move_network_column_in_nodes_table.php @@ -2,18 +2,16 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::table('nodes', function (Blueprint $table) { - DB::statement('ALTER TABLE nodes MODIFY COLUMN network varchar(255) AFTER backup_storage'); + $table->string('network')->after('backup_storage')->change(); }); } @@ -23,7 +21,7 @@ public function up(): void public function down(): void { Schema::table('nodes', function (Blueprint $table) { - DB::statement('ALTER TABLE nodes MODIFY COLUMN network varchar(255) AFTER vm_storage'); + $table->string('network')->after('vm_storage')->change(); }); } }; diff --git a/database/migrations/2022_12_07_003704_create_locations_table.php b/database/migrations/2022_12_07_003704_create_locations_table.php index 9a24af00457..192be33fbb6 100644 --- a/database/migrations/2022_12_07_003704_create_locations_table.php +++ b/database/migrations/2022_12_07_003704_create_locations_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_07_004256_add_location_id_column_to_nodes_table.php b/database/migrations/2022_12_07_004256_add_location_id_column_to_nodes_table.php index 10ade0469d1..f721218f7ca 100644 --- a/database/migrations/2022_12_07_004256_add_location_id_column_to_nodes_table.php +++ b/database/migrations/2022_12_07_004256_add_location_id_column_to_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_07_014225_remove_nullable_from_foreign_keys.php b/database/migrations/2022_12_07_014225_remove_nullable_from_foreign_keys.php index dcb05f8198c..53d0e014318 100644 --- a/database/migrations/2022_12_07_014225_remove_nullable_from_foreign_keys.php +++ b/database/migrations/2022_12_07_014225_remove_nullable_from_foreign_keys.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_16_030651_rename_hostname_column_in_nodes_table.php b/database/migrations/2022_12_16_030651_rename_hostname_column_in_nodes_table.php index 3eb27bb601c..d59023c63d3 100644 --- a/database/migrations/2022_12_16_030651_rename_hostname_column_in_nodes_table.php +++ b/database/migrations/2022_12_16_030651_rename_hostname_column_in_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_22_174238_create_iso_library_table.php b/database/migrations/2022_12_22_174238_create_iso_library_table.php index 61b413d6c0f..54743a3a4c9 100644 --- a/database/migrations/2022_12_22_174238_create_iso_library_table.php +++ b/database/migrations/2022_12_22_174238_create_iso_library_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_22_182930_add_uuid_column_to_iso_library_table.php b/database/migrations/2022_12_22_182930_add_uuid_column_to_iso_library_table.php index a1afd000b33..045b3140622 100644 --- a/database/migrations/2022_12_22_182930_add_uuid_column_to_iso_library_table.php +++ b/database/migrations/2022_12_22_182930_add_uuid_column_to_iso_library_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_22_194029_add_iso_storage_column_to_nodes_table.php b/database/migrations/2022_12_22_194029_add_iso_storage_column_to_nodes_table.php index d1a57884b64..4f6c0bf512f 100644 --- a/database/migrations/2022_12_22_194029_add_iso_storage_column_to_nodes_table.php +++ b/database/migrations/2022_12_22_194029_add_iso_storage_column_to_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_25_005721_create_template_groups_table.php b/database/migrations/2022_12_25_005721_create_template_groups_table.php index 72d427d0a87..61c3b4d4187 100644 --- a/database/migrations/2022_12_25_005721_create_template_groups_table.php +++ b/database/migrations/2022_12_25_005721_create_template_groups_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_25_005722_fix_templates_table.php b/database/migrations/2022_12_25_005722_fix_templates_table.php index ddd153ffa81..f2a122dd8e8 100644 --- a/database/migrations/2022_12_25_005722_fix_templates_table.php +++ b/database/migrations/2022_12_25_005722_fix_templates_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_25_011046_add_node_id_column_to_template_groups_table.php b/database/migrations/2022_12_25_011046_add_node_id_column_to_template_groups_table.php index 8e9a1408b22..a62524eb6ef 100644 --- a/database/migrations/2022_12_25_011046_add_node_id_column_to_template_groups_table.php +++ b/database/migrations/2022_12_25_011046_add_node_id_column_to_template_groups_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_25_011208_fix_node_id_column_order_in_template_groups_table.php b/database/migrations/2022_12_25_011208_fix_node_id_column_order_in_template_groups_table.php index f8a32669c5b..d94fc99ba21 100644 --- a/database/migrations/2022_12_25_011208_fix_node_id_column_order_in_template_groups_table.php +++ b/database/migrations/2022_12_25_011208_fix_node_id_column_order_in_template_groups_table.php @@ -2,18 +2,17 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ public function up(): void { Schema::table('template_groups', function (Blueprint $table) { - DB::statement('ALTER TABLE template_groups MODIFY COLUMN node_id bigint unsigned AFTER id'); + + $table->unsignedBigInteger('node_id')->after('id')->change(); }); } @@ -23,7 +22,7 @@ public function up(): void public function down(): void { Schema::table('template_groups', function (Blueprint $table) { - DB::statement('ALTER TABLE template_groups MODIFY COLUMN node_id bigint unsigned AFTER updated_at'); + $table->unsignedBigInteger('node_id')->after('updated_at')->change(); }); } }; diff --git a/database/migrations/2022_12_25_011355_make_node_id_not_nullable_in_template_groups_table.php b/database/migrations/2022_12_25_011355_make_node_id_not_nullable_in_template_groups_table.php index b633b7335b1..62b52c83082 100644 --- a/database/migrations/2022_12_25_011355_make_node_id_not_nullable_in_template_groups_table.php +++ b/database/migrations/2022_12_25_011355_make_node_id_not_nullable_in_template_groups_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2022_12_25_011632_add_uuid_column_to_templates_table.php b/database/migrations/2022_12_25_011632_add_uuid_column_to_templates_table.php index 0b390b17816..5daf58807da 100644 --- a/database/migrations/2022_12_25_011632_add_uuid_column_to_templates_table.php +++ b/database/migrations/2022_12_25_011632_add_uuid_column_to_templates_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_01_15_153139_add_soft_deletes_column_to_servers_table.php b/database/migrations/2023_01_15_153139_add_soft_deletes_column_to_servers_table.php index c66405a62c2..4c31e5f0cde 100644 --- a/database/migrations/2023_01_15_153139_add_soft_deletes_column_to_servers_table.php +++ b/database/migrations/2023_01_15_153139_add_soft_deletes_column_to_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_01_21_041004_add_soft_deletes_to_users_table.php b/database/migrations/2023_01_21_041004_add_soft_deletes_to_users_table.php index bcbe7e0274f..b6c0802d7c0 100644 --- a/database/migrations/2023_01_21_041004_add_soft_deletes_to_users_table.php +++ b/database/migrations/2023_01_21_041004_add_soft_deletes_to_users_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_01_21_043348_add_type_to_personal_access_tokens_table.php b/database/migrations/2023_01_21_043348_add_type_to_personal_access_tokens_table.php index 7c4812f8eef..0095766ac5c 100644 --- a/database/migrations/2023_01_21_043348_add_type_to_personal_access_tokens_table.php +++ b/database/migrations/2023_01_21_043348_add_type_to_personal_access_tokens_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_02_20_053349_create_ssh_keys_table.php b/database/migrations/2023_02_20_053349_create_ssh_keys_table.php index 2cefaec0e9b..976a6e96fd0 100644 --- a/database/migrations/2023_02_20_053349_create_ssh_keys_table.php +++ b/database/migrations/2023_02_20_053349_create_ssh_keys_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_03_06_212114_create_job_batches_table.php b/database/migrations/2023_03_06_212114_create_job_batches_table.php index 8d281de6379..cb609ec188e 100644 --- a/database/migrations/2023_03_06_212114_create_job_batches_table.php +++ b/database/migrations/2023_03_06_212114_create_job_batches_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_04_07_014605_remove_soft_deletes_from_users_table.php b/database/migrations/2023_04_07_014605_remove_soft_deletes_from_users_table.php index ccd046a5e6b..ed5ce326ae8 100644 --- a/database/migrations/2023_04_07_014605_remove_soft_deletes_from_users_table.php +++ b/database/migrations/2023_04_07_014605_remove_soft_deletes_from_users_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_04_07_015233_remove_soft_deletes_from_servers_table.php b/database/migrations/2023_04_07_015233_remove_soft_deletes_from_servers_table.php index f7c9ed1388a..5a2c21cc9f0 100644 --- a/database/migrations/2023_04_07_015233_remove_soft_deletes_from_servers_table.php +++ b/database/migrations/2023_04_07_015233_remove_soft_deletes_from_servers_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_04_28_000000_add_expires_at_to_personal_access_tokens_table.php b/database/migrations/2023_04_28_000000_add_expires_at_to_personal_access_tokens_table.php index 68b119fd5f2..365c1f41d7a 100644 --- a/database/migrations/2023_04_28_000000_add_expires_at_to_personal_access_tokens_table.php +++ b/database/migrations/2023_04_28_000000_add_expires_at_to_personal_access_tokens_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_04_28_000000_rename_password_resets_table.php b/database/migrations/2023_04_28_000000_rename_password_resets_table.php index c3f948980b7..f69ae13669f 100644 --- a/database/migrations/2023_04_28_000000_rename_password_resets_table.php +++ b/database/migrations/2023_04_28_000000_rename_password_resets_table.php @@ -3,8 +3,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_05_11_041215_add_token_id_column_to_nodes_table.php b/database/migrations/2023_05_11_041215_add_token_id_column_to_nodes_table.php index 131129d2d1c..b2b8793e33d 100644 --- a/database/migrations/2023_05_11_041215_add_token_id_column_to_nodes_table.php +++ b/database/migrations/2023_05_11_041215_add_token_id_column_to_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_05_11_042803_make_node_secret_column_a_text_type_in_nodes_table.php b/database/migrations/2023_05_11_042803_make_node_secret_column_a_text_type_in_nodes_table.php index 81e155f4e43..747a3bc0947 100644 --- a/database/migrations/2023_05_11_042803_make_node_secret_column_a_text_type_in_nodes_table.php +++ b/database/migrations/2023_05_11_042803_make_node_secret_column_a_text_type_in_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_05_11_042804_make_node_secret_encrypted_in_nodes_table.php b/database/migrations/2023_05_11_042804_make_node_secret_encrypted_in_nodes_table.php index aa31246ee66..d458c39759d 100644 --- a/database/migrations/2023_05_11_042804_make_node_secret_encrypted_in_nodes_table.php +++ b/database/migrations/2023_05_11_042804_make_node_secret_encrypted_in_nodes_table.php @@ -14,7 +14,6 @@ public function up(): void Schema::table('nodes', function (Blueprint $table) { $nodes = DB::table('nodes')->get()->toArray(); - foreach ($nodes as $node) { DB::table('nodes') ->where('id', $node->id) @@ -31,7 +30,6 @@ public function down(): void Schema::table('nodes', function (Blueprint $table) { $nodes = DB::table('nodes')->get()->toArray(); - foreach ($nodes as $node) { DB::table('nodes') ->where('id', $node->id) diff --git a/database/migrations/2023_05_11_043101_make_coterm_token_id_unique_in_nodes_table.php b/database/migrations/2023_05_11_043101_make_coterm_token_id_unique_in_nodes_table.php index 1e7fe60cbfb..ff41f8d8d3d 100644 --- a/database/migrations/2023_05_11_043101_make_coterm_token_id_unique_in_nodes_table.php +++ b/database/migrations/2023_05_11_043101_make_coterm_token_id_unique_in_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_05_20_200644_add_coterm_enabled_column_to_nodes_table.php b/database/migrations/2023_05_20_200644_add_coterm_enabled_column_to_nodes_table.php index f74dae2230f..1e529c41034 100644 --- a/database/migrations/2023_05_20_200644_add_coterm_enabled_column_to_nodes_table.php +++ b/database/migrations/2023_05_20_200644_add_coterm_enabled_column_to_nodes_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_05_21_015205_move_port_column_to_behind_fqdn_in_nodes_table.php b/database/migrations/2023_05_21_015205_move_port_column_to_behind_fqdn_in_nodes_table.php index 1d7df8926c7..a95a0937215 100644 --- a/database/migrations/2023_05_21_015205_move_port_column_to_behind_fqdn_in_nodes_table.php +++ b/database/migrations/2023_05_21_015205_move_port_column_to_behind_fqdn_in_nodes_table.php @@ -2,24 +2,23 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; return new class extends Migration { - /** - * Run the migrations. - */ public function up(): void { - DB::statement('ALTER TABLE nodes MODIFY COLUMN port int AFTER fqdn'); + Schema::table('nodes', function (Blueprint $table) { + // Explicitly include all desired attributes for Laravel 11 + $table->integer('port')->nullable(false)->after('fqdn')->change(); + }); } - /** - * Reverse the migrations. - */ public function down(): void { - DB::statement('ALTER TABLE nodes MODIFY COLUMN port int AFTER secret'); + Schema::table('nodes', function (Blueprint $table) { + // Move the column back with all necessary attributes specified + $table->integer('port')->nullable(false)->after('secret')->change(); + }); } }; diff --git a/database/migrations/2023_05_28_025503_create_address_pools_table.php b/database/migrations/2023_05_28_025503_create_address_pools_table.php index 1cc8e62695d..d15e2141f2d 100644 --- a/database/migrations/2023_05_28_025503_create_address_pools_table.php +++ b/database/migrations/2023_05_28_025503_create_address_pools_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_05_28_031255_create_address_pool_to_node_table.php b/database/migrations/2023_05_28_031255_create_address_pool_to_node_table.php index 44f1f72f245..5194b45956c 100644 --- a/database/migrations/2023_05_28_031255_create_address_pool_to_node_table.php +++ b/database/migrations/2023_05_28_031255_create_address_pool_to_node_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_05_28_032248_add_uuid_column_to_users_table.php b/database/migrations/2023_05_28_032248_add_uuid_column_to_users_table.php index 24ec3d60df3..f1e1a487d35 100644 --- a/database/migrations/2023_05_28_032248_add_uuid_column_to_users_table.php +++ b/database/migrations/2023_05_28_032248_add_uuid_column_to_users_table.php @@ -1,12 +1,11 @@ char('uuid', 36)->nullable()->after('id'); }); - DB::statement('UPDATE users SET uuid=(select UUID())'); + User::chunk(100, function ($users) { + foreach ($users as $user) { + $user->uuid = Str::uuid()->toString(); + $user->save(); + } + }); } /** diff --git a/database/migrations/2023_05_28_133425_make_uuid_unique_and_nonnullable_in_users_table.php b/database/migrations/2023_05_28_133425_make_uuid_unique_and_nonnullable_in_users_table.php index d5684e99474..2d70e4ae068 100644 --- a/database/migrations/2023_05_28_133425_make_uuid_unique_and_nonnullable_in_users_table.php +++ b/database/migrations/2023_05_28_133425_make_uuid_unique_and_nonnullable_in_users_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_05_28_151803_drop_sso_tokens_table.php b/database/migrations/2023_05_28_151803_drop_sso_tokens_table.php index c048201ee3b..fc509e9a56e 100644 --- a/database/migrations/2023_05_28_151803_drop_sso_tokens_table.php +++ b/database/migrations/2023_05_28_151803_drop_sso_tokens_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_06_04_153504_create_address_table_that_uses_ip_pools.php b/database/migrations/2023_06_04_153504_create_address_table_that_uses_ip_pools.php index 40ae201d0fe..1e246d07827 100644 --- a/database/migrations/2023_06_04_153504_create_address_table_that_uses_ip_pools.php +++ b/database/migrations/2023_06_04_153504_create_address_table_that_uses_ip_pools.php @@ -2,8 +2,8 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Collection; use Illuminate\Support\Arr; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Schema; return new class extends Migration { @@ -33,7 +33,7 @@ public function up(): void /** * The key is the node id and the value is the address pool id - * @var array $pools + * @var array $pools */ $pools = []; @@ -53,14 +53,14 @@ public function up(): void $payload = []; foreach ($addresses as $address) { - if (!array_key_exists($address->node_id, $pools)) { + if (! array_key_exists($address->node_id, $pools)) { $poolId = DB::table('address_pools')->insertGetId([ - 'name' => "Node {$address->fqdn}" + 'name' => "Node {$address->fqdn}", ]); DB::table('address_pool_to_node')->insert([ 'address_pool_id' => $poolId, - 'node_id' => $address->node_id + 'node_id' => $address->node_id, ]); $pools[$address->node_id] = $poolId; @@ -134,9 +134,7 @@ public function down(): void $addresses = DB::table('temp_ip_addresses')->where('address_pool_id', '=', $pool->id)->get(); foreach ($addresses as $address) { - foreach ($linkedNodeIds as $linkedNodeId) { - $payload[] = [ 'node_id' => $linkedNodeId, 'server_id' => $address->server_id, @@ -151,7 +149,6 @@ public function down(): void ]; } } - } DB::table('ip_addresses')->insert($payload); diff --git a/database/migrations/2023_06_19_234120_make_file_name_non_nullable_in_isos_table.php b/database/migrations/2023_06_19_234120_make_file_name_non_nullable_in_isos_table.php index 89ad29f98ad..5e5292f73d9 100644 --- a/database/migrations/2023_06_19_234120_make_file_name_non_nullable_in_isos_table.php +++ b/database/migrations/2023_06_19_234120_make_file_name_non_nullable_in_isos_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2023_09_03_174812_move_types_column_in_ip_addresses_table.php b/database/migrations/2023_09_03_174812_move_types_column_in_ip_addresses_table.php index db9139ba82d..27d3725e7c1 100644 --- a/database/migrations/2023_09_03_174812_move_types_column_in_ip_addresses_table.php +++ b/database/migrations/2023_09_03_174812_move_types_column_in_ip_addresses_table.php @@ -11,7 +11,10 @@ */ public function up(): void { - DB::statement('ALTER TABLE ip_addresses MODIFY COLUMN type varchar(255) AFTER server_id'); + Schema::table('ip_addresses', function (Blueprint $table) { + // Modify the 'type' column to be after 'server_id' with all necessary attributes + $table->string('type', 255)->after('server_id')->change(); + }); } /** @@ -19,6 +22,9 @@ public function up(): void */ public function down(): void { - DB::statement('ALTER TABLE ip_addresses MODIFY COLUMN type varchar(255) AFTER mac_address'); + Schema::table('ip_addresses', function (Blueprint $table) { + // Move the 'type' column to be after 'mac_address' with all necessary attributes + $table->string('type', 255)->after('mac_address')->change(); + }); } }; diff --git a/database/migrations/2023_11_11_175741_create_coterms_table.php b/database/migrations/2023_11_11_175741_create_coterms_table.php index 8a1bafef189..6f7a7fa5b44 100644 --- a/database/migrations/2023_11_11_175741_create_coterms_table.php +++ b/database/migrations/2023_11_11_175741_create_coterms_table.php @@ -1,8 +1,8 @@ address = strtolower($ip->address); + $ip->gateway = strtolower($ip->gateway); + $ip->mac_address = strtolower($ip->mac_address); + $ip->save(); + } + }); } }; diff --git a/database/migrations/2024_10_03_222715_change_backups_completed_at_to_errors_column.php b/database/migrations/2024_10_03_222715_change_backups_completed_at_to_errors_column.php index 48c2c5f0cf4..671e82e028a 100644 --- a/database/migrations/2024_10_03_222715_change_backups_completed_at_to_errors_column.php +++ b/database/migrations/2024_10_03_222715_change_backups_completed_at_to_errors_column.php @@ -5,16 +5,15 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Run the migrations. - */ +return new class extends Migration +{ public function up(): void { - // Delete records based on conditions - DB::statement( - 'DELETE FROM backups WHERE completed_at IS NOT NULL AND is_successful = 0;', - ); + // Delete records based on conditions without raw SQL + DB::table('backups') + ->whereNotNull('completed_at') + ->where('is_successful', 0) + ->delete(); Schema::table('backups', function (Blueprint $table) { $table->string('description')->nullable()->after('name'); @@ -22,31 +21,23 @@ public function up(): void $table->dropSoftDeletes(); $table->dropColumn(['is_successful', 'updated_at']); - }); - // Modify the 'is_locked' column to be not nullable with a default of false (0) - DB::statement( - 'ALTER TABLE backups MODIFY COLUMN is_locked TINYINT(1) NOT NULL DEFAULT 0 AFTER description', - ); + // Explicitly define 'is_locked' attributes to prevent unintended behavior + $table->boolean('is_locked')->default(false)->nullable(false)->after('description')->change(); + }); } - /** - * Reverse the migrations. - */ public function down(): void { Schema::table('backups', function (Blueprint $table) { $table->dropColumn(['description', 'errors']); - $table->boolean('is_locked')->nullable()->change(); + // Re-apply all attributes to 'is_locked' in down migration + $table->boolean('is_locked')->nullable()->default(null)->after('is_successful')->change(); + $table->boolean('is_successful')->default(false)->after('server_id'); $table->timestamp('updated_at')->nullable()->after('created_at'); $table->softDeletes()->after('updated_at'); }); - - // Modify the 'is_locked' column to be nullable in the down migration - DB::statement( - 'ALTER TABLE backups MODIFY COLUMN is_locked TINYINT(1) NULL AFTER is_successful', - ); } -}; \ No newline at end of file +}; diff --git a/database/migrations/2024_10_10_025946_remove_timestamps_from_address_pools_table.php b/database/migrations/2024_10_10_025946_remove_timestamps_from_address_pools_table.php index a0a6b2afb61..2eaaa8ad44d 100644 --- a/database/migrations/2024_10_10_025946_remove_timestamps_from_address_pools_table.php +++ b/database/migrations/2024_10_10_025946_remove_timestamps_from_address_pools_table.php @@ -24,6 +24,6 @@ public function down(): void $table->after('name', fn (Blueprint $table) => $table->timestamps()); }); - DB::statement('UPDATE address_pools SET created_at = NOW()'); + DB::table('address_pools')->update(['created_at' => now()]); } }; diff --git a/database/migrations/2024_10_10_033133_update_backup_snapshot_limit_columns_on_servers_table.php b/database/migrations/2024_10_10_033133_update_backup_snapshot_limit_columns_on_servers_table.php index 11bbf321193..e4b68b3e87a 100644 --- a/database/migrations/2024_10_10_033133_update_backup_snapshot_limit_columns_on_servers_table.php +++ b/database/migrations/2024_10_10_033133_update_backup_snapshot_limit_columns_on_servers_table.php @@ -4,84 +4,54 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Run the migrations. - */ +return new class extends Migration +{ public function up(): void { - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN snapshot_limit INT NULL;', - ); - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN backup_limit INT NULL;', - ); - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN bandwidth_limit INT NULL;', - ); - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN bandwidth_usage INT UNSIGNED NOT NULL DEFAULT 0;', - ); - - DB::statement('UPDATE servers SET snapshot_limit = -1 WHERE snapshot_limit IS NULL;'); - DB::statement('UPDATE servers SET backup_limit = -1 WHERE backup_limit IS NULL;'); - DB::statement('UPDATE servers SET bandwidth_limit = -1 WHERE bandwidth_limit IS NULL;'); - - DB::statement( - 'ALTER TABLE servers CHANGE COLUMN snapshot_limit snapshot_count_limit INT NOT NULL;', - ); - DB::statement( - 'ALTER TABLE servers CHANGE COLUMN backup_limit backup_count_limit INT NOT NULL;', - ); - DB::statement( - 'ALTER TABLE servers CHANGE COLUMN bandwidth_limit bandwidth_limit INT NOT NULL;', - ); + Schema::table('servers', function (Blueprint $table) { + $table->integer('snapshot_limit')->nullable()->change(); + $table->integer('backup_limit')->nullable()->change(); + $table->integer('bandwidth_limit')->nullable()->change(); + $table->unsignedInteger('bandwidth_usage')->default(0)->change(); + }); + DB::table('servers')->whereNull('snapshot_limit')->update(['snapshot_limit' => -1]); + DB::table('servers')->whereNull('backup_limit')->update(['backup_limit' => -1]); + DB::table('servers')->whereNull('bandwidth_limit')->update(['bandwidth_limit' => -1]); Schema::table('servers', function (Blueprint $table) { + $table->renameColumn('snapshot_limit', 'snapshot_count_limit'); + $table->renameColumn('backup_limit', 'backup_count_limit'); + $table->renameColumn('bandwidth_limit', 'bandwidth_limit'); $table->integer('snapshot_size_limit')->after('snapshot_count_limit'); $table->integer('backup_size_limit')->after('backup_count_limit'); }); + + Schema::table('servers', function (Blueprint $table) { + $table->integer('snapshot_count_limit')->nullable(false)->change(); + $table->integer('backup_count_limit')->nullable(false)->change(); + $table->integer('bandwidth_limit')->nullable(false)->change(); + }); } - /** - * Reverse the migrations. - */ public function down(): void { - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN snapshot_count_limit INT NULL;', - ); - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN backup_count_limit INT NULL;', - ); - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN bandwidth_limit INT NULL;', - ); - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN bandwidth_usage INT NOT NULL DEFAULT 0;', - ); + Schema::table('servers', function (Blueprint $table) { + $table->integer('snapshot_count_limit')->nullable()->change(); + $table->integer('backup_count_limit')->nullable()->change(); + $table->integer('bandwidth_limit')->nullable()->change(); + $table->integer('bandwidth_usage')->default(0)->change(); + }); - DB::statement( - 'UPDATE servers SET snapshot_count_limit = NULL WHERE snapshot_count_limit = -1;', - ); - DB::statement( - 'UPDATE servers SET backup_count_limit = NULL WHERE backup_count_limit = -1;', - ); - DB::statement('UPDATE servers SET bandwidth_limit = NULL WHERE bandwidth_limit = -1;'); + DB::table('servers')->where('snapshot_count_limit', -1)->update(['snapshot_count_limit' => null]); + DB::table('servers')->where('backup_count_limit', -1)->update(['backup_count_limit' => null]); + DB::table('servers')->where('bandwidth_limit', -1)->update(['bandwidth_limit' => null]); Schema::table('servers', function (Blueprint $table) { $table->dropColumn('snapshot_size_limit', 'backup_size_limit'); + $table->renameColumn('snapshot_count_limit', 'snapshot_limit'); + $table->renameColumn('backup_count_limit', 'backup_limit'); + $table->renameColumn('bandwidth_limit', 'bandwidth_limit'); }); - - DB::statement( - 'ALTER TABLE servers CHANGE COLUMN snapshot_count_limit snapshot_limit INT UNSIGNED NULL;', - ); - DB::statement( - 'ALTER TABLE servers CHANGE COLUMN backup_count_limit backup_limit INT UNSIGNED NULL;', - ); - DB::statement( - 'ALTER TABLE servers CHANGE COLUMN bandwidth_limit bandwidth_limit INT UNSIGNED NULL;', - ); } -}; \ No newline at end of file +}; diff --git a/database/migrations/2024_10_10_192039_update_size_column_on_backups_snapshots_tables.php b/database/migrations/2024_10_10_192039_update_size_column_on_backups_snapshots_tables.php index 3d198f34c38..f93a8cb6617 100644 --- a/database/migrations/2024_10_10_192039_update_size_column_on_backups_snapshots_tables.php +++ b/database/migrations/2024_10_10_192039_update_size_column_on_backups_snapshots_tables.php @@ -1,31 +1,30 @@ unsignedInteger('size')->nullable(false)->change(); + }); + + Schema::table('snapshots', function (Blueprint $table) { + $table->unsignedInteger('size')->nullable(false)->change(); + }); } - /** - * Reverse the migrations. - */ public function down(): void { - DB::statement( - 'ALTER TABLE backups MODIFY COLUMN size BIGINT UNSIGNED NOT NULL DEFAULT 0;', - ); - DB::statement( - 'ALTER TABLE snapshots MODIFY COLUMN size BIGINT UNSIGNED NOT NULL DEFAULT 0;', - ); + Schema::table('backups', function (Blueprint $table) { + $table->unsignedBigInteger('size')->default(0)->nullable(false)->change(); + }); + + Schema::table('snapshots', function (Blueprint $table) { + $table->unsignedBigInteger('size')->default(0)->nullable(false)->change(); + }); } }; diff --git a/database/migrations/2024_10_10_194915_update_vmid_column_type_on_servers_table.php b/database/migrations/2024_10_10_194915_update_vmid_column_type_on_servers_table.php index 8d926fe07d9..c92f451cfc6 100644 --- a/database/migrations/2024_10_10_194915_update_vmid_column_type_on_servers_table.php +++ b/database/migrations/2024_10_10_194915_update_vmid_column_type_on_servers_table.php @@ -1,25 +1,22 @@ unsignedInteger('vmid')->nullable(false)->change(); + }); } - /** - * Reverse the migrations. - */ public function down(): void { - DB::statement( - 'ALTER TABLE servers MODIFY COLUMN vmid BIGINT UNSIGNED NOT NULL;', - ); + Schema::table('servers', function (Blueprint $table) { + $table->unsignedBigInteger('vmid')->nullable(false)->change(); + }); } }; diff --git a/phpunit.xml b/phpunit.xml index 28ae990a485..4daaa6a9aad 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -12,7 +12,7 @@ - + diff --git a/public/index.php b/public/index.php index 5e81d352eff..947d98963f0 100644 --- a/public/index.php +++ b/public/index.php @@ -1,55 +1,17 @@ make(Kernel::class); - -$response = $kernel->handle( - $request = Request::capture() -)->send(); - -$kernel->terminate($request, $response); +// Bootstrap Laravel and handle the request... +(require_once __DIR__.'/../bootstrap/app.php') + ->handleRequest(Request::capture()); diff --git a/routes/api-admin.php b/routes/api-admin.php index 9140c34fd18..c807299b9c6 100644 --- a/routes/api-admin.php +++ b/routes/api-admin.php @@ -150,35 +150,33 @@ Route::get('/', [Admin\ServerController::class, 'index']); Route::post('/', [Admin\ServerController::class, 'store']); - Route::group( - ['prefix' => '/{server}', 'middleware' => ValidateServerStatusMiddleware::class], - function () { - Route::get('/', [Admin\ServerController::class, 'show']) - ->withoutMiddleware( - ValidateServerStatusMiddleware::class, - ); - Route::patch('/', [Admin\ServerController::class, 'update']) - ->withoutMiddleware( - ValidateServerStatusMiddleware::class, - ); - Route::delete('/', [Admin\ServerController::class, 'destroy']); + Route::prefix('/{server}')->middleware(ValidateServerStatusMiddleware::class)->group(function () { + Route::get('/', [Admin\ServerController::class, 'show']) + ->withoutMiddleware( + ValidateServerStatusMiddleware::class, + ); + Route::patch('/', [Admin\ServerController::class, 'update']) + ->withoutMiddleware( + ValidateServerStatusMiddleware::class, + ); + Route::delete('/', [Admin\ServerController::class, 'destroy']); - Route::prefix('/settings')->group(function () { - Route::patch( - '/build', - [Admin\ServerController::class, 'updateBuild'], - ); + Route::prefix('/settings')->group(function () { + Route::patch( + '/build', + [Admin\ServerController::class, 'updateBuild'], + ); - Route::post( - '/suspend', - [Admin\ServerController::class, 'suspend'], - ); - Route::post( - '/unsuspend', - [Admin\ServerController::class, 'unsuspend'], - ); - }); - } + Route::post( + '/suspend', + [Admin\ServerController::class, 'suspend'], + ); + Route::post( + '/unsuspend', + [Admin\ServerController::class, 'unsuspend'], + ); + }); + } ); }); diff --git a/routes/api-application.php b/routes/api-application.php index ecf9a32df21..a30a920af30 100644 --- a/routes/api-application.php +++ b/routes/api-application.php @@ -150,35 +150,33 @@ Route::get('/', [Admin\ServerController::class, 'index']); Route::post('/', [Admin\ServerController::class, 'store']); - Route::group( - ['prefix' => '/{server}', 'middleware' => ValidateServerStatusMiddleware::class], - function () { - Route::get('/', [Admin\ServerController::class, 'show']) - ->withoutMiddleware( - ValidateServerStatusMiddleware::class, - ); - Route::patch('/', [Admin\ServerController::class, 'update']) - ->withoutMiddleware( - ValidateServerStatusMiddleware::class, - ); - Route::delete('/', [Admin\ServerController::class, 'destroy']); + Route::prefix('/{server}')->middleware(ValidateServerStatusMiddleware::class)->group(function () { + Route::get('/', [Admin\ServerController::class, 'show']) + ->withoutMiddleware( + ValidateServerStatusMiddleware::class, + ); + Route::patch('/', [Admin\ServerController::class, 'update']) + ->withoutMiddleware( + ValidateServerStatusMiddleware::class, + ); + Route::delete('/', [Admin\ServerController::class, 'destroy']); - Route::prefix('/settings')->group(function () { - Route::patch( - '/build', - [Admin\ServerController::class, 'updateBuild'], - ); + Route::prefix('/settings')->group(function () { + Route::patch( + '/build', + [Admin\ServerController::class, 'updateBuild'], + ); - Route::post( - '/suspend', - [Admin\ServerController::class, 'suspend'], - ); - Route::post( - '/unsuspend', - [Admin\ServerController::class, 'unsuspend'], - ); - }); - } + Route::post( + '/suspend', + [Admin\ServerController::class, 'suspend'], + ); + Route::post( + '/unsuspend', + [Admin\ServerController::class, 'unsuspend'], + ); + }); + } ); }); diff --git a/routes/console.php b/routes/console.php new file mode 100644 index 00000000000..0484668efa5 --- /dev/null +++ b/routes/console.php @@ -0,0 +1,32 @@ +comment(Inspiring::quote()); +})->purpose('Display an inspiring quote')->hourly(); + +Schedule::command('queue:prune-batches')->daily(); + +if (config('backups.prune_age')) { + // Every 30 minutes, run the backup pruning command so that any abandoned backups can be deleted. + Schedule::command(PruneOrphanedBackupsCommand::class)->everyThirtyMinutes(); +} + +if (config('activity.prune_days')) { + Schedule::command(PruneCommand::class, ['--model' => [ActivityLog::class]])->daily(); +} + +Schedule::command(ResetUsagesCommand::class)->daily(); +Schedule::command(PruneUsersCommand::class)->daily(); +Schedule::command(UpdateUsagesCommand::class)->everyFiveMinutes(); +Schedule::command(UpdateRateLimitsCommand::class)->everyTenMinutes(); diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php deleted file mode 100644 index 9b7cfa6a511..00000000000 --- a/tests/CreatesApplication.php +++ /dev/null @@ -1,21 +0,0 @@ -make(Kernel::class)->bootstrap(); - - return $app; - } -} diff --git a/tests/Feature/Controllers/Admin/Nodes/IsoControllerTest.php b/tests/Feature/Controllers/Admin/Nodes/IsoControllerTest.php index 0f432d699cf..488d4fbe4af 100644 --- a/tests/Feature/Controllers/Admin/Nodes/IsoControllerTest.php +++ b/tests/Feature/Controllers/Admin/Nodes/IsoControllerTest.php @@ -114,7 +114,7 @@ ]); $response = $this->actingAs($this->user)->getJson( - '/tools/query-remote-file?link=' . urlencode( + '/tools/query-remote-file?link='.urlencode( 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso', ), ); diff --git a/tests/Feature/Controllers/Admin/Nodes/NodeControllerTest.php b/tests/Feature/Controllers/Admin/Nodes/NodeControllerTest.php index 0a686c1c3d4..d9acd1de9bd 100644 --- a/tests/Feature/Controllers/Admin/Nodes/NodeControllerTest.php +++ b/tests/Feature/Controllers/Admin/Nodes/NodeControllerTest.php @@ -1,6 +1,5 @@ actingAs($user)->postJson( "/api/client/servers/{$server->uuid}/backups", [ - 'name' => 'Test Backup', - 'mode' => 'snapshot', - 'compression_type' => 'none', - 'is_locked' => false, - ], + 'name' => 'Test Backup', + 'mode' => 'snapshot', + 'compression_type' => 'none', + 'is_locked' => false, + ], ); - if ($useSecondUser && !$secondUserIsAdmin) { + if ($useSecondUser && ! $secondUserIsAdmin) { $response->assertNotFound(); return; @@ -81,7 +81,7 @@ function testRestoreBackups( "/api/client/servers/{$server->uuid}/backups/{$backup->uuid}/restore", ); - if ($useSecondUser && !$secondUserIsAdmin) { + if ($useSecondUser && ! $secondUserIsAdmin) { $response->assertNotFound(); return; @@ -110,19 +110,17 @@ function testDeleteBackups( ]); } - $backup = Backup::factory()->create([ 'is_successful' => true, 'is_locked' => false, 'server_id' => $server->id, ]); - $response = $this->actingAs($user)->deleteJson( "/api/client/servers/{$server->uuid}/backups/{$backup->uuid}", ); - if ($useSecondUser && !$secondUserIsAdmin) { + if ($useSecondUser && ! $secondUserIsAdmin) { $response->assertNotFound(); return; diff --git a/tests/Feature/Controllers/Client/Servers/ServerControllerTest.php b/tests/Feature/Controllers/Client/Servers/ServerControllerTest.php index 7501877b51e..307045a48cc 100644 --- a/tests/Feature/Controllers/Client/Servers/ServerControllerTest.php +++ b/tests/Feature/Controllers/Client/Servers/ServerControllerTest.php @@ -26,8 +26,8 @@ $response = $this->actingAs($user)->postJson( "/api/client/servers/{$server->uuid}/create-console-session", [ - 'type' => 'novnc', - ], + 'type' => 'novnc', + ], ); $response->assertOk(); diff --git a/tests/Feature/Controllers/Client/Servers/SettingsControllerTest.php b/tests/Feature/Controllers/Client/Servers/SettingsControllerTest.php index 3296044717c..41eef3b519d 100644 --- a/tests/Feature/Controllers/Client/Servers/SettingsControllerTest.php +++ b/tests/Feature/Controllers/Client/Servers/SettingsControllerTest.php @@ -13,9 +13,9 @@ $response = $this->actingAs($user)->postJson( "/api/client/servers/{$server->uuid}/settings/rename", [ - 'name' => 'advinservers is king', - 'hostname' => 'advinservers.com', - ], + 'name' => 'advinservers is king', + 'hostname' => 'advinservers.com', + ], ); $response->assertOk() @@ -39,11 +39,11 @@ $response = $this->actingAs($user)->putJson( "/api/client/servers/{$server->uuid}/settings/network", [ - 'nameservers' => [ - '1.1.1.1', - '1.0.0.1', + 'nameservers' => [ + '1.1.1.1', + '1.0.0.1', + ], ], - ], ); $response->assertOk(); @@ -85,9 +85,9 @@ $response = $this->actingAs($user)->putJson( "/api/client/servers/{$server->uuid}/settings/auth", [ - 'type' => 'password', - 'password' => 'Advinservers is king!123', - ], + 'type' => 'password', + 'password' => 'Advinservers is king!123', + ], ); $response->assertNoContent(); diff --git a/tests/TestCase.php b/tests/TestCase.php index 2932d4a69d6..fe1ffc2ff1a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -6,5 +6,5 @@ abstract class TestCase extends BaseTestCase { - use CreatesApplication; + // } diff --git a/tests/Unit/Services/Nodes/ServerRateLimitsSyncServiceTest.php b/tests/Unit/Services/Nodes/ServerRateLimitsSyncServiceTest.php index 1859c644a21..e2699fc0c05 100644 --- a/tests/Unit/Services/Nodes/ServerRateLimitsSyncServiceTest.php +++ b/tests/Unit/Services/Nodes/ServerRateLimitsSyncServiceTest.php @@ -23,7 +23,7 @@ ), 200, ) - ->push(['data' => 'dummy-upid'], 200) + ->push(['data' => 'dummy-upid'], 200), ]); diff --git a/tests/Unit/Services/Nodes/ServerUsagesSyncServiceTest.php b/tests/Unit/Services/Nodes/ServerUsagesSyncServiceTest.php index f9360b9d261..457963fa0c1 100644 --- a/tests/Unit/Services/Nodes/ServerUsagesSyncServiceTest.php +++ b/tests/Unit/Services/Nodes/ServerUsagesSyncServiceTest.php @@ -1,7 +1,7 @@