From 84f9b86b9d959f5e68e8c38c0d69b1b92e1e246a Mon Sep 17 00:00:00 2001 From: Md Azizul Hakim Date: Sun, 13 Apr 2025 16:42:12 +0600 Subject: [PATCH 1/2] laravel version bump. pint integration, added mapper --- .husky/pre-commit | 2 +- app/Console/Commands/GenerateCrudStarter.php | 6 +- app/Console/Commands/MakeDTOCommand.php | 152 +- app/Console/Commands/MakeMapperCommand.php | 117 ++ app/Console/Commands/MakeRouteFileCommand.php | 40 +- app/Console/Commands/MakeServiceCommand.php | 177 +- app/Console/Commands/PintCommand.php | 30 + app/Console/Commands/RunPhpCsFixer.php | 12 +- app/Console/Commands/XSecureSetup.php | 6 +- app/Console/Commands/stubs/mappers.stub | 20 + app/Console/Kernel.php | 10 +- app/Enums/UserRoleID.php | 3 +- app/Exceptions/Auth/LoginErrorException.php | 8 +- .../BasicValidationErrorException.php | 8 +- app/Exceptions/Handler.php | 4 +- app/Helpers/Helper.php | 127 +- app/Helpers/RoleHelper.php | 5 +- .../Api/V1/Auth/AuthController.php | 4 +- .../Api/V1/Auth/PermissionController.php | 32 +- .../Api/V1/Auth/RoleController.php | 34 +- .../Api/V1/User/UserController.php | 49 +- app/Http/Controllers/Controller.php | 60 +- .../Controllers/Health/HealthController.php | 19 +- app/Http/Kernel.php | 2 +- app/Http/Mappers/AbstractBulkMapper.php | 61 + app/Http/Mappers/AbstractMapper.php | 35 + app/Http/Mappers/UserMapper.php | 48 + app/Http/Middleware/Authenticate.php | 4 +- app/Http/Middleware/LanguageMiddleware.php | 3 +- app/Http/Middleware/XSecurityMiddleware.php | 18 +- app/Http/Requests/Auth/LoginRequest.php | 20 +- app/Http/Requests/Auth/LogoutRequest.php | 6 +- .../Requests/Auth/PermissionInsertRequest.php | 6 +- .../Requests/Auth/RoleInsertUpdateRequest.php | 11 +- .../Auth/RolePermissionAssignRequest.php | 6 +- .../User/AdminAssignUserRoleRequest.php | 10 +- .../User/AdminUserPasswordUpdateRequest.php | 6 +- .../Requests/User/UserInsertUpdateRequest.php | 25 +- .../User/UserPasswordUpdateRequest.php | 4 +- .../User/UserProfileUpdateRequest.php | 18 +- .../Resources/Auth/PermissionResource.php | 6 +- app/Http/Resources/Auth/RoleResource.php | 8 +- app/Http/Resources/Auth/UserResource.php | 3 +- app/Http/Services/Auth/AuthService.php | 171 +- .../Services/Auth/RolePermissionService.php | 42 +- app/Http/Services/Health/AppHealthService.php | 76 +- app/Http/Services/Misc/OtpService.php | 37 +- app/Http/Services/Misc/SmsService.php | 14 +- app/Http/Services/User/UserService.php | 41 +- app/Jobs/SendSmsJob.php | 9 +- app/Models/User.php | 2 +- app/Policies/PermissionPolicy.php | 28 +- app/Policies/RolePolicy.php | 28 +- app/Policies/UserPolicy.php | 42 +- app/Providers/AppServiceProvider.php | 8 +- app/Providers/AuthServiceProvider.php | 4 +- app/Providers/BroadcastServiceProvider.php | 4 +- app/Providers/EventServiceProvider.php | 8 +- app/Providers/RouteServiceProvider.php | 4 +- app/Providers/TelescopeServiceProvider.php | 8 +- app/Traits/RateLimitterTrait.php | 4 +- composer.lock | 1417 +++++++++-------- config/app.php | 6 +- config/auth.php | 2 +- config/broadcasting.php | 2 +- config/cache.php | 2 +- config/constants.php | 2 +- config/database.php | 2 +- config/envs.php | 4 +- config/filesystems.php | 4 +- config/logging.php | 2 +- config/session.php | 2 +- database/factories/UserFactory.php | 4 +- .../2014_10_12_000000_create_users_table.php | 11 +- ...000_create_password_reset_tokens_table.php | 11 +- ...12_100000_create_password_resets_table.php | 3 +- ..._100000_create_telescope_entries_table.php | 23 +- ..._08_19_000000_create_failed_jobs_table.php | 11 +- ...01_create_personal_access_tokens_table.php | 11 +- .../2023_10_01_052437_create_jobs_table.php | 11 +- ..._11_06_113844_create_permission_tables.php | 11 +- database/seeders/DatabaseSeeder.php | 4 +- database/seeders/PermissionSeeder.php | 5 +- database/seeders/RoleSeeder.php | 15 +- database/seeders/UserSeeder.php | 27 +- ...aravel-api-starter.postman_collection.json | 78 +- lang/bn/auth.php | 2 +- lang/bn/http-statuses.php | 154 +- lang/bn/messages.php | 16 +- lang/bn/pagination.php | 2 +- lang/bn/passwords.php | 8 +- lang/bn/validation.php | 378 ++--- lang/en/auth.php | 2 +- lang/en/http-statuses.php | 154 +- lang/en/messages.php | 16 +- lang/en/pagination.php | 2 +- lang/en/passwords.php | 8 +- lang/en/validation.php | 378 ++--- pint.json | 90 ++ public/index.php | 6 +- routes/api.php | 15 +- routes/api/v1/{Auth => }/LoginRoutes.php | 0 .../RolePermission/RolePermissionRoutes.php | 20 - routes/api/v1/RolePermissionRoutes.php | 19 + routes/api/v1/{User => }/UserRoutes.php | 13 +- tests/CreatesApplication.php | 6 +- tests/Feature/LoginFeatureTest.php | 20 +- tests/Feature/ProfileFeatureTest.php | 10 +- tests/Feature/UserFeatureTest.php | 96 +- tests/Pest.php | 7 + tests/Unit/LoginUnitTest.php | 3 - tests/Unit/ProfileUnitTest.php | 4 - tests/Unit/UserUnitTest.php | 7 +- 113 files changed, 2611 insertions(+), 2250 deletions(-) create mode 100644 app/Console/Commands/MakeMapperCommand.php create mode 100644 app/Console/Commands/PintCommand.php create mode 100644 app/Console/Commands/stubs/mappers.stub create mode 100644 app/Http/Mappers/AbstractBulkMapper.php create mode 100644 app/Http/Mappers/AbstractMapper.php create mode 100644 app/Http/Mappers/UserMapper.php rename ims-api-starter.postman_collection.json => ims-laravel-api-starter.postman_collection.json (96%) create mode 100644 pint.json rename routes/api/v1/{Auth => }/LoginRoutes.php (100%) delete mode 100644 routes/api/v1/RolePermission/RolePermissionRoutes.php create mode 100644 routes/api/v1/RolePermissionRoutes.php rename routes/api/v1/{User => }/UserRoutes.php (53%) diff --git a/.husky/pre-commit b/.husky/pre-commit index 073d227..9320690 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -php artisan csfixer:run +php artisan pint diff --git a/app/Console/Commands/GenerateCrudStarter.php b/app/Console/Commands/GenerateCrudStarter.php index 6f4db54..9c95dc2 100644 --- a/app/Console/Commands/GenerateCrudStarter.php +++ b/app/Console/Commands/GenerateCrudStarter.php @@ -31,8 +31,8 @@ public function handle() [ 'name' => "Api/V1/{$name}/{$name}Controller", '--api' => true, - '--model' => $name - ] + '--model' => $name, + ], ], 'request' => ['make:request', ['name' => "{$name}/{$name}InsertUpdateRequest"]], 'resource' => ['make:resource', ['name' => "{$name}/{$name}Resource"]], @@ -66,9 +66,11 @@ private function callArtisanCommand($taskName, $command, $arguments) try { $exitCode = Artisan::call($command, $arguments); $this->line(Artisan::output()); + return $exitCode !== 0; } catch (\Exception $e) { $this->error("Error creating {$taskName}: {$e->getMessage()}"); + return true; } } diff --git a/app/Console/Commands/MakeDTOCommand.php b/app/Console/Commands/MakeDTOCommand.php index a1c5a8c..baa3658 100644 --- a/app/Console/Commands/MakeDTOCommand.php +++ b/app/Console/Commands/MakeDTOCommand.php @@ -19,6 +19,7 @@ class MakeDTOCommand extends Command /** * Name and signiture of Command. * name + * * @var string */ protected $name = 'make:dto'; @@ -26,106 +27,120 @@ class MakeDTOCommand extends Command /** * command description. * description + * * @var string */ protected $description = 'create a new DTO'; /** - * Get Command argumant EX : HasAuth - * getArguments + * __construct * - * @return array + * @return void */ - protected function getArguments() + public function __construct() { - return [ - ['dto', InputArgument::REQUIRED, 'The name of the DTO'], - ]; + parent::__construct(); } - /** - * __construct - * - * @return void + * getClassNamespace */ - public function __construct() + public function getDefaultNamespace(): string { - parent::__construct(); + return 'App\\Http\\DTOs'; } /** - * getDTOName + * Return a vaid class name + * getClass * * @return string */ - private function getDTOName() + public function getClass() { - $dto = Str::studly($this->argument('dto')); - return $dto; + return class_basename($this->argument($this->argumentName)); } /** - * getDestinationFilePath + * Generate class namespace dinamacally + * getClassNamespace * * @return string */ - protected function getDestinationFilePath() + public function getClassNamespace() { - return app_path() . "/Http/DTOs" . '/' . $this->getDTOName() . '.php'; + $extra = str_replace($this->getClass(), '', $this->argument($this->argumentName)); + + $extra = str_replace('/', '\\', $extra); + + $namespace = $this->getDefaultNamespace(); + + $namespace .= '\\' . $extra; + + $namespace = str_replace('/', '\\', $namespace); + + return trim($namespace, '\\'); } /** - * getDTONameWithoutNamespace - * - * @return string + * Create view directory if not exists. */ - private function getDTONameWithoutNamespace() + public function createDir($path) { - return class_basename($this->getDTOName()); + $dir = dirname($path); + + if (! file_exists($dir)) { + mkdir($dir, 0777, true); + } } /** - * getClassNamespace + * Execute the console command. * - * @return string + * @return int */ - public function getDefaultNamespace(): string + public function handle() { - return "App\\Http\\DTOs"; + $path = str_replace('\\', '/', $this->getDestinationFilePath()); + + $fileContents = $this->getTemplateContents(); + + $this->createDir($path); + + if (File::exists($path)) { + $this->error("File {$path} already exists!"); + + return 1; + } + + File::put($path, $fileContents); + $this->info("DTO generated successfully! path : {$path}"); + + return 0; + } /** - * Return a vaid class name - * getClass + * Get Command argumant EX : HasAuth + * getArguments * - * @return string + * @return array */ - public function getClass() + protected function getArguments() { - return class_basename($this->argument($this->argumentName)); + return [ + ['dto', InputArgument::REQUIRED, 'The name of the DTO'], + ]; } - /** - * Generate class namespace dinamacally - * getClassNamespace + * getDestinationFilePath * * @return string */ - public function getClassNamespace() + protected function getDestinationFilePath() { - $extra = str_replace($this->getClass(), '', $this->argument($this->argumentName)); - - $extra = str_replace('/', '\\', $extra); - - $namespace = $this->getDefaultNamespace(); - - $namespace .= '\\' . $extra; - - $namespace = str_replace('/', '\\', $namespace); - - return trim($namespace, '\\'); + return app_path() . '/Http/DTOs' . '/' . $this->getDTOName() . '.php'; } /** @@ -136,6 +151,7 @@ public function getClassNamespace() protected function getStubFilePath() { $stub = '/stubs/dto.stub'; + return $stub; } @@ -149,8 +165,8 @@ protected function getTemplateContents() $fileTemplate = file_get_contents(__DIR__ . $this->getStubFilePath()); $replaceOptions = [ - 'CLASS_NAMESPACE' => $this->getClassNamespace(), - 'CLASS' => $this->getDTONameWithoutNamespace() + 'CLASS_NAMESPACE' => $this->getClassNamespace(), + 'CLASS' => $this->getDTONameWithoutNamespace(), ]; foreach ($replaceOptions as $search => $replace) { @@ -161,40 +177,24 @@ protected function getTemplateContents() } /** - * Create view directory if not exists. + * getDTOName * - * @param $path + * @return string */ - public function createDir($path) + private function getDTOName() { - $dir = dirname($path); + $dto = Str::studly($this->argument('dto')); - if (!file_exists($dir)) { - mkdir($dir, 0777, true); - } + return $dto; } /** - * Execute the console command. + * getDTONameWithoutNamespace * - * @return int + * @return string */ - public function handle() + private function getDTONameWithoutNamespace() { - $path = str_replace('\\', '/', $this->getDestinationFilePath()); - - $fileContents = $this->getTemplateContents(); - - $this->createDir($path); - - if (File::exists($path)) { - $this->error("File {$path} already exists!"); - return 1; - } - - File::put($path, $fileContents); - $this->info("DTO generated successfully! path : {$path}"); - return 0; - + return class_basename($this->getDTOName()); } } diff --git a/app/Console/Commands/MakeMapperCommand.php b/app/Console/Commands/MakeMapperCommand.php new file mode 100644 index 0000000..de300c9 --- /dev/null +++ b/app/Console/Commands/MakeMapperCommand.php @@ -0,0 +1,117 @@ +argument($this->argumentName)); + } + + public function getClassNamespace(): string + { + $extra = str_replace($this->getClass(), '', $this->argument($this->argumentName)); + $extra = str_replace('/', '\\', $extra); + $namespace = $this->getDefaultNamespace() . '\\' . $extra; + + return trim(str_replace('/', '\\', $namespace), '\\'); + } + + public function handle() + { + $path = str_replace('\\', '/', $this->getDestinationFilePath()); + $fileContents = $this->getTemplateContents(); + + $this->createDir($path); + + if (File::exists($path)) { + $this->error("File {$path} already exists!"); + + return 1; + } + + File::put($path, $fileContents); + $this->info("Mapper generated successfully! path : {$path}"); + + return 0; + } + + protected function getArguments(): array + { + return [ + [$this->argumentName, InputArgument::REQUIRED, 'The name of the mapper class.'], + ]; + } + + protected function getDestinationFilePath(): string + { + return app_path() . '/Http/Mappers/' . $this->getMapperName() . '.php'; + } + + protected function getStubFilePath(): string + { + return '/stubs/mappers.stub'; + } + + protected function getTemplateContents(): string + { + $template = file_get_contents(__DIR__ . $this->getStubFilePath()); + + $replaceOptions = [ + 'CLASS_NAMESPACE' => $this->getClassNamespace(), + 'CLASS' => $this->getMapperNameWithoutNamespace(), + ]; + + foreach ($replaceOptions as $search => $replace) { + $template = str_replace('$' . strtoupper($search) . '$', $replace, $template); + } + + return $template; + } + + protected function getMapperName(): string + { + $mapper = Str::studly($this->argument($this->argumentName)); + + if (! Str::endsWith(strtolower($mapper), 'mapper')) { + $mapper .= 'Mapper'; + } + + return $mapper; + } + + protected function getMapperNameWithoutNamespace(): string + { + return class_basename($this->getMapperName()); + } + + protected function createDir(string $path) + { + $dir = dirname($path); + if (! file_exists($dir)) { + mkdir($dir, 0777, true); + } + } +} diff --git a/app/Console/Commands/MakeRouteFileCommand.php b/app/Console/Commands/MakeRouteFileCommand.php index 51c5027..114a48c 100644 --- a/app/Console/Commands/MakeRouteFileCommand.php +++ b/app/Console/Commands/MakeRouteFileCommand.php @@ -18,36 +18,16 @@ public function __construct() /** * Create view directory if not exists. - * - * @param $path */ public function createDir($path) { $dir = dirname($path); - if (!file_exists($dir)) { + if (! file_exists($dir)) { mkdir($dir, 0777, true); } } - - /** - * getStubFilePath - * - * @return string - */ - protected function getStubFilePath() - { - $stub = '/stubs/routes.stub'; - return $stub; - } - - protected function getStub() - { - return file_get_contents(__DIR__ . $this->getStubFilePath()); - - } - public function handle() { $name = Str::studly($this->argument('name')); @@ -61,6 +41,7 @@ public function handle() if (File::exists($path)) { $this->error("File {$path} already exists!"); + return 1; } @@ -78,4 +59,21 @@ public function handle() return 0; } + /** + * getStubFilePath + * + * @return string + */ + protected function getStubFilePath() + { + $stub = '/stubs/routes.stub'; + + return $stub; + } + + protected function getStub() + { + return file_get_contents(__DIR__ . $this->getStubFilePath()); + + } } diff --git a/app/Console/Commands/MakeServiceCommand.php b/app/Console/Commands/MakeServiceCommand.php index 8194c35..19f1e99 100644 --- a/app/Console/Commands/MakeServiceCommand.php +++ b/app/Console/Commands/MakeServiceCommand.php @@ -16,38 +16,22 @@ class MakeServiceCommand extends Command */ public $argumentName = 'service'; - /** * Name and signiture of Command. * name + * * @var string */ protected $name = 'make:service'; - /** * command description. * description + * * @var string */ protected $description = 'create a new service class'; - - - /** - * Get command agrumants - EX : UserService - * getArguments - * - * @return array - */ - protected function getArguments() - { - return [ - ['service', InputArgument::REQUIRED, 'The name of the service class.'], - ]; - } - - /** * __construct * @@ -58,71 +42,27 @@ public function __construct() parent::__construct(); } - - /** - * Return Service name as convention - * getServiceName - * - * @return string - */ - private function getServiceName() - { - $service = Str::studly($this->argument('service')); - - if (Str::contains(strtolower($service), 'service') === false) { - $service .= 'Service'; - } - - return $service; - } - - /** - * Return destination path for class file publish - * getDestinationFilePath - * - * @return string - */ - protected function getDestinationFilePath() - { - return app_path() . "/Http/Services" . '/' . $this->getServiceName() . '.php'; - } - - - /** - * Return only service class name - * getServiceNameWithoutNamespace - * - * @return string - */ - private function getServiceNameWithoutNamespace() - { - return class_basename($this->getServiceName()); - } - /** * Set Default Namespace * Override CommandGenerator class method * getDefaultNamespace - * - * @return string */ public function getDefaultNamespace(): string { - return "App\\Http\\Services"; + return 'App\\Http\\Services'; } /** - * Return a vaid class name - * getClass - * + * Return a vaid class name + * getClass + * * @return string - */ + */ public function getClass() { return class_basename($this->argument($this->argumentName)); } - /** * Generate class namespace dinamacally * getClassNamespace @@ -135,7 +75,7 @@ public function getClassNamespace() $extra = str_replace('/', '\\', $extra); - $namespace = $this->getDefaultNamespace(); + $namespace = $this->getDefaultNamespace(); $namespace .= '\\' . $extra; @@ -144,6 +84,66 @@ public function getClassNamespace() return trim($namespace, '\\'); } + /** + * Create view directory if not exists. + */ + public function createDir($path) + { + $dir = dirname($path); + + if (! file_exists($dir)) { + mkdir($dir, 0777, true); + } + } + + /** + * Execute the console command. + * + * @return int + */ + public function handle() + { + $path = str_replace('\\', '/', $this->getDestinationFilePath()); + + $fileContents = $this->getTemplateContents(); + + $this->createDir($path); + + if (File::exists($path)) { + $this->error("File {$path} already exists!"); + + return 1; + } + + File::put($path, $fileContents); + $this->info("Service generated successfully! path : {$path}"); + + return 0; + } + + /** + * Get command agrumants - EX : UserService + * getArguments + * + * @return array + */ + protected function getArguments() + { + return [ + ['service', InputArgument::REQUIRED, 'The name of the service class.'], + ]; + } + + /** + * Return destination path for class file publish + * getDestinationFilePath + * + * @return string + */ + protected function getDestinationFilePath() + { + return app_path() . '/Http/Services' . '/' . $this->getServiceName() . '.php'; + } /** * Return stub file path @@ -168,8 +168,8 @@ protected function getTemplateContents() $fileTemplate = file_get_contents(__DIR__ . $this->getStubFilePath()); $replaceOptions = [ - 'CLASS_NAMESPACE' => $this->getClassNamespace(), - 'CLASS' => $this->getServiceNameWithoutNamespace() + 'CLASS_NAMESPACE' => $this->getClassNamespace(), + 'CLASS' => $this->getServiceNameWithoutNamespace(), ]; foreach ($replaceOptions as $search => $replace) { @@ -180,39 +180,30 @@ protected function getTemplateContents() } /** - * Create view directory if not exists. + * Return Service name as convention + * getServiceName * - * @param $path + * @return string */ - public function createDir($path) + private function getServiceName() { - $dir = dirname($path); + $service = Str::studly($this->argument('service')); - if (!file_exists($dir)) { - mkdir($dir, 0777, true); + if (Str::contains(strtolower($service), 'service') === false) { + $service .= 'Service'; } + + return $service; } /** - * Execute the console command. + * Return only service class name + * getServiceNameWithoutNamespace * - * @return int + * @return string */ - public function handle() + private function getServiceNameWithoutNamespace() { - $path = str_replace('\\', '/', $this->getDestinationFilePath()); - - $fileContents = $this->getTemplateContents(); - - $this->createDir($path); - - if (File::exists($path)) { - $this->error("File {$path} already exists!"); - return 1; - } - - File::put($path, $fileContents); - $this->info("Service generated successfully! path : {$path}"); - return 0; + return class_basename($this->getServiceName()); } } diff --git a/app/Console/Commands/PintCommand.php b/app/Console/Commands/PintCommand.php new file mode 100644 index 0000000..84d8fee --- /dev/null +++ b/app/Console/Commands/PintCommand.php @@ -0,0 +1,30 @@ +option('test')) { + $command[] = '--test'; + } + + $process = new Process($command); + $process->setTimeout(null); + $process->run(function ($type, $buffer) { + echo $buffer; + }); + + return $process->isSuccessful() ? 0 : 1; + } +} diff --git a/app/Console/Commands/RunPhpCsFixer.php b/app/Console/Commands/RunPhpCsFixer.php index 80ffe2a..9b6c848 100644 --- a/app/Console/Commands/RunPhpCsFixer.php +++ b/app/Console/Commands/RunPhpCsFixer.php @@ -31,9 +31,7 @@ public function __construct() parent::__construct(); } - /** - * Execute the console command. - */ + /** Execute the console command. */ public function handle() { // @@ -54,10 +52,10 @@ public function handle() if ($process->isSuccessful()) { $this->info('PHP CS Fixer has run successfully.'); exit(0); - } else { - $this->error('An error occurred while running PHP CS Fixer.'); - $this->line($process->getErrorOutput()); - exit(1); } + $this->error('An error occurred while running PHP CS Fixer.'); + $this->line($process->getErrorOutput()); + exit(1); + } } diff --git a/app/Console/Commands/XSecureSetup.php b/app/Console/Commands/XSecureSetup.php index 94a713e..0aef411 100644 --- a/app/Console/Commands/XSecureSetup.php +++ b/app/Console/Commands/XSecureSetup.php @@ -54,9 +54,9 @@ public function handle() $this->info('Generated secret: ' . $secret); $this->info('XSECURITY_SECRET key have been updated in the .env file.'); exit(0); - } else { - $this->error('Failed to update .env file.'); - exit(1); } + $this->error('Failed to update .env file.'); + exit(1); + } } diff --git a/app/Console/Commands/stubs/mappers.stub b/app/Console/Commands/stubs/mappers.stub new file mode 100644 index 0000000..33ca0e8 --- /dev/null +++ b/app/Console/Commands/stubs/mappers.stub @@ -0,0 +1,20 @@ + + */ +class $CLASS$ extends AbstractMapper +{ + public static function toModel($dto, Model $model, array $extra = []): Model + { + // Implement mapping logic here + + self::fillAuditFields($model, ! $model->exists); + + return $model; + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 592f827..43d3940 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -7,9 +7,7 @@ class Kernel extends ConsoleKernel { - /** - * Define the application's command schedule. - */ + /** Define the application's command schedule. */ protected function schedule(Schedule $schedule): void { // $schedule->command('inspire')->hourly(); @@ -18,12 +16,10 @@ protected function schedule(Schedule $schedule): void $schedule->command('backup:run')->daily()->at('01:30'); } - /** - * Register the commands for the application. - */ + /** Register the commands for the application. */ protected function commands(): void { - $this->load(__DIR__.'/Commands'); + $this->load(__DIR__ . '/Commands'); require base_path('routes/console.php'); } diff --git a/app/Enums/UserRoleID.php b/app/Enums/UserRoleID.php index be6e7c9..798807d 100644 --- a/app/Enums/UserRoleID.php +++ b/app/Enums/UserRoleID.php @@ -2,9 +2,8 @@ namespace App\Enums; -enum UserRoleID : int +enum UserRoleID: int { - case SUPER_ADMIN_ID = 1; case ADMIN_ID = 2; case USER_ID = 3; diff --git a/app/Exceptions/Auth/LoginErrorException.php b/app/Exceptions/Auth/LoginErrorException.php index 9a91429..a667791 100644 --- a/app/Exceptions/Auth/LoginErrorException.php +++ b/app/Exceptions/Auth/LoginErrorException.php @@ -22,7 +22,6 @@ public function __construct( $this->errorMessage = $errorMessage; } - /** * Report or log an exception. * @@ -43,11 +42,12 @@ public function render($request) { $data = [ - 'success' => false, - 'errorCode' => $this->errorCode, - 'message' => $this->errorMessage, + 'success' => false, + 'errorCode' => $this->errorCode, + 'message' => $this->errorMessage, ]; + return new JsonResponse($data, $this->responseCode); } } diff --git a/app/Exceptions/BasicValidationErrorException.php b/app/Exceptions/BasicValidationErrorException.php index 4e1ceb6..37e387b 100644 --- a/app/Exceptions/BasicValidationErrorException.php +++ b/app/Exceptions/BasicValidationErrorException.php @@ -22,7 +22,6 @@ public function __construct( $this->errorMessage = $errorMessage; } - /** * Report or log an exception. * @@ -44,10 +43,11 @@ public function render($request) { $data = [ - 'success' => false, - 'errorCode' => $this->errorCode, - 'message' => $this->errorMessage, + 'success' => false, + 'errorCode' => $this->errorCode, + 'message' => $this->errorMessage, ]; + return new JsonResponse($data, $this->responseCode); } } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 56af264..83dff22 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -18,9 +18,7 @@ class Handler extends ExceptionHandler 'password_confirmation', ]; - /** - * Register the exception handling callbacks for the application. - */ + /** Register the exception handling callbacks for the application. */ public function register(): void { $this->reportable(function (Throwable $e) { diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 2f222ea..562ac35 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -2,10 +2,15 @@ namespace App\Helpers; -use \Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Collection; +use InvalidArgumentException; class Helper { + private const DECIMAL_PLACES = 2; + private const DECIMAL_TOLERANCE = 0.01; + /** * Fill a model property with a given value if the value is not null. * @@ -13,49 +18,133 @@ class Helper * @param string $property The property to fill. * @param mixed $value The value to fill the property with. * - * @return void + * @throws InvalidArgumentException If property doesn't exist on model */ - public static function fillModelIfNotNull(Model $model, string $property, mixed $value) + public static function fillModelIfNotNull(Model $model, string $property, mixed $value): void { if ($value !== null) { + if (! property_exists($model, $property) && ! method_exists($model, $property)) { + throw new InvalidArgumentException("Property {$property} does not exist on model " . get_class($model)); + } $model->$property = $value; } } /** - * Add leading zeros to a number, if necessary + * Add leading zeros to a number. + * + * @param int $value The number to add leading zeros + * @param int $threshold Number of total digits desired * - * @param int $value The number to add leading zeros - * @param int $threshold Threshold for adding leading zeros (number of digits - * that will prevent the adding of additional zeros) - * @return string + * @throws InvalidArgumentException If threshold is less than 1 */ - public static function addLeadingZero(int $value, int $threshold = 2) + public static function addLeadingZero(int $value, int $threshold = 2): string { - return sprintf('%0' . $threshold . 's', $value); + if ($threshold < 1) { + throw new InvalidArgumentException('Threshold must be greater than 0'); + } + + return str_pad((string) $value, $threshold, '0', STR_PAD_LEFT); } /** * Convert an array of arrays to an array of objects. * - * @param array $arrayOfArrays The array of arrays to convert + * @param array $arrayOfArrays The array of arrays to convert + * + * @throws InvalidArgumentException If input is not array of arrays + * * @return array The array of objects */ public static function arraysToObjects(array $arrayOfArrays): array { - return array_map(function ($item) { - return (object) $item; - }, $arrayOfArrays); + foreach ($arrayOfArrays as $item) { + if (! is_array($item)) { + throw new InvalidArgumentException('Input must be an array of arrays'); + } + } + + return array_map(fn ($item) => (object) $item, $arrayOfArrays); } /** - * Convert an array of objects to a plain array. - * - * @param array $objects - * @return array - */ + * Convert an array of objects to a plain array. + * + * @param array $objects Array of objects with toArray method + * + * @throws InvalidArgumentException If any object doesn't have toArray method + */ public static function objectsToArray(array $objects): array { + foreach ($objects as $object) { + if (! method_exists($object, 'toArray')) { + throw new InvalidArgumentException('All objects must implement toArray method'); + } + } + return array_map(fn ($object) => $object->toArray(), $objects); } + + /** Convert any array or collection to collection of objects. */ + public static function toObjectCollection(array|Collection $items): Collection + { + $items = is_array($items) ? collect($items) : $items; + + return $items->map(fn ($item) => is_array($item) ? (object) $item : $item); + } + + /** Safely get a value from an array or object using dot notation. */ + public static function getValue(array|object $data, string $key, mixed $default = null): mixed + { + if (is_object($data)) { + $data = (array) $data; + } + + foreach (explode('.', $key) as $segment) { + if (! is_array($data) || ! array_key_exists($segment, $data)) { + return $default; + } + $data = $data[$segment]; + } + + return $data; + } + + /** Check if all required keys exist in an array or object. */ + public static function hasRequiredKeys(array|object $data, array $required): bool + { + if (is_object($data)) { + $data = (array) $data; + } + + foreach ($required as $key) { + if (! array_key_exists($key, $data) || $data[$key] === null) { + return false; + } + } + + return true; + } + + /** + * Formats a float number to 2 decimal places + * + * @param float $number the floating number + * @param int $decimalPlace the decimal places after floating number + */ + public static function formatDecimal(float $number, int $decimalPlace = self::DECIMAL_PLACES): float + { + return round($number, $decimalPlace); + } + + /** + * Compares two float values with precision + * + * @param float $a first float + * @param float $b second float + */ + public static function isFloatEqual(float $a, float $b): bool + { + return abs($a - $b) < self::DECIMAL_TOLERANCE; // Tolerance of 0.01 for 2 decimal places + } } diff --git a/app/Helpers/RoleHelper.php b/app/Helpers/RoleHelper.php index c3ebd39..d09a024 100644 --- a/app/Helpers/RoleHelper.php +++ b/app/Helpers/RoleHelper.php @@ -10,13 +10,12 @@ class RoleHelper /** * Returns a UserRole enum value based on the given role ID. * - * @param string $id The role ID. - * + * @param string $id The role ID. * @return UserRole The corresponding enum value for the given role ID. */ public static function getRoleNameById(string $id): UserRole { - return match ((int)$id) { + return match ((int) $id) { UserRoleID::SUPER_ADMIN_ID => UserRole::SUPER_ADMIN, UserRoleID::ADMIN_ID => UserRole::ADMIN, UserRoleID::USER_ID => UserRole::USER, diff --git a/app/Http/Controllers/Api/V1/Auth/AuthController.php b/app/Http/Controllers/Api/V1/Auth/AuthController.php index 56c0e97..d73ef55 100644 --- a/app/Http/Controllers/Api/V1/Auth/AuthController.php +++ b/app/Http/Controllers/Api/V1/Auth/AuthController.php @@ -23,11 +23,9 @@ public function __construct( ) { } - /** * log the user in after verifying the otp * - * @param LoginRequest $request * @return JsonResponse */ public function login(LoginRequest $request) @@ -44,6 +42,7 @@ public function login(LoginRequest $request) 'user' => UserResource::make($authData['user']), 'token' => $authData['token'], ]; + return $this->sendSuccessResponse( $data, __('messages.login.success'), @@ -54,6 +53,7 @@ public function login(LoginRequest $request) public function logout(LogoutRequest $request) { $this->authService->logout($request->device); + return new JsonResponse([], Response::HTTP_NO_CONTENT); } } diff --git a/app/Http/Controllers/Api/V1/Auth/PermissionController.php b/app/Http/Controllers/Api/V1/Auth/PermissionController.php index 94d5344..52bf16a 100644 --- a/app/Http/Controllers/Api/V1/Auth/PermissionController.php +++ b/app/Http/Controllers/Api/V1/Auth/PermissionController.php @@ -23,13 +23,13 @@ public function __construct( protected RolePermissionService $rolePermissionService, ) { } - /** - * Display a listing of the resource. - */ + + /** Display a listing of the resource. */ public function index() { // Gate::authorize('viewAny', Permission::class); $permissions = Permission::all(); + return $this->sendSuccessCollectionResponse( PermissionResource::collection($permissions), __('http-statuses.200'), @@ -37,23 +37,20 @@ public function index() ); } - /** - * Show the form for creating a new resource. - */ + /** Show the form for creating a new resource. */ public function create() { // } - /** - * Store a newly created resource in storage. - */ + /** Store a newly created resource in storage. */ public function store(PermissionInsertRequest $request) { Gate::authorize('create', Permission::class); $permission = new Permission(); $permission->name = $request->name; $permission->save(); + return $this->sendSuccessResponse( PermissionResource::make($permission), __('http-statuses.201'), @@ -61,38 +58,31 @@ public function store(PermissionInsertRequest $request) ); } - /** - * Display the specified resource. - */ + /** Display the specified resource. */ public function show(string $id) { // } - /** - * Show the form for editing the specified resource. - */ + /** Show the form for editing the specified resource. */ public function edit(string $id) { // } - /** - * Update the specified resource in storage. - */ + /** Update the specified resource in storage. */ public function update(Request $request, string $id) { // } - /** - * Remove the specified resource from storage. - */ + /** Remove the specified resource from storage. */ public function destroy(string $id) { $permission = Permission::findOrFail($id); Gate::authorize('delete', $permission); $this->rolePermissionService->deletePermission($permission); + return new JsonResponse([], Response::HTTP_NO_CONTENT); } } diff --git a/app/Http/Controllers/Api/V1/Auth/RoleController.php b/app/Http/Controllers/Api/V1/Auth/RoleController.php index 59868f9..445c14f 100644 --- a/app/Http/Controllers/Api/V1/Auth/RoleController.php +++ b/app/Http/Controllers/Api/V1/Auth/RoleController.php @@ -25,13 +25,12 @@ public function __construct( ) { } - /** - * Display a listing of the resource. - */ + /** Display a listing of the resource. */ public function index() { Gate::authorize('viewAny', Role::class); $roles = Role::all(); + return $this->sendSuccessCollectionResponse( RoleResource::collection($roles), __('http-statuses.200'), @@ -39,17 +38,13 @@ public function index() ); } - /** - * Show the form for creating a new resource. - */ + /** Show the form for creating a new resource. */ public function create(Request $request) { } - /** - * Store a newly created resource in storage. - */ + /** Store a newly created resource in storage. */ public function store(RoleInsertUpdateRequest $request) { Gate::authorize('create', Role::class); @@ -57,6 +52,7 @@ public function store(RoleInsertUpdateRequest $request) $request->name, $request->permissions ?? [] ); + return $this->sendSuccessResponse( RoleResource::make($role), __('http-statuses.201'), @@ -64,14 +60,13 @@ public function store(RoleInsertUpdateRequest $request) ); } - /** - * Display the specified resource. - */ + /** Display the specified resource. */ public function show(string $id) { $role = Role::findOrFail($id)->load('permissions'); Gate::authorize('view', $role); + return $this->sendSuccessResponse( RoleResource::make($role), __('http-statuses.200'), @@ -79,23 +74,20 @@ public function show(string $id) ); } - /** - * Show the form for editing the specified resource. - */ + /** Show the form for editing the specified resource. */ public function edit(string $id) { // } - /** - * Update the specified resource in storage. - */ + /** Update the specified resource in storage. */ public function update(RoleInsertUpdateRequest $request) { $role = Role::findOrFail($request->id); Gate::authorize('update', $role); $name = $request->name; $updatedRole = $this->rolePermissionService->updateRole($role, $name); + return $this->sendSuccessResponse( RoleResource::make($updatedRole), __('http-statuses.200'), @@ -103,14 +95,13 @@ public function update(RoleInsertUpdateRequest $request) ); } - /** - * Remove the specified resource from storage. - */ + /** Remove the specified resource from storage. */ public function destroy(string $id) { $role = Role::with('permissions')->findOrFail($id); Gate::authorize('delete', $role); $this->rolePermissionService->deleteRole($role); + return new JsonResponse([], Response::HTTP_NO_CONTENT); } @@ -119,6 +110,7 @@ public function assignPermission(RolePermissionAssignRequest $request) Gate::authorize('create', Role::class); $role = Role::findOrFail($request->id); $role->syncPermissions($request->permissions); + return $this->sendSuccessResponse( RoleResource::make($role->load('permissions')), __('http-statuses.200'), diff --git a/app/Http/Controllers/Api/V1/User/UserController.php b/app/Http/Controllers/Api/V1/User/UserController.php index b8eb638..40d2354 100644 --- a/app/Http/Controllers/Api/V1/User/UserController.php +++ b/app/Http/Controllers/Api/V1/User/UserController.php @@ -29,9 +29,8 @@ public function __construct( protected UserService $userService, ) { } - /** - * Display a listing of the resource. - */ + + /** Display a listing of the resource. */ public function index(Request $request) { Gate::authorize('viewAny', User::class); @@ -54,15 +53,13 @@ public function index(Request $request) return UserResource::collection($users); } - /** - * Store a newly created resource in storage. - */ + /** Store a newly created resource in storage. */ public function store(UserInsertUpdateRequest $request) { Gate::authorize('create', User::class); $roles = Role::whereIn('id', $request->roles) - ->where('id', '!=', UserRoleID::SUPER_ADMIN_ID) - ->get(); + ->where('id', '!=', UserRoleID::SUPER_ADMIN_ID) + ->get(); $data = new UserDTO( null, $request->first_name, @@ -85,13 +82,12 @@ public function store(UserInsertUpdateRequest $request) ); } - /** - * Display the specified resource. - */ + /** Display the specified resource. */ public function show(string $id) { $user = User::findOrFail($id)->load('roles'); Gate::authorize('view', $user); + return $this->sendSuccessCollectionResponse( UserResource::make($user), __('http-statuses.200'), @@ -100,9 +96,7 @@ public function show(string $id) } - /** - * Update the specified resource in storage. - */ + /** Update the specified resource in storage. */ public function update(UserInsertUpdateRequest $request) { $user = User::findOrFail($request->id); @@ -131,14 +125,13 @@ public function update(UserInsertUpdateRequest $request) ); } - /** - * Remove the specified resource from storage. - */ + /** Remove the specified resource from storage. */ public function destroy(string $id) { $user = User::findOrFail($id); Gate::authorize('delete', $user); $user->delete(); + return $this->sendSuccessResponse( [], __('messages.delete.success'), @@ -147,16 +140,14 @@ public function destroy(string $id) } - /** - * assign role to specified user - */ + /** assign role to specified user */ public function assignRole(AdminAssignUserRoleRequest $request) { $user = User::findOrFail($request->user_id)->load('roles'); Gate::authorize('assignRole', $user); $roles = Role::whereIn('id', $request->roles) - ->where('id', '!=', UserRoleID::SUPER_ADMIN_ID) - ->get(); + ->where('id', '!=', UserRoleID::SUPER_ADMIN_ID) + ->get(); $updatedUser = $this->userService->assignUserRole($user, $roles); return $this->sendSuccessCollectionResponse( @@ -166,9 +157,7 @@ public function assignRole(AdminAssignUserRoleRequest $request) ); } - /** - * Update password of specified user - */ + /** Update password of specified user */ public function changePassword(AdminUserPasswordUpdateRequest $request) { $user = User::findOrFail($request->user_id); @@ -182,9 +171,7 @@ public function changePassword(AdminUserPasswordUpdateRequest $request) ); } - /** - * Update authenticated user profile information - */ + /** Update authenticated user profile information */ public function updateProfile(UserProfileUpdateRequest $request) { $user = User::findOrFail(auth()->id())->load('roles'); @@ -203,6 +190,7 @@ public function updateProfile(UserProfileUpdateRequest $request) null ); $updatedUser = $this->userService->updateUserData($data, $user, true); + return $this->sendSuccessCollectionResponse( UserResource::make($updatedUser), __('http-statuses.200'), @@ -210,9 +198,7 @@ public function updateProfile(UserProfileUpdateRequest $request) ); } - /** - * Update authenticated user profile password - */ + /** Update authenticated user profile password */ public function changeProfilePassword(UserPasswordUpdateRequest $request) { $user = User::findOrFail(auth()->id())->load('roles'); @@ -222,6 +208,7 @@ public function changeProfilePassword(UserPasswordUpdateRequest $request) $request->password, $request->current_password ); + return $this->sendSuccessCollectionResponse( UserResource::make($updatedUser), __('http-statuses.200'), diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 413d3de..8ab2e90 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -15,10 +15,9 @@ class Controller extends BaseController /** * return response. * - * @param array | Collection | AnonymousResourceCollection | JsonResource $result - * @param string $message - * @param int $code - * + * @param array | Collection | AnonymousResourceCollection | JsonResource $result + * @param string $message + * @param int $code * @return JsonResponse */ public function sendSuccessResponse($result = [], $message = '', $code = Response::HTTP_OK) @@ -31,16 +30,16 @@ public function sendSuccessResponse($result = [], $message = '', $code = Respons if (empty($result)) { unset($response['data']); } + return new JsonResponse($response, $code); } /** * return response with collection. * - * @param Collection | AnonymousResourceCollection | JsonResource $collection - * @param string $message - * @param int $code - * + * @param Collection | AnonymousResourceCollection | JsonResource $collection + * @param string $message + * @param int $code * @return JsonResponse */ public function sendSuccessCollectionResponse($collection, $message, $code = Response::HTTP_OK) @@ -57,10 +56,8 @@ public function sendSuccessCollectionResponse($collection, $message, $code = Res /** * return error response. * - * @param $error - * @param array $errorMessages - * @param int $code - * + * @param array $errorMessages + * @param int $code * @return JsonResponse */ public function sendErrorResponse($error, $errorMessages = [], $code = Response::HTTP_INTERNAL_SERVER_ERROR) @@ -69,7 +66,7 @@ public function sendErrorResponse($error, $errorMessages = [], $code = Response: 'success' => false, 'message' => $error, ]; - if (!empty($errorMessages)) { + if (! empty($errorMessages)) { $response['errors'] = $errorMessages; } if (empty($error)) { @@ -82,11 +79,10 @@ public function sendErrorResponse($error, $errorMessages = [], $code = Response: /** * Apply search filters to a model. * - * @param string|null $searchText The text to search for. - * @param Builder $model The model to search on. - * @param string[] $searchFields The fields to search in. - * - * @return Builder The filtered model. + * @param string|null $searchText The text to search for. + * @param Builder $model The model to search on. + * @param string[] $searchFields The fields to search in. + * @return Builder The filtered model. */ public function applySearchFilters( ?string $searchText, @@ -124,6 +120,7 @@ public function applyRelationSearchFilters( if (empty($searchText)) { return $model; } + return $model->whereHas($relation, function ($query) use ($searchText, $searchFields) { $query->where(function ($query) use ($searchText, $searchFields) { foreach ($searchFields as $field) { @@ -136,18 +133,18 @@ public function applyRelationSearchFilters( /** * Apply Select filters to a model. * - * @param Builder $model The model to search on. - * @param array $selectFields The fields to search in. - * - * @return Builder The filtered model. + * @param Builder $model The model to search on. + * @param array $selectFields The fields to search in. + * @return Builder The filtered model. */ public function applySelectFilters( Builder $model, array $selectFields ): Builder { $selectFields = array_filter($selectFields, function ($value) { - return !is_null($value) && $value !== ''; + return ! is_null($value) && $value !== ''; }); + return $model->where(function (Builder $query) use ($selectFields) { foreach ($selectFields as $field => $value) { $query->where($field, '=', $value); @@ -158,11 +155,10 @@ public function applySelectFilters( /** * Apply Select filters to a model relation. * - * @param string $relation The relation to filter within. - * @param Builder $model The model to search on. - * @param array $selectFields The fields to search in. - * - * @return Builder The filtered model. + * @param string $relation The relation to filter within. + * @param Builder $model The model to search on. + * @param array $selectFields The fields to search in. + * @return Builder The filtered model. */ public function applyRelationSelectFilters( string $relation, @@ -170,8 +166,9 @@ public function applyRelationSelectFilters( array $selectFields ): Builder { $selectFields = array_filter($selectFields, function ($value) { - return !is_null($value) && $value !== ''; + return ! is_null($value) && $value !== ''; }); + return $model->whereHas($relation, function (Builder $query) use ($selectFields) { $query->where(function ($query) use ($selectFields) { foreach ($selectFields as $field => $value) { @@ -197,13 +194,14 @@ public function applyFilters( array $selectFields, Builder $model, ): Builder { - if ($searchText && !empty($searchFields)) { + if ($searchText && ! empty($searchFields)) { $model = $this->applySearchFilters($searchText, $model, $searchFields); } - if (!empty($selectFields)) { + if (! empty($selectFields)) { $model = $this->applySelectFilters($model, $selectFields); } + return $model; } } diff --git a/app/Http/Controllers/Health/HealthController.php b/app/Http/Controllers/Health/HealthController.php index 0e33c0c..750e0d2 100644 --- a/app/Http/Controllers/Health/HealthController.php +++ b/app/Http/Controllers/Health/HealthController.php @@ -10,10 +10,10 @@ class HealthController extends Controller { /** - * __construct - * - * @return void - */ + * __construct + * + * @return void + */ public function __construct( protected AppHealthService $appHealthService, ) { @@ -23,12 +23,13 @@ public function healthz(Request $request) { $data = [ - "cache" => $this->appHealthService->isCacheTestSuccessful(), - "http" => $this->appHealthService->isHttpTestSuccessful(), - "storage" => $this->appHealthService->isStorageTestSuccessful(), - "database" => $this->appHealthService->isDatabaseTestSuccessful(), - "migration" => $this->appHealthService->isMigrationTestSuccessful(), + 'cache' => $this->appHealthService->isCacheTestSuccessful(), + 'http' => $this->appHealthService->isHttpTestSuccessful(), + 'storage' => $this->appHealthService->isStorageTestSuccessful(), + 'database' => $this->appHealthService->isDatabaseTestSuccessful(), + 'migration' => $this->appHealthService->isMigrationTestSuccessful(), ]; + return response($data, Response::HTTP_OK); } } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 7482aa8..5cbdb2a 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -42,7 +42,7 @@ class Kernel extends HttpKernel 'api' => [ // \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class, - \Illuminate\Routing\Middleware\ThrottleRequests::class.':api', + \Illuminate\Routing\Middleware\ThrottleRequests::class . ':api', \Illuminate\Routing\Middleware\SubstituteBindings::class, ], ]; diff --git a/app/Http/Mappers/AbstractBulkMapper.php b/app/Http/Mappers/AbstractBulkMapper.php new file mode 100644 index 0000000..dd8ff4b --- /dev/null +++ b/app/Http/Mappers/AbstractBulkMapper.php @@ -0,0 +1,61 @@ + $dtos Collection of DTOs + * @param array $extra Additional data needed for mapping + * @return array Array ready for bulk insert + */ + abstract public static function toBulkInsertArray(Collection $dtos, array $extra = []): array; + + /** Get base fields for bulk insert including audit fields */ + protected static function getBaseFields(): array + { + return array_merge( + self::getTimestamps(), + self::getAuditFields() + ); + } + + /** Get timestamp fields for bulk insert */ + protected static function getTimestamps(): array + { + return [ + 'created_at' => now(), + 'updated_at' => now(), + ]; + } + + /** Get audit fields for bulk insert */ + protected static function getAuditFields(): array + { + return [ + 'created_by' => auth()->id(), + 'updated_by' => auth()->id(), + ]; + } + + /** + * Validate required extra parameters + * + * @throws \InvalidArgumentException + */ + protected static function validateExtra(array $extra, array $required): void + { + foreach ($required as $field) { + if (! isset($extra[$field])) { + throw new \InvalidArgumentException("$field is required"); + } + } + } +} diff --git a/app/Http/Mappers/AbstractMapper.php b/app/Http/Mappers/AbstractMapper.php new file mode 100644 index 0000000..504a119 --- /dev/null +++ b/app/Http/Mappers/AbstractMapper.php @@ -0,0 +1,35 @@ +created_by = auth()->id(); + } else { + $model->updated_by = auth()->id(); + } + } +} diff --git a/app/Http/Mappers/UserMapper.php b/app/Http/Mappers/UserMapper.php new file mode 100644 index 0000000..c47cf8d --- /dev/null +++ b/app/Http/Mappers/UserMapper.php @@ -0,0 +1,48 @@ + + */ +class UserMapper extends AbstractMapper +{ + public static function toModel($dto, Model $model, array $extra = []): Model + { + if (! $dto instanceof UserDTO || ! $model instanceof User) { + throw new \InvalidArgumentException('Invalid DTO or Model type'); + } + + $isCreate = ! $model->exists; + + $model->fill([ + 'first_name' => $dto->firstName, + 'last_name' => $dto->lastName, + 'user_name' => $dto->name, + 'name' => $dto->name, + 'email' => $dto->email, + 'phone' => $dto->phone, + 'designation' => $dto->designation, + 'address' => $dto->address, + ]); + + if ($isCreate) { + $model->email_verified_at = now(); + $model->password = Hash::make($dto->password); + } + + if (! ($extra['isProfileUpdate'] ?? false)) { + $model->is_active = $dto->isActive ? UserStatus::ACTIVE->value : UserStatus::DEACTIVE->value; + } + + self::fillAuditFields($model, $isCreate); + + return $model; + } +} diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index d4ef644..4bc448d 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -7,9 +7,7 @@ class Authenticate extends Middleware { - /** - * Get the path the user should be redirected to when they are not authenticated. - */ + /** Get the path the user should be redirected to when they are not authenticated. */ protected function redirectTo(Request $request): ?string { return $request->expectsJson() ? null : route('login'); diff --git a/app/Http/Middleware/LanguageMiddleware.php b/app/Http/Middleware/LanguageMiddleware.php index 030eb33..135f6d1 100644 --- a/app/Http/Middleware/LanguageMiddleware.php +++ b/app/Http/Middleware/LanguageMiddleware.php @@ -16,9 +16,10 @@ class LanguageMiddleware */ public function handle(Request $request, Closure $next): Response { - $locale = $request->header('Accept-Language', config('app.locale')); + $locale = explode(',', $request->header('Accept-Language'))[0] ?? config('app.locale'); app()->setLocale($locale); Carbon::setLocale($locale); + return $next($request); } } diff --git a/app/Http/Middleware/XSecurityMiddleware.php b/app/Http/Middleware/XSecurityMiddleware.php index c0c2d01..1c3c9ca 100644 --- a/app/Http/Middleware/XSecurityMiddleware.php +++ b/app/Http/Middleware/XSecurityMiddleware.php @@ -12,6 +12,7 @@ class XSecurityMiddleware use RateLimitterTrait; const MAX_ATTEMPTS = 5; const MAX_DECAY_MINUTES = 1; + /** * Handle an incoming request. * @@ -19,7 +20,7 @@ class XSecurityMiddleware */ public function handle(Request $request, Closure $next): Response { - if (!config('app.xsecure_enabled')) { + if (! config('app.xsecure_enabled')) { return $next($request); } if ($this->limiter()->tooManyAttempts( @@ -30,7 +31,7 @@ public function handle(Request $request, Closure $next): Response } // Check CSRF token validity - if (!$this->isValidXSecureToken($request->header('X-SECURITY-TOKEN') ?? '')) { + if (! $this->isValidXSecureToken($request->header('X-SECURITY-TOKEN') ?? '')) { // Increment failed attempts for the client $this->limiter()->hit($this->throttleKey($request), self::MAX_DECAY_MINUTES * 60); @@ -42,13 +43,12 @@ public function handle(Request $request, Closure $next): Response return $next($request); } + /** * Validate XSECURE token against the shared secret key. * - * @param string $token - * @return bool + * @param string $token */ - private function isValidXSecureToken(string $signedToken): bool { $sharedSecretKey = config('app.xsecure_secret'); @@ -58,20 +58,20 @@ private function isValidXSecureToken(string $signedToken): bool return false; } // Extract token and signature - list($token, $signature) = explode('.', $signedToken); + [$token, $signature] = explode('.', $signedToken); // Calculate expected signature $expectedSignature = hash_hmac('sha256', $token, $sharedSecretKey); // Verify signature - if (!hash_equals($expectedSignature, $signature)) { + if (! hash_equals($expectedSignature, $signature)) { return false; // Signature verification failed } // Parse token payload $payload = json_decode(base64_decode($token), true); // Validate token expiry - if ($payload === null || !isset($payload['expiry'])) { + if ($payload === null || ! isset($payload['expiry'])) { return false; // Invalid token format or missing expiry } + return time() < $payload['expiry']; // Check if token has expired } - } diff --git a/app/Http/Requests/Auth/LoginRequest.php b/app/Http/Requests/Auth/LoginRequest.php index 1014dd6..2c8b43d 100644 --- a/app/Http/Requests/Auth/LoginRequest.php +++ b/app/Http/Requests/Auth/LoginRequest.php @@ -6,25 +6,23 @@ class LoginRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** - * Get the validation rules that apply to the request. - * - * @return array - */ + * Get the validation rules that apply to the request. + * + * @return array + */ public function rules(): array { return [ - 'email' => 'required|exists:users,email', - 'password' => 'required|string|min:6', - 'device' => 'required|string|max:100', + 'email' => 'required|exists:users,email', + 'password' => 'required|string|min:6', + 'device' => 'required|string|max:100', ]; } @@ -38,7 +36,7 @@ public function messages() return [ 'phone.exists' => __('messages.phone.exists'), 'password.required' => __('messages.password.required'), - 'password.size' => __('messages.password.size'), + 'password.size' => __('messages.password.size'), ]; } } diff --git a/app/Http/Requests/Auth/LogoutRequest.php b/app/Http/Requests/Auth/LogoutRequest.php index 52601ae..d6abc9a 100644 --- a/app/Http/Requests/Auth/LogoutRequest.php +++ b/app/Http/Requests/Auth/LogoutRequest.php @@ -6,9 +6,7 @@ class LogoutRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; @@ -22,7 +20,7 @@ public function authorize(): bool public function rules(): array { return [ - 'device' => 'required|string|max:100', + 'device' => 'required|string|max:100', ]; } } diff --git a/app/Http/Requests/Auth/PermissionInsertRequest.php b/app/Http/Requests/Auth/PermissionInsertRequest.php index 19850be..d866e9d 100644 --- a/app/Http/Requests/Auth/PermissionInsertRequest.php +++ b/app/Http/Requests/Auth/PermissionInsertRequest.php @@ -6,9 +6,7 @@ class PermissionInsertRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; @@ -22,7 +20,7 @@ public function authorize(): bool public function rules(): array { return [ - 'name' => 'required|string|max:255|unique:permissions,name', + 'name' => 'required|string|max:255|unique:permissions,name', ]; } } diff --git a/app/Http/Requests/Auth/RoleInsertUpdateRequest.php b/app/Http/Requests/Auth/RoleInsertUpdateRequest.php index efb2509..aa49357 100644 --- a/app/Http/Requests/Auth/RoleInsertUpdateRequest.php +++ b/app/Http/Requests/Auth/RoleInsertUpdateRequest.php @@ -7,9 +7,7 @@ class RoleInsertUpdateRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; @@ -23,14 +21,13 @@ public function authorize(): bool public function rules(): array { $validations = [ - 'id' => 'required|exists:roles,id', // 'name' => 'required|string|max:20|unique:roles,name,'.$this->id.',id', - 'name' => Rule::unique('roles', 'name')->ignore((int) $this->id, 'id'), - + 'name' => Rule::unique('roles', 'name')->ignore((int) $this->id, 'id'), + 'permissions' => 'nullable|array|min:1', 'permissions.*' => 'nullable|exists:permissions,id', ]; - if (!$this->id) { + if (! $this->id) { array_shift($validations); } diff --git a/app/Http/Requests/Auth/RolePermissionAssignRequest.php b/app/Http/Requests/Auth/RolePermissionAssignRequest.php index 5bf247c..351addd 100644 --- a/app/Http/Requests/Auth/RolePermissionAssignRequest.php +++ b/app/Http/Requests/Auth/RolePermissionAssignRequest.php @@ -6,9 +6,7 @@ class RolePermissionAssignRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; @@ -22,7 +20,7 @@ public function authorize(): bool public function rules(): array { return [ - 'id' => 'required|exists:roles,id', + 'id' => 'required|exists:roles,id', 'permissions' => 'nullable|array|min:1', 'permissions.*' => 'nullable|exists:permissions,id', ]; diff --git a/app/Http/Requests/User/AdminAssignUserRoleRequest.php b/app/Http/Requests/User/AdminAssignUserRoleRequest.php index 1d317d3..8ba03cc 100644 --- a/app/Http/Requests/User/AdminAssignUserRoleRequest.php +++ b/app/Http/Requests/User/AdminAssignUserRoleRequest.php @@ -6,9 +6,7 @@ class AdminAssignUserRoleRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return auth()->user()->isSuperAdmin() || auth()->user()->isAdmin(); @@ -22,9 +20,9 @@ public function authorize(): bool public function rules(): array { return [ - 'user_id' => 'required|exists:users,id', - 'roles' => 'required|array|min:1', - 'roles.*' => 'required|exists:roles,id', + 'user_id' => 'required|exists:users,id', + 'roles' => 'required|array|min:1', + 'roles.*' => 'required|exists:roles,id', ]; } } diff --git a/app/Http/Requests/User/AdminUserPasswordUpdateRequest.php b/app/Http/Requests/User/AdminUserPasswordUpdateRequest.php index d45e60d..7c4a4bc 100644 --- a/app/Http/Requests/User/AdminUserPasswordUpdateRequest.php +++ b/app/Http/Requests/User/AdminUserPasswordUpdateRequest.php @@ -6,9 +6,7 @@ class AdminUserPasswordUpdateRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; @@ -22,7 +20,7 @@ public function authorize(): bool public function rules(): array { return [ - 'user_id' => 'required|exists:users,id', + 'user_id' => 'required|exists:users,id', 'password' => 'required|min:6|confirmed', ]; } diff --git a/app/Http/Requests/User/UserInsertUpdateRequest.php b/app/Http/Requests/User/UserInsertUpdateRequest.php index d521da0..e43cf4e 100644 --- a/app/Http/Requests/User/UserInsertUpdateRequest.php +++ b/app/Http/Requests/User/UserInsertUpdateRequest.php @@ -6,9 +6,7 @@ class UserInsertUpdateRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; @@ -22,17 +20,16 @@ public function authorize(): bool public function rules(): array { $validations = [ - 'id' => ($this->id !== null) ? 'required|exists:users,id' : '', - 'first_name' => 'nullable|string|max:255', - 'last_name' => 'nullable|string|max:255', - 'name' => 'required|string|max:255', - 'email' => 'required|string|email|max:255'.($this->id ? '|unique:users,email,'.$this->id.',id' : '|unique:users,email'), - 'password' => ($this->id == null) ? 'required|string|min:6|confirmed' : '', - 'phone' => 'nullable|numeric'.($this->id ? '|unique:users,phone,'.$this->id.',id' : '|unique:users,phone'), - 'designation' => 'nullable|string|max:255', - 'address' => 'nullable|string|max:255', - 'roles' => ($this->id == null) ? 'required|array|min:1' : '', - 'roles.*' => ($this->id == null) ? 'required|exists:roles,id' : '', + 'first_name' => 'nullable|string|max:255', + 'last_name' => 'nullable|string|max:255', + 'name' => 'required|string|max:255', + 'email' => 'required|string|email|max:255' . ($this->id ? '|unique:users,email,' . $this->id . ',id' : '|unique:users,email'), + 'password' => ($this->id == null) ? 'required|string|min:6|confirmed' : '', + 'phone' => 'nullable|numeric' . ($this->id ? '|unique:users,phone,' . $this->id . ',id' : '|unique:users,phone'), + 'designation' => 'nullable|string|max:255', + 'address' => 'nullable|string|max:255', + 'roles' => ($this->id == null) ? 'required|array|min:1' : '', + 'roles.*' => ($this->id == null) ? 'required|exists:roles,id' : '', ]; return array_filter($validations); diff --git a/app/Http/Requests/User/UserPasswordUpdateRequest.php b/app/Http/Requests/User/UserPasswordUpdateRequest.php index e401eda..47ef13a 100644 --- a/app/Http/Requests/User/UserPasswordUpdateRequest.php +++ b/app/Http/Requests/User/UserPasswordUpdateRequest.php @@ -6,9 +6,7 @@ class UserPasswordUpdateRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; diff --git a/app/Http/Requests/User/UserProfileUpdateRequest.php b/app/Http/Requests/User/UserProfileUpdateRequest.php index 6430534..439ab07 100644 --- a/app/Http/Requests/User/UserProfileUpdateRequest.php +++ b/app/Http/Requests/User/UserProfileUpdateRequest.php @@ -6,9 +6,7 @@ class UserProfileUpdateRequest extends FormRequest { - /** - * Determine if the user is authorized to make this request. - */ + /** Determine if the user is authorized to make this request. */ public function authorize(): bool { return auth()->check(); @@ -22,13 +20,13 @@ public function authorize(): bool public function rules(): array { return [ - 'first_name' => 'nullable|string|max:255', - 'last_name' => 'nullable|string|max:255', - 'name' => 'required|string|max:255', - 'email' => 'required|string|email|max:255|unique:users,email,'.auth()->user()->id.',id', - 'phone' => 'nullable|numeric|unique:users,phone,'.auth()->user() ->id.',id', - 'designation' => 'nullable|string|max:255', - 'address' => 'nullable|string|max:255', + 'first_name' => 'nullable|string|max:255', + 'last_name' => 'nullable|string|max:255', + 'name' => 'required|string|max:255', + 'email' => 'required|string|email|max:255|unique:users,email,' . auth()->user()->id . ',id', + 'phone' => 'nullable|numeric|unique:users,phone,' . auth()->user()->id . ',id', + 'designation' => 'nullable|string|max:255', + 'address' => 'nullable|string|max:255', ]; } } diff --git a/app/Http/Resources/Auth/PermissionResource.php b/app/Http/Resources/Auth/PermissionResource.php index 2ae1ab7..a4fd23d 100644 --- a/app/Http/Resources/Auth/PermissionResource.php +++ b/app/Http/Resources/Auth/PermissionResource.php @@ -15,10 +15,10 @@ class PermissionResource extends JsonResource public function toArray(Request $request): array { return [ - 'id' => $this->id, - 'name' => $this->name, + 'id' => $this->id, + 'name' => $this->name, 'guard' => $this->guard_name, - 'group' => $this->group + 'group' => $this->group, ]; } } diff --git a/app/Http/Resources/Auth/RoleResource.php b/app/Http/Resources/Auth/RoleResource.php index 72dfca6..6f1d18f 100644 --- a/app/Http/Resources/Auth/RoleResource.php +++ b/app/Http/Resources/Auth/RoleResource.php @@ -14,11 +14,11 @@ class RoleResource extends JsonResource */ public function toArray(Request $request): array { - $data = [ - 'id' => $this->id, - 'name' => $this->name, + $data = [ + 'id' => $this->id, + 'name' => $this->name, 'guard' => $this->guard_name, - 'permissions' => PermissionResource::collection($this->whenLoaded('permissions')) + 'permissions' => PermissionResource::collection($this->whenLoaded('permissions')), ]; return $data; diff --git a/app/Http/Resources/Auth/UserResource.php b/app/Http/Resources/Auth/UserResource.php index c7c1f55..233d701 100644 --- a/app/Http/Resources/Auth/UserResource.php +++ b/app/Http/Resources/Auth/UserResource.php @@ -15,7 +15,7 @@ class UserResource extends JsonResource */ public function toArray(Request $request): array { - $isPermissionLoaded = !$this->whenLoaded('permissions') instanceof MissingValue; + $isPermissionLoaded = ! $this->whenLoaded('permissions') instanceof MissingValue; $data = [ ...parent::toArray($request), 'roles' => $this->whenLoaded('roles') ? $this->getRoleNames() : [], @@ -23,6 +23,7 @@ public function toArray(Request $request): array if ($isPermissionLoaded) { $data['permissions'] = PermissionResource::collection($this->getPermissionsViaRoles()); } + return $data; } } diff --git a/app/Http/Services/Auth/AuthService.php b/app/Http/Services/Auth/AuthService.php index 16e059c..546e437 100644 --- a/app/Http/Services/Auth/AuthService.php +++ b/app/Http/Services/Auth/AuthService.php @@ -38,101 +38,28 @@ public function __construct( ) { } - /** - * Verify the user before Attempting to log the user into the application. - * - * @param \App\Models\User $user - * @return string error code - */ - protected function verifyBeforeLogin(User $user) - { - if ($user->is_active == UserStatus::DEACTIVE->value) { - return self::AUTH_ERROR_DEACTIVE; - } - if (!$user->email_verified_at) { - return self::AUTH_ERROR_UNVERIFIED; - } - - return self::AUTH_SUCCESS_CODE; - } - /** * check if the provided password is matched with the user current password * - * @param \App\Models\User $user - * @param string $password - * @return boolean + * @param string $password + * @return bool */ public function isUserPasswordMatched(User $user, $password) { - if (Hash::check($password, $user->password)) { - return true; - } - return false; - } - - /** - * The user has been authenticated. - * - * @param \App\Models\User $user - * @param string $device - * @return void - */ - protected function authenticated(User $user, $device) - { - $user->last_login_at = now(); - $user->last_active_device = $device; - $user->save(); + return (bool) (Hash::check($password, $user->password)); } /** - * Clear the login locks for the given user credentials. - * - * @param \Illuminate\Http\Request $request - * @return void - */ - protected function clearLoginAttempts(Request $request) - { - $this->limiter()->clear($this->throttleKey($request)); - } - - /** - * Determine if the user has too many failed login attempts. + * Log the user into the application * - * @param \Illuminate\Http\Request $request - * @return bool - */ - protected function hasTooManyLoginAttempts(Request $request) - { - return $this->limiter()->tooManyAttempts( - $this->throttleKey($request), - self::MAX_LOGIN_ATTEMPTS - ); - } - - /** - * Increment the login attempts for the user. + * @param string $password + * @param string $device * - * @param \Illuminate\Http\Request $request - * @return void - */ - protected function incrementLoginAttempts(Request $request) - { - $this->limiter()->hit( - $this->throttleKey($request), - self::MAX_DECAY_MINUTES * 60 - ); - } - /** - * Log the user into the application + * @throws \App\Exceptions\Auth\LoginErrorException; * - * @param \App\Models\User $user - * @param string $password - * @param string $device * @return array - * @throws \App\Exceptions\Auth\LoginErrorException; */ - public function login(User $user, $password, $device = "") + public function login(User $user, $password, $device = '') { if ($this->hasTooManyLoginAttempts(request())) { $this->fireLockoutEvent(request()); @@ -151,7 +78,7 @@ public function login(User $user, $password, $device = "") $this->sendFailedLoginResponse(self::AUTH_ERROR_UNVERIFIED); } - if (!$this->isUserPasswordMatched($user, $password)) { + if (! $this->isUserPasswordMatched($user, $password)) { //send failed login response $this->incrementLoginAttempts(request()); $this->sendFailedLoginResponse(self::AUTH_ERROR_INCORRECT_PASSWORD); @@ -163,7 +90,7 @@ public function login(User $user, $password, $device = "") $this->authenticated($user, $device); return [ - 'user' => $user, + 'user' => $user, 'token' => $token, ]; @@ -188,15 +115,69 @@ public function logout(string $device) } /** - * generate auth token key for a user + * Verify the user before Attempting to log the user into the application. + * + * @return string error code + */ + protected function verifyBeforeLogin(User $user) + { + if ($user->is_active == UserStatus::DEACTIVE->value) { + return self::AUTH_ERROR_DEACTIVE; + } + if (! $user->email_verified_at) { + return self::AUTH_ERROR_UNVERIFIED; + } + + return self::AUTH_SUCCESS_CODE; + } + + /** + * The user has been authenticated. * - * @param string $userId * @param string $device - * @return string + * @return void */ - private function generateTokenKey($userId, $device) + protected function authenticated(User $user, $device) { - return self::USER_TOKEN_PREFIX . $userId . '_' . $device; + $user->last_login_at = now(); + $user->last_active_device = $device; + $user->save(); + } + + /** + * Clear the login locks for the given user credentials. + * + * @return void + */ + protected function clearLoginAttempts(Request $request) + { + $this->limiter()->clear($this->throttleKey($request)); + } + + /** + * Determine if the user has too many failed login attempts. + * + * @return bool + */ + protected function hasTooManyLoginAttempts(Request $request) + { + return $this->limiter()->tooManyAttempts( + $this->throttleKey($request), + self::MAX_LOGIN_ATTEMPTS + ); + } + + /** + * Increment the login attempts for the user. + * + * @return void + */ + protected function incrementLoginAttempts(Request $request) + { + $this->limiter()->hit( + $this->throttleKey($request), + self::MAX_DECAY_MINUTES * 60 + ); } /** @@ -215,7 +196,7 @@ protected function sendLockoutResponse() /** * send Failed login response - * @param int $authErrorCode + * * @throws \App\Exceptions\Auth\LoginErrorException; */ protected function sendFailedLoginResponse(int $authErrorCode) @@ -245,4 +226,16 @@ protected function sendFailedLoginResponse(int $authErrorCode) $errorMessage, ); } + + /** + * generate auth token key for a user + * + * @param string $userId + * @param string $device + * @return string + */ + private function generateTokenKey($userId, $device) + { + return self::USER_TOKEN_PREFIX . $userId . '_' . $device; + } } diff --git a/app/Http/Services/Auth/RolePermissionService.php b/app/Http/Services/Auth/RolePermissionService.php index 81560c7..9b13aec 100644 --- a/app/Http/Services/Auth/RolePermissionService.php +++ b/app/Http/Services/Auth/RolePermissionService.php @@ -10,25 +10,8 @@ class RolePermissionService { - const UNALTERABLE_ROLE_IDS = [1, 2, 3]; - const UNALTERABLE_PERMISSION_IDS = [1,2,3,4,5,6,7,8,9,10]; - - private function isUnalterableRole(int $id): bool - { - return in_array($id, self::UNALTERABLE_ROLE_IDS); - } - - private function checkAndSendUnalterableRoleError(int $id): void - { - if ($this->isUnalterableRole($id)) { - throw new BasicValidationErrorException( - Response::HTTP_FORBIDDEN, - 0, - __('http-statuses.403') - ); - } - } + const UNALTERABLE_PERMISSION_IDS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; public function insertRole(string $name, array $permissions = []): Role { @@ -39,7 +22,7 @@ public function insertRole(string $name, array $permissions = []): Role try { $role->save(); - if (!empty($permissions)) { + if (! empty($permissions)) { app()[\Spatie\Permission\PermissionRegistrar::class]->forgetCachedPermissions(); $role->givePermissionTo($permissions); } @@ -49,7 +32,6 @@ public function insertRole(string $name, array $permissions = []): Role throw $th; } - return $role->load('permissions'); } @@ -71,7 +53,7 @@ public function deleteRole(Role $role): void DB::beginTransaction(); try { //unassign all permission from this role - if($role->permissions->count() > 0) { + if ($role->permissions->count() > 0) { $role->syncPermissions([]); } //delete role @@ -85,7 +67,7 @@ public function deleteRole(Role $role): void public function deletePermission(Permission $permission): void { - if(in_array($permission->id, self::UNALTERABLE_PERMISSION_IDS)) { + if (in_array($permission->id, self::UNALTERABLE_PERMISSION_IDS)) { throw new BasicValidationErrorException( Response::HTTP_FORBIDDEN, 0, @@ -95,4 +77,20 @@ public function deletePermission(Permission $permission): void app()[\Spatie\Permission\PermissionRegistrar::class]->forgetCachedPermissions(); $permission->delete(); } + + private function isUnalterableRole(int $id): bool + { + return in_array($id, self::UNALTERABLE_ROLE_IDS); + } + + private function checkAndSendUnalterableRoleError(int $id): void + { + if ($this->isUnalterableRole($id)) { + throw new BasicValidationErrorException( + Response::HTTP_FORBIDDEN, + 0, + __('http-statuses.403') + ); + } + } } diff --git a/app/Http/Services/Health/AppHealthService.php b/app/Http/Services/Health/AppHealthService.php index 67f848b..08b6037 100644 --- a/app/Http/Services/Health/AppHealthService.php +++ b/app/Http/Services/Health/AppHealthService.php @@ -12,43 +12,22 @@ class AppHealthService { - /** - * @var Migrator - */ + /** @var Migrator */ protected $migrator; - /** - * @return Migrator - */ - protected function getMigrator() - { - if (is_null($this->migrator)) { - $this->migrator = app('migrator'); - } - - return $this->migrator; - } - - /** - * @return string - */ - protected function getMigrationPath() - { - return database_path() . DIRECTORY_SEPARATOR . 'migrations'; - } - /** * Test cache is operational or not + * * @name isCacheTestSuccessful * - * @return boolean + * @return bool */ public function isCacheTestSuccessful() { $isHealthy = true; try { //code... - $cache = Cache::store(config("cache.default")); + $cache = Cache::store(config('cache.default')); $cache->put('laravel-health-check', 'healthy', Carbon::now()->addMinutes(1)); $value = $cache->pull('laravel-health-check', 'broken'); if ($value != 'healthy') { @@ -58,14 +37,16 @@ public function isCacheTestSuccessful() //throw $th; $isHealthy = false; } + return $isHealthy; } /** * Test http request is operational or not + * * @name isHttpTestSuccessful * - * @return boolean + * @return bool */ public function isHttpTestSuccessful() { @@ -78,21 +59,23 @@ public function isHttpTestSuccessful() //throw $th; $isHealthy = false; } + return $isHealthy; } /** * Test storage and its permission is operational or not + * * @name isStorageTestSuccessful * - * @return boolean + * @return bool */ public function isStorageTestSuccessful() { $isHealthy = true; $uniqueString = uniqid('laravel-health-check_', true); try { - $storage = Storage::disk("health"); + $storage = Storage::disk('health'); $storage->put($uniqueString, $uniqueString); $contents = $storage->get($uniqueString); $storage->delete($uniqueString); @@ -100,15 +83,17 @@ public function isStorageTestSuccessful() // throw $th; $isHealthy = false; } + return $isHealthy; } /** - * Test Database connection is successful or not - * @name isDatabaseTestSuccessful - * - * @return boolean - */ + * Test Database connection is successful or not + * + * @name isDatabaseTestSuccessful + * + * @return bool + */ public function isDatabaseTestSuccessful() { $isHealthy = true; @@ -117,21 +102,23 @@ public function isDatabaseTestSuccessful() } catch (\Throwable $th) { $isHealthy = false; } + return $isHealthy; } /** * Test Migration is up-todate or not + * * @name isMigrationTestSuccessful * - * @return boolean + * @return bool */ public function isMigrationTestSuccessful() { $isHealthy = true; try { //code... - $pendingMigrations = (array)$this->getPendingMigrations(); + $pendingMigrations = (array) $this->getPendingMigrations(); $isHealthy = count($pendingMigrations) === 0; } catch (\Throwable $th) { //throw $th; @@ -141,9 +128,25 @@ public function isMigrationTestSuccessful() return $isHealthy; } + /** @return Migrator */ + protected function getMigrator() + { + if (is_null($this->migrator)) { + $this->migrator = app('migrator'); + } + + return $this->migrator; + } + + /** @return string */ + protected function getMigrationPath() + { + return database_path() . DIRECTORY_SEPARATOR . 'migrations'; + } + private function getCompletedMigrations() { - if (!$this->getMigrator()->repositoryExists()) { + if (! $this->getMigrator()->repositoryExists()) { return []; } @@ -153,6 +156,7 @@ private function getCompletedMigrations() private function getPendingMigrations() { $files = $this->getMigrator()->getMigrationFiles($this->getMigrationPath()); + return array_diff(array_keys($files), $this->getCompletedMigrations()); } } diff --git a/app/Http/Services/Misc/OtpService.php b/app/Http/Services/Misc/OtpService.php index 674eed5..120855f 100644 --- a/app/Http/Services/Misc/OtpService.php +++ b/app/Http/Services/Misc/OtpService.php @@ -7,18 +7,16 @@ class OtpService { - private const USER_OTP_PREFIX = "OTP_"; + private const USER_OTP_PREFIX = 'OTP_'; - /** - * @var SmsService - */ + /** @var SmsService */ protected $smsService; /** - * __construct - * - * @return void - */ + * __construct + * + * @return void + */ public function __construct(SmsService $smsService) { $this->smsService = $smsService; @@ -36,45 +34,41 @@ public function generateOtpCode(User $user, $time) //forget existing otp from cache Cache::forget(self::USER_OTP_PREFIX . $user->id); //generate code - $code = mt_rand(100000, 999999); + $code = mt_rand(100000, 999999); //put them in cache Cache::put(self::USER_OTP_PREFIX . $user->id, $code, now()->addMinutes($time)); $user->last_otp = $code; $user->save(); + //return generated code return $code; } - /** * check if the OTP is expired from cache or not * * @param \App\Models\User - * @return boolean + * @return bool */ public function isOtpExpired(User $user) { $cachedCode = Cache::get(self::USER_OTP_PREFIX . $user->id); - if (!$cachedCode) { - return true; - } - return false; + + return (bool) (! $cachedCode); } /** * check if the OTP is correct * * @param \App\Models\User - * @param string $code - * @return boolean + * @param string $code + * @return bool */ public function isCorrectOtp(User $user, $code) { $cachedCode = Cache::get(self::USER_OTP_PREFIX . $user->id); - if ($code != $cachedCode) { - return false; - } - return true; + + return ! ($code != $cachedCode); } /** @@ -90,5 +84,4 @@ public function sendOtp(User $user) $body = "{$otp} is your OTP"; $this->smsService->sendSms($phone, $body); } - } diff --git a/app/Http/Services/Misc/SmsService.php b/app/Http/Services/Misc/SmsService.php index 4beac42..c341ac2 100644 --- a/app/Http/Services/Misc/SmsService.php +++ b/app/Http/Services/Misc/SmsService.php @@ -6,24 +6,20 @@ class SmsService { - /** - * @var $token - */ protected $token; + /** - * __construct - * - * @return void - */ + * __construct + * + * @return void + */ public function __construct() { $this->token = config('envs.sms_token'); } - public function sendSms($to, $body) { dispatch(new SendSmsJob($this->token, $to, $body)); } - } diff --git a/app/Http/Services/User/UserService.php b/app/Http/Services/User/UserService.php index d9cc4b0..dfa3cde 100644 --- a/app/Http/Services/User/UserService.php +++ b/app/Http/Services/User/UserService.php @@ -2,9 +2,9 @@ namespace App\Http\Services\User; -use App\Enums\UserStatus; use App\Exceptions\BasicValidationErrorException; use App\Http\DTOs\UserDTO; +use App\Http\Mappers\UserMapper; use App\Models\User; use Illuminate\Http\Response; use Illuminate\Support\Facades\DB; @@ -17,19 +17,7 @@ class UserService public function insertUserData(UserDTO $data): User { - $user = new User(); - $user->first_name = $data->firstName; - $user->last_name = $data->lastName; - $user->user_name = $data->name; - $user->name = $data->name; - $user->email = $data->email; - $user->email_verified_at = now(); - $user->password = Hash::make($data->password); - $user->phone = $data->phone; - $user->designation = $data->designation; - $user->address = $data->address; - $user->is_active = $data->isActive ? UserStatus::ACTIVE : UserStatus::DEACTIVE; - $user->created_by = auth()->id(); + $user = UserMapper::toModel($data, new User()); DB::beginTransaction(); try { @@ -44,24 +32,15 @@ public function insertUserData(UserDTO $data): User return $user; } - public function updateUserData( UserDTO $data, User $user, bool $isProfileUpdate = false ): User { - $user->first_name = $data->firstName; - $user->last_name = $data->lastName; - $user->name = $data->name; - $user->email = $data->email; - $user->phone = $data->phone; - $user->designation = $data->designation; - $user->address = $data->address; - $user->updated_by = auth()->id(); - if(!$isProfileUpdate) { - $user->is_active = $data->isActive ? UserStatus::ACTIVE : UserStatus::DEACTIVE; - } + $user = UserMapper::toModel($data, $user, [ + 'isProfileUpdate' => $isProfileUpdate, + ]); $user->save(); return $user; @@ -86,15 +65,15 @@ public function assignUserRole(User $user, $roles): User public function updateUserPassword( User $user, string $password, - string|null $currentPassword, + ?string $currentPassword, ): User { - if($currentPassword) { - if (!Hash::check($currentPassword, $user->password)) { + if ($currentPassword) { + if (! Hash::check($currentPassword, $user->password)) { throw new BasicValidationErrorException( Response::HTTP_BAD_REQUEST, self::INCORRECT_PASSWORD_ERROR_CODE, - __('Wrong current password! Please try again with the correct password.') + __('messages.password.current.wrong') ); } @@ -103,7 +82,7 @@ public function updateUserPassword( $user->password = Hash::make($password); $user->updated_by = auth()->id(); $user->save(); + return $user; } - } diff --git a/app/Jobs/SendSmsJob.php b/app/Jobs/SendSmsJob.php index 760f35a..69db771 100644 --- a/app/Jobs/SendSmsJob.php +++ b/app/Jobs/SendSmsJob.php @@ -15,9 +15,8 @@ class SendSmsJob implements ShouldQueue public $autToken; public $to; public $body; - /** - * Create a new job instance. - */ + + /** Create a new job instance. */ public function __construct($authToken, $to, $body) { $this->autToken = $authToken; @@ -25,9 +24,7 @@ public function __construct($authToken, $to, $body) $this->body = $body; } - /** - * Execute the job. - */ + /** Execute the job. */ public function handle(): void { //implement logic here diff --git a/app/Models/User.php b/app/Models/User.php index 49f2eac..5f77395 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -13,7 +13,7 @@ class User extends Authenticatable { - use HasApiTokens, HasFactory, Notifiable, HasRoles; + use HasApiTokens, HasFactory, HasRoles, Notifiable; protected $guard_name = 'sanctum'; diff --git a/app/Policies/PermissionPolicy.php b/app/Policies/PermissionPolicy.php index ed2849b..f977b39 100644 --- a/app/Policies/PermissionPolicy.php +++ b/app/Policies/PermissionPolicy.php @@ -7,57 +7,43 @@ class PermissionPolicy { - /** - * Determine whether the user can view any models. - */ + /** Determine whether the user can view any models. */ public function viewAny(User $user): bool { return $user->isSuperAdmin(); } - /** - * Determine whether the user can view the model. - */ + /** Determine whether the user can view the model. */ public function view(User $user, Permission $permission): bool { return $user->isSuperAdmin(); } - /** - * Determine whether the user can create models. - */ + /** Determine whether the user can create models. */ public function create(User $user): bool { return $user->isSuperAdmin(); } - /** - * Determine whether the user can update the model. - */ + /** Determine whether the user can update the model. */ public function update(User $user, Permission $permission): bool { return $user->isSuperAdmin(); } - /** - * Determine whether the user can delete the model. - */ + /** Determine whether the user can delete the model. */ public function delete(User $user, Permission $permission): bool { return $user->isSuperAdmin(); } - /** - * Determine whether the user can restore the model. - */ + /** Determine whether the user can restore the model. */ public function restore(User $user, Permission $permission): bool { return $user->isSuperAdmin(); } - /** - * Determine whether the user can permanently delete the model. - */ + /** Determine whether the user can permanently delete the model. */ public function forceDelete(User $user, Permission $permission): bool { return $user->isSuperAdmin(); diff --git a/app/Policies/RolePolicy.php b/app/Policies/RolePolicy.php index 8b2309b..62e7ef5 100644 --- a/app/Policies/RolePolicy.php +++ b/app/Policies/RolePolicy.php @@ -7,57 +7,43 @@ class RolePolicy { - /** - * Determine whether the user can view any models. - */ + /** Determine whether the user can view any models. */ public function viewAny(User $user): bool { return $user->hasPermissionTo('role.view.all'); } - /** - * Determine whether the user can view the model. - */ + /** Determine whether the user can view the model. */ public function view(User $user, Role $role): bool { return $user->hasPermissionTo('role.view'); } - /** - * Determine whether the user can create models. - */ + /** Determine whether the user can create models. */ public function create(User $user): bool { return $user->hasPermissionTo('role.create'); } - /** - * Determine whether the user can update the model. - */ + /** Determine whether the user can update the model. */ public function update(User $user, Role $role): bool { return $user->hasPermissionTo('role.update'); } - /** - * Determine whether the user can delete the model. - */ + /** Determine whether the user can delete the model. */ public function delete(User $user, Role $role): bool { return $user->hasPermissionTo('role.delete'); } - /** - * Determine whether the user can restore the model. - */ + /** Determine whether the user can restore the model. */ public function restore(User $user, Role $role): bool { return $user->isSuperAdmin(); } - /** - * Determine whether the user can permanently delete the model. - */ + /** Determine whether the user can permanently delete the model. */ public function forceDelete(User $user, Role $role): bool { return $user->isSuperAdmin(); diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php index 165aaca..bbf15ff 100644 --- a/app/Policies/UserPolicy.php +++ b/app/Policies/UserPolicy.php @@ -6,78 +6,64 @@ class UserPolicy { - /** - * Determine whether the user can view any models. - */ + /** Determine whether the user can view any models. */ public function viewAny(User $user): bool { return $user->hasPermissionTo('user.view.all'); } - /** - * Determine whether the user can view the model. - */ + /** Determine whether the user can view the model. */ public function view(User $user, User $model): bool { return $user->hasPermissionTo('user.view') || $user->id == $model->id; } - /** - * Determine whether the user can create models. - */ + /** Determine whether the user can create models. */ public function create(User $user): bool { return $user->hasPermissionTo('user.create'); } - /** - * Determine whether the user can update the model. - */ + /** Determine whether the user can update the model. */ public function update(User $user, User $model): bool { - if($model->isSuperAdmin() && !$user->isSuperAdmin()) { + if ($model->isSuperAdmin() && ! $user->isSuperAdmin()) { return false; } + return $user->hasPermissionTo('user.update') || $user->id == $model->id; } - - /** - * Determine whether the user can assign a role to the model. - */ + /** Determine whether the user can assign a role to the model. */ public function assignRole(User $user, User $model): bool { if ($model->isSuperAdmin()) { return false; } - if ($user->isAdmin() && !$model->isAdmin()) { + if ($user->isAdmin() && ! $model->isAdmin()) { return true; } + return $user->isSuperAdmin() || $user->isAdmin(); } - /** - * Determine whether the user can delete the model. - */ + /** Determine whether the user can delete the model. */ public function delete(User $user, User $model): bool { - if($model->isSuperAdmin()) { + if ($model->isSuperAdmin()) { return false; } + return $user->hasPermissionTo('user.delete'); } - /** - * Determine whether the user can restore the model. - */ + /** Determine whether the user can restore the model. */ public function restore(User $user, User $model): bool { return $user->isSuperAdmin(); } - /** - * Determine whether the user can permanently delete the model. - */ + /** Determine whether the user can permanently delete the model. */ public function forceDelete(User $user, User $model): bool { return $user->isSuperAdmin(); diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 9bd4fc7..4aa83e1 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -6,9 +6,7 @@ class AppServiceProvider extends ServiceProvider { - /** - * Register any application services. - */ + /** Register any application services. */ public function register(): void { if ($this->app->environment('local')) { @@ -17,9 +15,7 @@ public function register(): void } } - /** - * Bootstrap any application services. - */ + /** Bootstrap any application services. */ public function boot(): void { // diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 77573ff..c29e310 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -25,9 +25,7 @@ class AuthServiceProvider extends ServiceProvider Permission::class => PermissionPolicy::class, ]; - /** - * Register any authentication / authorization services. - */ + /** Register any authentication / authorization services. */ public function boot(): void { // diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 2be04f5..fbe7d05 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -7,9 +7,7 @@ class BroadcastServiceProvider extends ServiceProvider { - /** - * Bootstrap any application services. - */ + /** Bootstrap any application services. */ public function boot(): void { Broadcast::routes(); diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 2d65aac..31e4206 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -20,17 +20,13 @@ class EventServiceProvider extends ServiceProvider ], ]; - /** - * Register any events for your application. - */ + /** Register any events for your application. */ public function boot(): void { // } - /** - * Determine if events and listeners should be automatically discovered. - */ + /** Determine if events and listeners should be automatically discovered. */ public function shouldDiscoverEvents(): bool { return false; diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 1cf5f15..4cfbddb 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -19,9 +19,7 @@ class RouteServiceProvider extends ServiceProvider */ public const HOME = '/home'; - /** - * Define your route model bindings, pattern filters, and other route configuration. - */ + /** Define your route model bindings, pattern filters, and other route configuration. */ public function boot(): void { RateLimiter::for('api', function (Request $request) { diff --git a/app/Providers/TelescopeServiceProvider.php b/app/Providers/TelescopeServiceProvider.php index d13b001..da06b20 100644 --- a/app/Providers/TelescopeServiceProvider.php +++ b/app/Providers/TelescopeServiceProvider.php @@ -9,9 +9,7 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider { - /** - * Register any application services. - */ + /** Register any application services. */ public function register(): void { // Telescope::night(); @@ -31,9 +29,7 @@ public function register(): void }); } - /** - * Prevent sensitive request details from being logged by Telescope. - */ + /** Prevent sensitive request details from being logged by Telescope. */ protected function hideSensitiveRequestDetails(): void { if ($this->app->environment('local')) { diff --git a/app/Traits/RateLimitterTrait.php b/app/Traits/RateLimitterTrait.php index e7c21d3..4cd8acc 100644 --- a/app/Traits/RateLimitterTrait.php +++ b/app/Traits/RateLimitterTrait.php @@ -22,18 +22,16 @@ protected function limiter() /** * Get the throttle key for the given request. * - * @param \Illuminate\Http\Request $request * @return string */ protected function throttleKey(Request $request) { - return Str::transliterate(Str::lower($request->input('email').'|'.$request->ip())); + return Str::transliterate(Str::lower($request->input('email') . '|' . $request->ip())); } /** * Fire an event when a lockout occurs. * - * @param \Illuminate\Http\Request $request * @return void */ protected function fireLockoutEvent(Request $request) diff --git a/composer.lock b/composer.lock index 781f5bd..e7b7e97 100644 --- a/composer.lock +++ b/composer.lock @@ -8,25 +8,25 @@ "packages": [ { "name": "brick/math", - "version": "0.11.0", + "version": "0.12.3", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478" + "reference": "866551da34e9a618e64a819ee1e01c20d8a588ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478", - "reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478", + "url": "https://api.github.com/repos/brick/math/zipball/866551da34e9a618e64a819ee1e01c20d8a588ba", + "reference": "866551da34e9a618e64a819ee1e01c20d8a588ba", "shasum": "" }, "require": { - "php": "^8.0" + "php": "^8.1" }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^9.0", - "vimeo/psalm": "5.0.0" + "phpunit/phpunit": "^10.1", + "vimeo/psalm": "6.8.8" }, "type": "library", "autoload": { @@ -46,12 +46,17 @@ "arithmetic", "bigdecimal", "bignum", + "bignumber", "brick", - "math" + "decimal", + "integer", + "math", + "mathematics", + "rational" ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.11.0" + "source": "https://github.com/brick/math/tree/0.12.3" }, "funding": [ { @@ -59,7 +64,7 @@ "type": "github" } ], - "time": "2023-01-15T23:15:59+00:00" + "time": "2025-02-28T13:11:00+00:00" }, { "name": "carbonphp/carbon-doctrine-types", @@ -132,16 +137,16 @@ }, { "name": "dflydev/dot-access-data", - "version": "v3.0.2", + "version": "v3.0.3", "source": { "type": "git", "url": "https://github.com/dflydev/dflydev-dot-access-data.git", - "reference": "f41715465d65213d644d3141a6a93081be5d3549" + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", - "reference": "f41715465d65213d644d3141a6a93081be5d3549", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f", + "reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f", "shasum": "" }, "require": { @@ -201,9 +206,9 @@ ], "support": { "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", - "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3" }, - "time": "2022-10-27T11:44:00+00:00" + "time": "2024-07-08T12:26:09+00:00" }, { "name": "doctrine/inflector", @@ -375,16 +380,16 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.3", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" + "reference": "8c784d071debd117328803d86b2097615b457500" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", - "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/8c784d071debd117328803d86b2097615b457500", + "reference": "8c784d071debd117328803d86b2097615b457500", "shasum": "" }, "require": { @@ -397,10 +402,14 @@ "require-dev": { "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^1.0", - "phpstan/phpstan-webmozart-assert": "^1.0", "phpunit/phpunit": "^7.0|^8.0|^9.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, "autoload": { "psr-4": { "Cron\\": "src/Cron/" @@ -424,7 +433,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.4.0" }, "funding": [ { @@ -432,20 +441,20 @@ "type": "github" } ], - "time": "2023-08-10T19:36:49+00:00" + "time": "2024-10-09T13:47:03+00:00" }, { "name": "egulias/email-validator", - "version": "4.0.2", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e" + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ebaaf5be6c0286928352e054f2d5125608e5405e", - "reference": "ebaaf5be6c0286928352e054f2d5125608e5405e", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", + "reference": "d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa", "shasum": "" }, "require": { @@ -491,7 +500,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/4.0.2" + "source": "https://github.com/egulias/EmailValidator/tree/4.0.4" }, "funding": [ { @@ -499,7 +508,7 @@ "type": "github" } ], - "time": "2023-10-06T06:47:41+00:00" + "time": "2025-03-06T22:45:56+00:00" }, { "name": "fruitcake/php-cors", @@ -574,24 +583,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862" + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862", - "reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", + "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2" + "phpoption/phpoption": "^1.9.3" }, "require-dev": { - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "autoload": { @@ -620,7 +629,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" }, "funding": [ { @@ -632,26 +641,26 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:16:48+00:00" + "time": "2024-07-20T21:45:45+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "version": "7.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "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" @@ -662,9 +671,9 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -742,7 +751,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" }, "funding": [ { @@ -758,20 +767,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2025-03-27T13:37:11+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.2", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", "shasum": "" }, "require": { @@ -779,7 +788,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -825,7 +834,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "source": "https://github.com/guzzle/promises/tree/2.2.0" }, "funding": [ { @@ -841,20 +850,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:19:20+00:00" + "time": "2025-03-27T13:27:01+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", "shasum": "" }, "require": { @@ -869,8 +878,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -941,7 +950,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.7.1" }, "funding": [ { @@ -957,20 +966,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2025-03-27T12:30:47+00:00" }, { "name": "guzzlehttp/uri-template", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/guzzle/uri-template.git", - "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c" + "reference": "30e286560c137526eccd4ce21b2de477ab0676d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/ecea8feef63bd4fef1f037ecb288386999ecc11c", - "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/30e286560c137526eccd4ce21b2de477ab0676d2", + "reference": "30e286560c137526eccd4ce21b2de477ab0676d2", "shasum": "" }, "require": { @@ -1027,7 +1036,7 @@ ], "support": { "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.3" + "source": "https://github.com/guzzle/uri-template/tree/v1.0.4" }, "funding": [ { @@ -1043,27 +1052,27 @@ "type": "tidelift" } ], - "time": "2023-12-03T19:50:20+00:00" + "time": "2025-02-03T10:55:03+00:00" }, { "name": "laravel/framework", - "version": "v11.1.1", + "version": "v11.44.2", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "1437cea6d2b04cbc83743fbb208e1a01efccd9ec" + "reference": "f85216c82cbd38b66d67ebd20ea762cb3751a4b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/1437cea6d2b04cbc83743fbb208e1a01efccd9ec", - "reference": "1437cea6d2b04cbc83743fbb208e1a01efccd9ec", + "url": "https://api.github.com/repos/laravel/framework/zipball/f85216c82cbd38b66d67ebd20ea762cb3751a4b4", + "reference": "f85216c82cbd38b66d67ebd20ea762cb3751a4b4", "shasum": "" }, "require": { "brick/math": "^0.9.3|^0.10.2|^0.11|^0.12", "composer-runtime-api": "^2.2", "doctrine/inflector": "^2.0.5", - "dragonmantank/cron-expression": "^3.3.2", + "dragonmantank/cron-expression": "^3.4", "egulias/email-validator": "^3.2.1|^4.0", "ext-ctype": "*", "ext-filter": "*", @@ -1073,42 +1082,44 @@ "ext-session": "*", "ext-tokenizer": "*", "fruitcake/php-cors": "^1.3", - "guzzlehttp/guzzle": "^7.8", + "guzzlehttp/guzzle": "^7.8.2", "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.1.15", - "laravel/serializable-closure": "^1.3", - "league/commonmark": "^2.2.1", - "league/flysystem": "^3.8.0", + "laravel/prompts": "^0.1.18|^0.2.0|^0.3.0", + "laravel/serializable-closure": "^1.3|^2.0", + "league/commonmark": "^2.6", + "league/flysystem": "^3.25.1", + "league/flysystem-local": "^3.25.1", + "league/uri": "^7.5.1", "monolog/monolog": "^3.0", - "nesbot/carbon": "^2.72.2|^3.0", + "nesbot/carbon": "^2.72.6|^3.8.4", "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": "^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", + "symfony/console": "^7.0.3", + "symfony/error-handler": "^7.0.3", + "symfony/finder": "^7.0.3", + "symfony/http-foundation": "^7.2.0", + "symfony/http-kernel": "^7.0.3", + "symfony/mailer": "^7.0.3", + "symfony/mime": "^7.0.3", + "symfony/polyfill-php83": "^1.31", + "symfony/process": "^7.0.3", + "symfony/routing": "^7.0.3", + "symfony/uid": "^7.0.3", + "symfony/var-dumper": "^7.0.3", "tijsverkoyen/css-to-inline-styles": "^2.2.5", - "vlucas/phpdotenv": "^5.4.1", - "voku/portable-ascii": "^2.0" + "vlucas/phpdotenv": "^5.6.1", + "voku/portable-ascii": "^2.0.2" }, "conflict": { - "mockery/mockery": "1.6.8", "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": { @@ -1117,6 +1128,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", @@ -1149,29 +1161,33 @@ }, "require-dev": { "ably/ably-php": "^1.0", - "aws/aws-sdk-php": "^3.235.5", + "aws/aws-sdk-php": "^3.322.9", "ext-gmp": "*", - "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.6", - "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.0.6", - "pda/pheanstalk": "^5.0", - "phpstan/phpstan": "^1.4.7", - "phpunit/phpunit": "^10.5|^11.0", - "predis/predis": "^2.0.2", + "fakerphp/faker": "^1.24", + "guzzlehttp/promises": "^2.0.3", + "guzzlehttp/psr7": "^2.4", + "laravel/pint": "^1.18", + "league/flysystem-aws-s3-v3": "^3.25.1", + "league/flysystem-ftp": "^3.25.1", + "league/flysystem-path-prefixing": "^3.25.1", + "league/flysystem-read-only": "^3.25.1", + "league/flysystem-sftp-v3": "^3.25.1", + "mockery/mockery": "^1.6.10", + "orchestra/testbench-core": "^9.11.2", + "pda/pheanstalk": "^5.0.6", + "php-http/discovery": "^1.15", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^10.5.35|^11.3.6|^12.0.1", + "predis/predis": "^2.3", "resend/resend-php": "^0.10.0", - "symfony/cache": "^7.0", - "symfony/http-client": "^7.0", - "symfony/psr-http-message-bridge": "^7.0" + "symfony/cache": "^7.0.3", + "symfony/http-client": "^7.0.3", + "symfony/psr-http-message-bridge": "^7.0.3", + "symfony/translation": "^7.0.3" }, "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).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).", "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.", @@ -1181,20 +1197,20 @@ "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).", "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).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.25.1).", + "league/flysystem-read-only": "Required to use read-only disks (^3.25.1)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.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 (^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).", + "php-http/discovery": "Required to use PSR-7 bridging features (^1.15).", + "phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.3.6|^12.0.1).", + "predis/predis": "Required to use the predis connector (^2.3).", "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).", "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0).", @@ -1213,10 +1229,13 @@ }, "autoload": { "files": [ + "src/Illuminate/Collections/functions.php", "src/Illuminate/Collections/helpers.php", "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": { @@ -1248,25 +1267,25 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-03-28T15:07:18+00:00" + "time": "2025-03-12T14:34:30+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.17", + "version": "v0.3.5", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5" + "reference": "57b8f7efe40333cdb925700891c7d7465325d3b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5", - "reference": "8ee9f87f7f9eadcbe21e9e72cd4176b2f06cd5b5", + "url": "https://api.github.com/repos/laravel/prompts/zipball/57b8f7efe40333cdb925700891c7d7465325d3b1", + "reference": "57b8f7efe40333cdb925700891c7d7465325d3b1", "shasum": "" }, "require": { + "composer-runtime-api": "^2.2", "ext-mbstring": "*", - "illuminate/collections": "^10.0|^11.0", "php": "^8.1", "symfony/console": "^6.2|^7.0" }, @@ -1275,8 +1294,9 @@ "laravel/framework": ">=10.17.0 <10.25.0" }, "require-dev": { + "illuminate/collections": "^10.0|^11.0|^12.0", "mockery/mockery": "^1.5", - "pestphp/pest": "^2.3", + "pestphp/pest": "^2.3|^3.4", "phpstan/phpstan": "^1.11", "phpstan/phpstan-mockery": "^1.1" }, @@ -1286,7 +1306,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "0.1.x-dev" + "dev-main": "0.3.x-dev" } }, "autoload": { @@ -1301,11 +1321,12 @@ "license": [ "MIT" ], + "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.17" + "source": "https://github.com/laravel/prompts/tree/v0.3.5" }, - "time": "2024-03-13T16:05:43+00:00" + "time": "2025-02-11T13:34:40+00:00" }, { "name": "laravel/sanctum", @@ -1373,31 +1394,32 @@ }, { "name": "laravel/serializable-closure", - "version": "v1.3.3", + "version": "v2.0.4", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" + "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b352cf0534aa1ae6b4d825d1e762e35d43f8a841", + "reference": "b352cf0534aa1ae6b4d825d1e762e35d43f8a841", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "php": "^8.1" }, "require-dev": { - "nesbot/carbon": "^2.61", - "pestphp/pest": "^1.21.3", - "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11" + "illuminate/support": "^10.0|^11.0|^12.0", + "nesbot/carbon": "^2.67|^3.0", + "pestphp/pest": "^2.36|^3.0", + "phpstan/phpstan": "^2.0", + "symfony/var-dumper": "^6.2.0|^7.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -1429,7 +1451,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2023-11-08T14:08:06+00:00" + "time": "2025-03-19T13:51:03+00:00" }, { "name": "laravel/tinker", @@ -1499,16 +1521,16 @@ }, { "name": "league/commonmark", - "version": "2.4.2", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf" + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/91c24291965bd6d7c46c46a12ba7492f83b1cadf", - "reference": "91c24291965bd6d7c46c46a12ba7492f83b1cadf", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d990688c91cedfb69753ffc2512727ec646df2ad", + "reference": "d990688c91cedfb69753ffc2512727ec646df2ad", "shasum": "" }, "require": { @@ -1521,8 +1543,8 @@ }, "require-dev": { "cebe/markdown": "^1.0", - "commonmark/cmark": "0.30.3", - "commonmark/commonmark.js": "0.30.0", + "commonmark/cmark": "0.31.1", + "commonmark/commonmark.js": "0.31.1", "composer/package-versions-deprecated": "^1.8", "embed/embed": "^4.4", "erusev/parsedown": "^1.0", @@ -1533,8 +1555,9 @@ "phpstan/phpstan": "^1.8.2", "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", "scrutinizer/ocular": "^1.8.1", - "symfony/finder": "^5.3 | ^6.0 || ^7.0", - "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 || ^7.0", + "symfony/finder": "^5.3 | ^6.0 | ^7.0", + "symfony/process": "^5.4 | ^6.0 | ^7.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0", "unleashedtech/php-coding-standard": "^3.1.1", "vimeo/psalm": "^4.24.0 || ^5.0.0" }, @@ -1544,7 +1567,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "2.7-dev" } }, "autoload": { @@ -1601,7 +1624,7 @@ "type": "tidelift" } ], - "time": "2024-02-02T11:59:32+00:00" + "time": "2024-12-29T14:10:59+00:00" }, { "name": "league/config", @@ -1687,16 +1710,16 @@ }, { "name": "league/flysystem", - "version": "3.26.0", + "version": "3.29.1", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "072735c56cc0da00e10716dd90d5a7f7b40b36be" + "reference": "edc1bb7c86fab0776c3287dbd19b5fa278347319" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/072735c56cc0da00e10716dd90d5a7f7b40b36be", - "reference": "072735c56cc0da00e10716dd90d5a7f7b40b36be", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/edc1bb7c86fab0776c3287dbd19b5fa278347319", + "reference": "edc1bb7c86fab0776c3287dbd19b5fa278347319", "shasum": "" }, "require": { @@ -1720,10 +1743,13 @@ "composer/semver": "^3.0", "ext-fileinfo": "*", "ext-ftp": "*", + "ext-mongodb": "^1.3", "ext-zip": "*", "friendsofphp/php-cs-fixer": "^3.5", "google/cloud-storage": "^1.23", + "guzzlehttp/psr7": "^2.6", "microsoft/azure-storage-blob": "^1.1", + "mongodb/mongodb": "^1.2", "phpseclib/phpseclib": "^3.0.36", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^9.5.11|^10.0", @@ -1761,32 +1787,22 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.26.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.29.1" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-03-25T11:49:53+00:00" + "time": "2024-10-08T08:58:34+00:00" }, { "name": "league/flysystem-local", - "version": "3.25.1", + "version": "3.29.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92" + "reference": "e0e8d52ce4b2ed154148453d321e97c8e931bd27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/61a6a90d6e999e4ddd9ce5adb356de0939060b92", - "reference": "61a6a90d6e999e4ddd9ce5adb356de0939060b92", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e0e8d52ce4b2ed154148453d321e97c8e931bd27", + "reference": "e0e8d52ce4b2ed154148453d321e97c8e931bd27", "shasum": "" }, "require": { @@ -1820,32 +1836,22 @@ "local" ], "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.25.1" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.29.0" }, - "funding": [ - { - "url": "https://ecologi.com/frankdejonge", - "type": "custom" - }, - { - "url": "https://github.com/frankdejonge", - "type": "github" - } - ], - "time": "2024-03-15T19:58:44+00:00" + "time": "2024-08-09T21:24:39+00:00" }, { "name": "league/mime-type-detection", - "version": "1.15.0", + "version": "1.16.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301" + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", - "reference": "ce0f4d1e8a6f4eb0ddff33f57c69c50fd09f4301", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", + "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", "shasum": "" }, "require": { @@ -1876,7 +1882,7 @@ "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.15.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" }, "funding": [ { @@ -1888,20 +1894,194 @@ "type": "tidelift" } ], - "time": "2024-01-28T23:22:08+00:00" + "time": "2024-09-21T08:32:55+00:00" + }, + { + "name": "league/uri", + "version": "7.5.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "81fb5145d2644324614cc532b28efd0215bda430" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/81fb5145d2644324614cc532b28efd0215bda430", + "reference": "81fb5145d2644324614cc532b28efd0215bda430", + "shasum": "" + }, + "require": { + "league/uri-interfaces": "^7.5", + "php": "^8.1" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "suggest": { + "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": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "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": { + "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.5.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:40:02+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "7.5.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "reference": "08cfc6c4f3d811584fb09c37e2849e6a7f9b0742", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^8.1", + "psr/http-factory": "^1", + "psr/http-message": "^1.1 || ^2.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\\Uri\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "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": { + "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.5.0" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2024-12-08T08:18:47+00:00" }, { "name": "monolog/monolog", - "version": "3.5.0", + "version": "3.9.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448" + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c915e2634718dbc8a4a15c61b0e62e7a44e14448", - "reference": "c915e2634718dbc8a4a15c61b0e62e7a44e14448", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/10d85740180ecba7896c87e06a166e0c95a0e3b6", + "reference": "10d85740180ecba7896c87e06a166e0c95a0e3b6", "shasum": "" }, "require": { @@ -1921,12 +2101,14 @@ "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^10.1", + "php-console/php-console": "^3.1.8", + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^10.5.17 || ^11.0.7", "predis/predis": "^1.1 || ^2", - "ruflin/elastica": "^7", + "rollbar/rollbar": "^4.0", + "ruflin/elastica": "^7 || ^8", "symfony/mailer": "^5.4 || ^6", "symfony/mime": "^5.4 || ^6" }, @@ -1977,7 +2159,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.5.0" + "source": "https://github.com/Seldaek/monolog/tree/3.9.0" }, "funding": [ { @@ -1989,24 +2171,24 @@ "type": "tidelift" } ], - "time": "2023-10-27T15:32:31+00:00" + "time": "2025-03-24T10:02:05+00:00" }, { "name": "nesbot/carbon", - "version": "3.2.2", + "version": "3.9.0", "source": { "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "2d69b6de67e2a3c0652d0c9dfcfda8b4563c4cee" + "url": "https://github.com/CarbonPHP/carbon.git", + "reference": "6d16a8a015166fe54e22c042e0805c5363aef50d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/2d69b6de67e2a3c0652d0c9dfcfda8b4563c4cee", - "reference": "2d69b6de67e2a3c0652d0c9dfcfda8b4563c4cee", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/6d16a8a015166fe54e22c042e0805c5363aef50d", + "reference": "6d16a8a015166fe54e22c042e0805c5363aef50d", "shasum": "" }, "require": { - "carbonphp/carbon-doctrine-types": "*", + "carbonphp/carbon-doctrine-types": "<100.0", "ext-json": "*", "php": "^8.1", "psr/clock": "^1.0", @@ -2020,13 +2202,13 @@ "require-dev": { "doctrine/dbal": "^3.6.3 || ^4.0", "doctrine/orm": "^2.15.2 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.52.1", + "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.10.65", - "phpunit/phpunit": "^10.5.15", + "phpstan/phpstan": "^1.11.2", + "phpunit/phpunit": "^10.5.20", "squizlabs/php_codesniffer": "^3.9.0" }, "bin": [ @@ -2034,10 +2216,6 @@ ], "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.x-dev", - "dev-2.x": "2.x-dev" - }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -2047,6 +2225,10 @@ "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-master": "3.x-dev" } }, "autoload": { @@ -2078,8 +2260,8 @@ ], "support": { "docs": "https://carbon.nesbot.com/docs", - "issues": "https://github.com/briannesbitt/Carbon/issues", - "source": "https://github.com/briannesbitt/Carbon" + "issues": "https://github.com/CarbonPHP/carbon/issues", + "source": "https://github.com/CarbonPHP/carbon" }, "funding": [ { @@ -2095,28 +2277,28 @@ "type": "tidelift" } ], - "time": "2024-03-28T12:59:49+00:00" + "time": "2025-03-27T12:57:33+00:00" }, { "name": "nette/schema", - "version": "v1.3.0", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188" + "reference": "da801d52f0354f70a638673c4a0f04e16529431d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/a6d3a6d1f545f01ef38e60f375d1cf1f4de98188", - "reference": "a6d3a6d1f545f01ef38e60f375d1cf1f4de98188", + "url": "https://api.github.com/repos/nette/schema/zipball/da801d52f0354f70a638673c4a0f04e16529431d", + "reference": "da801d52f0354f70a638673c4a0f04e16529431d", "shasum": "" }, "require": { "nette/utils": "^4.0", - "php": "8.1 - 8.3" + "php": "8.1 - 8.4" }, "require-dev": { - "nette/tester": "^2.4", + "nette/tester": "^2.5.2", "phpstan/phpstan-nette": "^1.0", "tracy/tracy": "^2.8" }, @@ -2155,26 +2337,26 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.3.0" + "source": "https://github.com/nette/schema/tree/v1.3.2" }, - "time": "2023-12-11T11:54:22+00:00" + "time": "2024-10-06T23:10:23+00:00" }, { "name": "nette/utils", - "version": "v4.0.4", + "version": "v4.0.6", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218" + "reference": "ce708655043c7050eb050df361c5e313cf708309" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/d3ad0aa3b9f934602cb3e3902ebccf10be34d218", - "reference": "d3ad0aa3b9f934602cb3e3902ebccf10be34d218", + "url": "https://api.github.com/repos/nette/utils/zipball/ce708655043c7050eb050df361c5e313cf708309", + "reference": "ce708655043c7050eb050df361c5e313cf708309", "shasum": "" }, "require": { - "php": ">=8.0 <8.4" + "php": "8.0 - 8.4" }, "conflict": { "nette/finder": "<3", @@ -2241,9 +2423,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.4" + "source": "https://github.com/nette/utils/tree/v4.0.6" }, - "time": "2024-01-17T16:50:36+00:00" + "time": "2025-03-30T21:06:30+00:00" }, { "name": "nikic/php-parser", @@ -2305,32 +2487,31 @@ }, { "name": "nunomaduro/termwind", - "version": "v2.0.1", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a" + "reference": "52915afe6a1044e8b9cee1bcff836fb63acf9cda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/58c4c58cf23df7f498daeb97092e34f5259feb6a", - "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/52915afe6a1044e8b9cee1bcff836fb63acf9cda", + "reference": "52915afe6a1044e8b9cee1bcff836fb63acf9cda", "shasum": "" }, "require": { "ext-mbstring": "*", "php": "^8.2", - "symfony/console": "^7.0.4" + "symfony/console": "^7.1.8" }, "require-dev": { - "ergebnis/phpstan-rules": "^2.2.0", - "illuminate/console": "^11.0.0", - "laravel/pint": "^1.14.0", - "mockery/mockery": "^1.6.7", - "pestphp/pest": "^2.34.1", - "phpstan/phpstan": "^1.10.59", - "phpstan/phpstan-strict-rules": "^1.5.2", - "symfony/var-dumper": "^7.0.4", + "illuminate/console": "^11.33.2", + "laravel/pint": "^1.18.2", + "mockery/mockery": "^1.6.12", + "pestphp/pest": "^2.36.0", + "phpstan/phpstan": "^1.12.11", + "phpstan/phpstan-strict-rules": "^1.6.1", + "symfony/var-dumper": "^7.1.8", "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", @@ -2373,7 +2554,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v2.0.1" + "source": "https://github.com/nunomaduro/termwind/tree/v2.3.0" }, "funding": [ { @@ -2389,20 +2570,20 @@ "type": "github" } ], - "time": "2024-03-06T16:17:14+00:00" + "time": "2024-11-21T10:39:51+00:00" }, { "name": "phpoption/phpoption", - "version": "1.9.2", + "version": "1.9.3", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820" + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820", - "reference": "80735db690fe4fc5c76dfa7f9b770634285fa820", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", + "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", "shasum": "" }, "require": { @@ -2410,13 +2591,13 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" }, "type": "library", "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "1.9-dev" @@ -2452,7 +2633,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.2" + "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" }, "funding": [ { @@ -2464,7 +2645,7 @@ "type": "tidelift" } ], - "time": "2023-11-12T21:59:55+00:00" + "time": "2024-07-20T21:41:07+00:00" }, { "name": "psr/clock", @@ -2671,20 +2852,20 @@ }, { "name": "psr/http-factory", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", "shasum": "" }, "require": { - "php": ">=7.0.0", + "php": ">=7.1", "psr/http-message": "^1.0 || ^2.0" }, "type": "library", @@ -2708,7 +2889,7 @@ "homepage": "https://www.php-fig.org/" } ], - "description": "Common interfaces for PSR-7 HTTP message factories", + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", "keywords": [ "factory", "http", @@ -2720,9 +2901,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + "source": "https://github.com/php-fig/http-factory" }, - "time": "2023-04-10T20:10:41+00:00" + "time": "2024-04-15T12:06:14+00:00" }, { "name": "psr/http-message", @@ -2779,16 +2960,16 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -2823,9 +3004,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "psr/simple-cache", @@ -3003,16 +3184,16 @@ }, { "name": "ramsey/collection", - "version": "2.0.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", - "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", "shasum": "" }, "require": { @@ -3020,25 +3201,22 @@ }, "require-dev": { "captainhook/plugin-composer": "^5.3", - "ergebnis/composer-normalize": "^2.28.3", - "fakerphp/faker": "^1.21", + "ergebnis/composer-normalize": "^2.45", + "fakerphp/faker": "^1.24", "hamcrest/hamcrest-php": "^2.0", - "jangregor/phpstan-prophecy": "^1.0", - "mockery/mockery": "^1.5", + "jangregor/phpstan-prophecy": "^2.1", + "mockery/mockery": "^1.6", "php-parallel-lint/php-console-highlighter": "^1.0", - "php-parallel-lint/php-parallel-lint": "^1.3", - "phpcsstandards/phpcsutils": "^1.0.0-rc1", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^1.9", - "phpstan/phpstan-mockery": "^1.1", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5", - "psalm/plugin-mockery": "^1.1", - "psalm/plugin-phpunit": "^0.18.4", - "ramsey/coding-standard": "^2.0.3", - "ramsey/conventional-commits": "^1.3", - "vimeo/psalm": "^5.4" + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpspec/prophecy-phpunit": "^2.3", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-mockery": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^10.5", + "ramsey/coding-standard": "^2.3", + "ramsey/conventional-commits": "^1.6", + "roave/security-advisories": "dev-latest" }, "type": "library", "extra": { @@ -3076,36 +3254,26 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.0.0" + "source": "https://github.com/ramsey/collection/tree/2.1.1" }, - "funding": [ - { - "url": "https://github.com/ramsey", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ramsey/collection", - "type": "tidelift" - } - ], - "time": "2022-12-31T21:50:55+00:00" + "time": "2025-03-22T05:38:12+00:00" }, { "name": "ramsey/uuid", - "version": "4.7.5", + "version": "4.7.6", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e" + "reference": "91039bc1faa45ba123c4328958e620d382ec7088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", - "reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088", + "reference": "91039bc1faa45ba123c4328958e620d382ec7088", "shasum": "" }, "require": { - "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11", + "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12", "ext-json": "*", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" @@ -3168,7 +3336,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.7.5" + "source": "https://github.com/ramsey/uuid/tree/4.7.6" }, "funding": [ { @@ -3180,7 +3348,7 @@ "type": "tidelift" } ], - "time": "2023-11-08T05:53:05+00:00" + "time": "2024-04-27T21:32:50+00:00" }, { "name": "spatie/db-dumper", @@ -3624,16 +3792,16 @@ }, { "name": "symfony/clock", - "version": "v7.0.5", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/clock.git", - "reference": "8b9d08887353d627d5f6c3bf3373b398b49051c2" + "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/clock/zipball/8b9d08887353d627d5f6c3bf3373b398b49051c2", - "reference": "8b9d08887353d627d5f6c3bf3373b398b49051c2", + "url": "https://api.github.com/repos/symfony/clock/zipball/b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", + "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", "shasum": "" }, "require": { @@ -3678,7 +3846,7 @@ "time" ], "support": { - "source": "https://github.com/symfony/clock/tree/v7.0.5" + "source": "https://github.com/symfony/clock/tree/v7.2.0" }, "funding": [ { @@ -3694,20 +3862,20 @@ "type": "tidelift" } ], - "time": "2024-03-02T12:46:12+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/console", - "version": "v7.0.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "6b099f3306f7c9c2d2786ed736d0026b2903205f" + "reference": "e51498ea18570c062e7df29d05a7003585b19b88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6b099f3306f7c9c2d2786ed736d0026b2903205f", - "reference": "6b099f3306f7c9c2d2786ed736d0026b2903205f", + "url": "https://api.github.com/repos/symfony/console/zipball/e51498ea18570c062e7df29d05a7003585b19b88", + "reference": "e51498ea18570c062e7df29d05a7003585b19b88", "shasum": "" }, "require": { @@ -3771,7 +3939,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.0.4" + "source": "https://github.com/symfony/console/tree/v7.2.5" }, "funding": [ { @@ -3787,20 +3955,20 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:20+00:00" + "time": "2025-03-12T08:11:12+00:00" }, { "name": "symfony/css-selector", - "version": "v7.0.3", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "ec60a4edf94e63b0556b6a0888548bb400a3a3be" + "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/ec60a4edf94e63b0556b6a0888548bb400a3a3be", - "reference": "ec60a4edf94e63b0556b6a0888548bb400a3a3be", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/601a5ce9aaad7bf10797e3663faefce9e26c24e2", + "reference": "601a5ce9aaad7bf10797e3663faefce9e26c24e2", "shasum": "" }, "require": { @@ -3836,7 +4004,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.0.3" + "source": "https://github.com/symfony/css-selector/tree/v7.2.0" }, "funding": [ { @@ -3852,20 +4020,20 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.4.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { @@ -3873,12 +4041,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.4-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -3903,7 +4071,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -3919,20 +4087,20 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/error-handler", - "version": "v7.0.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "677b24759decff69e65b1e9d1471d90f95ced880" + "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/677b24759decff69e65b1e9d1471d90f95ced880", - "reference": "677b24759decff69e65b1e9d1471d90f95ced880", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", + "reference": "102be5e6a8e4f4f3eb3149bcbfa33a80d1ee374b", "shasum": "" }, "require": { @@ -3978,7 +4146,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/v7.0.4" + "source": "https://github.com/symfony/error-handler/tree/v7.2.5" }, "funding": [ { @@ -3994,20 +4162,20 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:20+00:00" + "time": "2025-03-03T07:12:39+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v7.0.3", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e" + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/834c28d533dd0636f910909d01b9ff45cc094b5e", - "reference": "834c28d533dd0636f910909d01b9ff45cc094b5e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/910c5db85a5356d0fea57680defec4e99eb9c8c1", + "reference": "910c5db85a5356d0fea57680defec4e99eb9c8c1", "shasum": "" }, "require": { @@ -4058,7 +4226,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.0.3" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" }, "funding": [ { @@ -4074,20 +4242,20 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.4.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", - "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7642f5e970b672283b7823222ae8ef8bbc160b9f", + "reference": "7642f5e970b672283b7823222ae8ef8bbc160b9f", "shasum": "" }, "require": { @@ -4096,12 +4264,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.4-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -4134,7 +4302,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.5.1" }, "funding": [ { @@ -4150,20 +4318,20 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/finder", - "version": "v7.0.0", + "version": "v7.2.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56" + "reference": "87a71856f2f56e4100373e92529eed3171695cfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", - "reference": "6e5688d69f7cfc4ed4a511e96007e06c2d34ce56", + "url": "https://api.github.com/repos/symfony/finder/zipball/87a71856f2f56e4100373e92529eed3171695cfb", + "reference": "87a71856f2f56e4100373e92529eed3171695cfb", "shasum": "" }, "require": { @@ -4198,7 +4366,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.0.0" + "source": "https://github.com/symfony/finder/tree/v7.2.2" }, "funding": [ { @@ -4214,35 +4382,36 @@ "type": "tidelift" } ], - "time": "2023-10-31T17:59:56+00:00" + "time": "2024-12-30T19:00:17+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.0.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "439fdfdd344943254b1ef6278613e79040548045" + "reference": "371272aeb6286f8135e028ca535f8e4d6f114126" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/439fdfdd344943254b1ef6278613e79040548045", - "reference": "439fdfdd344943254b1ef6278613e79040548045", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/371272aeb6286f8135e028ca535f8e4d6f114126", + "reference": "371272aeb6286f8135e028ca535f8e4d6f114126", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3.0", "symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-php83": "^1.27" }, "conflict": { "doctrine/dbal": "<3.6", - "symfony/cache": "<6.4" + "symfony/cache": "<6.4.12|>=7.0,<7.1.5" }, "require-dev": { "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.4|^7.0", + "symfony/cache": "^6.4.12|^7.1.5", "symfony/dependency-injection": "^6.4|^7.0", "symfony/expression-language": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", @@ -4275,7 +4444,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.0.4" + "source": "https://github.com/symfony/http-foundation/tree/v7.2.5" }, "funding": [ { @@ -4291,25 +4460,26 @@ "type": "tidelift" } ], - "time": "2024-02-08T19:22:56+00:00" + "time": "2025-03-25T15:54:33+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.0.5", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72" + "reference": "b1fe91bc1fa454a806d3f98db4ba826eb9941a54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72", - "reference": "37c24ca28f65e3121a68f3dd4daeb36fb1fa2a72", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b1fe91bc1fa454a806d3f98db4ba826eb9941a54", + "reference": "b1fe91bc1fa454a806d3f98db4ba826eb9941a54", "shasum": "" }, "require": { "php": ">=8.2", "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^6.4|^7.0", "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", @@ -4332,7 +4502,7 @@ "symfony/twig-bridge": "<6.4", "symfony/validator": "<6.4", "symfony/var-dumper": "<6.4", - "twig/twig": "<3.0.4" + "twig/twig": "<3.12" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" @@ -4350,16 +4520,17 @@ "symfony/finder": "^6.4|^7.0", "symfony/http-client-contracts": "^2.5|^3", "symfony/process": "^6.4|^7.0", - "symfony/property-access": "^6.4|^7.0", + "symfony/property-access": "^7.1", "symfony/routing": "^6.4|^7.0", - "symfony/serializer": "^6.4.4|^7.0.4", + "symfony/serializer": "^7.1", "symfony/stopwatch": "^6.4|^7.0", "symfony/translation": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3", "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0", "symfony/var-exporter": "^6.4|^7.0", - "twig/twig": "^3.0.4" + "twig/twig": "^3.12" }, "type": "library", "autoload": { @@ -4387,7 +4558,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/v7.0.5" + "source": "https://github.com/symfony/http-kernel/tree/v7.2.5" }, "funding": [ { @@ -4403,20 +4574,20 @@ "type": "tidelift" } ], - "time": "2024-03-04T21:05:24+00:00" + "time": "2025-03-28T13:32:50+00:00" }, { "name": "symfony/mailer", - "version": "v7.0.4", + "version": "v7.2.3", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "72e16d87bf50a3ce195b9470c06bb9d7b816ea85" + "reference": "f3871b182c44997cf039f3b462af4a48fb85f9d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/72e16d87bf50a3ce195b9470c06bb9d7b816ea85", - "reference": "72e16d87bf50a3ce195b9470c06bb9d7b816ea85", + "url": "https://api.github.com/repos/symfony/mailer/zipball/f3871b182c44997cf039f3b462af4a48fb85f9d3", + "reference": "f3871b182c44997cf039f3b462af4a48fb85f9d3", "shasum": "" }, "require": { @@ -4425,7 +4596,7 @@ "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", "symfony/event-dispatcher": "^6.4|^7.0", - "symfony/mime": "^6.4|^7.0", + "symfony/mime": "^7.2", "symfony/service-contracts": "^2.5|^3" }, "conflict": { @@ -4467,7 +4638,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.0.4" + "source": "https://github.com/symfony/mailer/tree/v7.2.3" }, "funding": [ { @@ -4483,20 +4654,20 @@ "type": "tidelift" } ], - "time": "2024-02-03T21:34:19+00:00" + "time": "2025-01-27T11:08:17+00:00" }, { "name": "symfony/mime", - "version": "v7.0.3", + "version": "v7.2.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716" + "reference": "87ca22046b78c3feaff04b337f33b38510fd686b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716", - "reference": "c1ffe24ba6fdc3e3f0f3fcb93519103b326a3716", + "url": "https://api.github.com/repos/symfony/mime/zipball/87ca22046b78c3feaff04b337f33b38510fd686b", + "reference": "87ca22046b78c3feaff04b337f33b38510fd686b", "shasum": "" }, "require": { @@ -4509,16 +4680,17 @@ "phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/type-resolver": "<1.4.0", "symfony/mailer": "<6.4", - "symfony/serializer": "<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": "^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|^7.0" + "symfony/serializer": "^6.4.3|^7.0.3" }, "type": "library", "autoload": { @@ -4550,7 +4722,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.0.3" + "source": "https://github.com/symfony/mime/tree/v7.2.4" }, "funding": [ { @@ -4566,24 +4738,24 @@ "type": "tidelift" } ], - "time": "2024-01-30T08:34:29+00:00" + "time": "2025-02-19T08:51:20+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ef4d7e442ca910c4764bce785146269b30cb5fc4", - "reference": "ef4d7e442ca910c4764bce785146269b30cb5fc4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -4594,8 +4766,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4629,7 +4801,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -4645,24 +4817,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/32a9da87d7b3245e09ac426c83d334ae9f06f80f", - "reference": "32a9da87d7b3245e09ac426c83d334ae9f06f80f", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -4670,8 +4842,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4707,7 +4879,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -4723,26 +4895,25 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a287ed7475f85bf6f61890146edbc932c0fff919" + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a287ed7475f85bf6f61890146edbc932c0fff919", - "reference": "a287ed7475f85bf6f61890146edbc932c0fff919", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -4750,8 +4921,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4791,7 +4962,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" }, "funding": [ { @@ -4807,24 +4978,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/bc45c394692b948b4d383a08d7753968bed9a83d", - "reference": "bc45c394692b948b4d383a08d7753968bed9a83d", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -4832,8 +5003,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4872,7 +5043,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -4888,24 +5059,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -4916,8 +5087,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -4952,80 +5123,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" - }, - "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-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "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": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -5041,30 +5139,30 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5105,7 +5203,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -5121,31 +5219,30 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "86fcae159633351e5fd145d1c47de6c528f8caff" + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/86fcae159633351e5fd145d1c47de6c528f8caff", - "reference": "86fcae159633351e5fd145d1c47de6c528f8caff", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-php80": "^1.14" + "php": ">=7.2" }, "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5182,7 +5279,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" }, "funding": [ { @@ -5198,24 +5295,24 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-uuid", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853" + "reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/3abdd21b0ceaa3000ee950097bc3cf9efc137853", - "reference": "3abdd21b0ceaa3000ee950097bc3cf9efc137853", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/21533be36c24be3f4b1669c4725c7d1d2bab4ae2", + "reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-uuid": "*" @@ -5226,8 +5323,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -5261,7 +5358,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.31.0" }, "funding": [ { @@ -5277,20 +5374,20 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", - "version": "v7.0.4", + "version": "v7.2.5", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9" + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/0e7727191c3b71ebec6d529fa0e50a01ca5679e9", - "reference": "0e7727191c3b71ebec6d529fa0e50a01ca5679e9", + "url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d", + "reference": "87b7c93e57df9d8e39a093d32587702380ff045d", "shasum": "" }, "require": { @@ -5322,7 +5419,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.0.4" + "source": "https://github.com/symfony/process/tree/v7.2.5" }, "funding": [ { @@ -5338,20 +5435,20 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:20+00:00" + "time": "2025-03-13T12:21:46+00:00" }, { "name": "symfony/routing", - "version": "v7.0.5", + "version": "v7.2.3", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19" + "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19", - "reference": "ba6bf07d43289c6a4b4591ddb75bc3bc5f069c19", + "url": "https://api.github.com/repos/symfony/routing/zipball/ee9a67edc6baa33e5fae662f94f91fd262930996", + "reference": "ee9a67edc6baa33e5fae662f94f91fd262930996", "shasum": "" }, "require": { @@ -5403,7 +5500,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.0.5" + "source": "https://github.com/symfony/routing/tree/v7.2.3" }, "funding": [ { @@ -5419,37 +5516,38 @@ "type": "tidelift" } ], - "time": "2024-02-27T12:34:35+00:00" + "time": "2025-01-17T10:56:55+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.4.1", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/fe07cbc8d837f60caf7018068e350cc5163681a0", - "reference": "fe07cbc8d837f60caf7018068e350cc5163681a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { "php": ">=8.1", - "psr/container": "^1.1|^2.0" + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" }, "conflict": { "ext-psr": "<1.1|>=2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.4-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -5485,7 +5583,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -5501,20 +5599,20 @@ "type": "tidelift" } ], - "time": "2023-12-26T14:02:43+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/string", - "version": "v7.0.4", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b" + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/f5832521b998b0bec40bee688ad5de98d4cf111b", - "reference": "f5832521b998b0bec40bee688ad5de98d4cf111b", + "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", "shasum": "" }, "require": { @@ -5528,6 +5626,7 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { + "symfony/emoji": "^7.1", "symfony/error-handler": "^6.4|^7.0", "symfony/http-client": "^6.4|^7.0", "symfony/intl": "^6.4|^7.0", @@ -5571,7 +5670,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.0.4" + "source": "https://github.com/symfony/string/tree/v7.2.0" }, "funding": [ { @@ -5587,24 +5686,25 @@ "type": "tidelift" } ], - "time": "2024-02-01T13:17:36+00:00" + "time": "2024-11-13T13:31:26+00:00" }, { "name": "symfony/translation", - "version": "v7.0.4", + "version": "v7.2.4", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "5b75e872f7d135d7abb4613809fadc8d9f3d30a0" + "reference": "283856e6981286cc0d800b53bd5703e8e363f05a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/5b75e872f7d135d7abb4613809fadc8d9f3d30a0", - "reference": "5b75e872f7d135d7abb4613809fadc8d9f3d30a0", + "url": "https://api.github.com/repos/symfony/translation/zipball/283856e6981286cc0d800b53bd5703e8e363f05a", + "reference": "283856e6981286cc0d800b53bd5703e8e363f05a", "shasum": "" }, "require": { "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.5|^3.0" }, @@ -5665,7 +5765,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v7.0.4" + "source": "https://github.com/symfony/translation/tree/v7.2.4" }, "funding": [ { @@ -5681,20 +5781,20 @@ "type": "tidelift" } ], - "time": "2024-02-22T20:27:20+00:00" + "time": "2025-02-13T10:27:23+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.4.1", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "06450585bf65e978026bda220cdebca3f867fde7" + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/06450585bf65e978026bda220cdebca3f867fde7", - "reference": "06450585bf65e978026bda220cdebca3f867fde7", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", + "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", "shasum": "" }, "require": { @@ -5702,12 +5802,12 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.4-dev" - }, "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.5-dev" } }, "autoload": { @@ -5743,7 +5843,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.4.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" }, "funding": [ { @@ -5759,20 +5859,20 @@ "type": "tidelift" } ], - "time": "2023-12-26T14:02:43+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/uid", - "version": "v7.0.3", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "87cedaf3fabd7b733859d4d77aa4ca598259054b" + "reference": "2d294d0c48df244c71c105a169d0190bfb080426" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/87cedaf3fabd7b733859d4d77aa4ca598259054b", - "reference": "87cedaf3fabd7b733859d4d77aa4ca598259054b", + "url": "https://api.github.com/repos/symfony/uid/zipball/2d294d0c48df244c71c105a169d0190bfb080426", + "reference": "2d294d0c48df244c71c105a169d0190bfb080426", "shasum": "" }, "require": { @@ -5817,7 +5917,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v7.0.3" + "source": "https://github.com/symfony/uid/tree/v7.2.0" }, "funding": [ { @@ -5833,20 +5933,20 @@ "type": "tidelift" } ], - "time": "2024-01-23T15:02:46+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.0.4", + "version": "v7.2.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "e03ad7c1535e623edbb94c22cc42353e488c6670" + "reference": "82b478c69745d8878eb60f9a049a4d584996f73a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e03ad7c1535e623edbb94c22cc42353e488c6670", - "reference": "e03ad7c1535e623edbb94c22cc42353e488c6670", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/82b478c69745d8878eb60f9a049a4d584996f73a", + "reference": "82b478c69745d8878eb60f9a049a4d584996f73a", "shasum": "" }, "require": { @@ -5862,7 +5962,7 @@ "symfony/http-kernel": "^6.4|^7.0", "symfony/process": "^6.4|^7.0", "symfony/uid": "^6.4|^7.0", - "twig/twig": "^3.0.4" + "twig/twig": "^3.12" }, "bin": [ "Resources/bin/var-dump-server" @@ -5900,7 +6000,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.0.4" + "source": "https://github.com/symfony/var-dumper/tree/v7.2.3" }, "funding": [ { @@ -5916,35 +6016,37 @@ "type": "tidelift" } ], - "time": "2024-02-15T11:33:06+00:00" + "time": "2025-01-17T11:39:41+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "v2.2.7", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb" + "reference": "0d72ac1c00084279c1816675284073c5a337c20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/83ee6f38df0a63106a9e4536e3060458b74ccedb", - "reference": "83ee6f38df0a63106a9e4536e3060458b74ccedb", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0d72ac1c00084279c1816675284073c5a337c20d", + "reference": "0d72ac1c00084279c1816675284073c5a337c20d", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", - "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" + "php": "^7.4 || ^8.0", + "symfony/css-selector": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5 || ^8.5.21 || ^9.5.10" + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpunit/phpunit": "^8.5.21 || ^9.5.10" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -5967,29 +6069,29 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.2.7" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/v2.3.0" }, - "time": "2023-12-08T13:03:43+00:00" + "time": "2024-12-21T16:25:41+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.6.0", + "version": "v5.6.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4" + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", - "reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", + "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.2", + "graham-campbell/result-type": "^1.1.3", "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.2", + "phpoption/phpoption": "^1.9.3", "symfony/polyfill-ctype": "^1.24", "symfony/polyfill-mbstring": "^1.24", "symfony/polyfill-php80": "^1.24" @@ -6006,7 +6108,7 @@ "extra": { "bamarni-bin": { "bin-links": true, - "forward-command": true + "forward-command": false }, "branch-alias": { "dev-master": "5.6-dev" @@ -6041,7 +6143,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" }, "funding": [ { @@ -6053,20 +6155,20 @@ "type": "tidelift" } ], - "time": "2023-11-12T22:43:29+00:00" + "time": "2024-07-20T21:52:34+00:00" }, { "name": "voku/portable-ascii", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "b56450eed252f6801410d810c8e1727224ae0743" + "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", - "reference": "b56450eed252f6801410d810c8e1727224ae0743", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b1d923f88091c6bf09699efcd7c8a1b1bfd7351d", + "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d", "shasum": "" }, "require": { @@ -6091,7 +6193,7 @@ "authors": [ { "name": "Lars Moelleken", - "homepage": "http://www.moelleken.org/" + "homepage": "https://www.moelleken.org/" } ], "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", @@ -6103,7 +6205,7 @@ ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/2.0.1" + "source": "https://github.com/voku/portable-ascii/tree/2.0.3" }, "funding": [ { @@ -6127,7 +6229,7 @@ "type": "tidelift" } ], - "time": "2022-03-08T17:03:00+00:00" + "time": "2024-11-21T01:49:47+00:00" }, { "name": "webmozart/assert", @@ -6768,29 +6870,30 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.3", + "version": "1.1.5", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab" + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", - "reference": "dfbaa3c2d2e9a9df1118213f3b8b0c597bb99fab", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", + "reference": "459c2f5dd3d6a4633d3b5f46ee2b1c40f57d3f38", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=13" + }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "1.4.10 || 1.10.15", - "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "psalm/plugin-phpunit": "0.18.4", - "psr/log": "^1 || ^2 || ^3", - "vimeo/psalm": "4.30.0 || 5.12.0" + "doctrine/coding-standard": "^9 || ^12 || ^13", + "phpstan/phpstan": "1.4.10 || 2.1.11", + "phpstan/phpstan-phpunit": "^1.0 || ^2", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12", + "psr/log": "^1 || ^2 || ^3" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -6798,7 +6901,7 @@ "type": "library", "autoload": { "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + "Doctrine\\Deprecations\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -6809,9 +6912,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.3" + "source": "https://github.com/doctrine/deprecations/tree/1.1.5" }, - "time": "2024-01-30T19:34:25+00:00" + "time": "2025-04-07T20:06:18+00:00" }, { "name": "dragon-code/contracts", @@ -10707,26 +10810,26 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.29.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d" + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/c565ad1e63f30e7477fc40738343c62b40bc672d", - "reference": "c565ad1e63f30e7477fc40738343c62b40bc672d", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", + "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -10763,7 +10866,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.29.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" }, "funding": [ { @@ -10779,7 +10882,7 @@ "type": "tidelift" } ], - "time": "2024-01-29T20:11:03+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/stopwatch", diff --git a/config/app.php b/config/app.php index c821117..1bade71 100644 --- a/config/app.php +++ b/config/app.php @@ -138,9 +138,9 @@ | */ - 'xsecure_enabled' => (bool) env('XSECURITY_ENABLED', false), - 'xsecure_secret' => env('XSECURITY_SECRET'), - 'xsecure_token' => env('XSECURITY_TOKEN'), + 'xsecure_enabled' => (bool) env('XSECURITY_ENABLED', false), + 'xsecure_secret' => env('XSECURITY_SECRET'), + 'xsecure_token' => env('XSECURITY_TOKEN'), /* |-------------------------------------------------------------------------- diff --git a/config/auth.php b/config/auth.php index 9c4f962..4b4afae 100644 --- a/config/auth.php +++ b/config/auth.php @@ -42,7 +42,7 @@ ], 'sanctum' => [ 'driver' => 'sanctum', - 'provider' => 'users' + 'provider' => 'users', ], ], diff --git a/config/broadcasting.php b/config/broadcasting.php index 2410485..c9c89ca 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -37,7 +37,7 @@ 'app_id' => env('PUSHER_APP_ID'), 'options' => [ 'cluster' => env('PUSHER_APP_CLUSTER'), - 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', + 'host' => env('PUSHER_HOST') ?: 'api-' . env('PUSHER_APP_CLUSTER', 'mt1') . '.pusher.com', 'port' => env('PUSHER_PORT', 443), 'scheme' => env('PUSHER_SCHEME', 'https'), 'encrypted' => true, diff --git a/config/cache.php b/config/cache.php index d4171e2..5115f18 100644 --- a/config/cache.php +++ b/config/cache.php @@ -106,6 +106,6 @@ | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'), ]; diff --git a/config/constants.php b/config/constants.php index e61d879..b7df6b9 100644 --- a/config/constants.php +++ b/config/constants.php @@ -1,5 +1,5 @@ 'sanctum', + 'GUARD_NAME' => 'sanctum', ]; diff --git a/config/database.php b/config/database.php index 137ad18..535cd52 100644 --- a/config/database.php +++ b/config/database.php @@ -125,7 +125,7 @@ 'options' => [ 'cluster' => env('REDIS_CLUSTER', 'redis'), - 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), + 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_database_'), ], 'default' => [ diff --git a/config/envs.php b/config/envs.php index fc4d386..2440458 100644 --- a/config/envs.php +++ b/config/envs.php @@ -1,6 +1,6 @@ env('APP_BASE_URL'), - 'sms_token' => env('SMS_TOKEN'), + 'base_url' => env('APP_BASE_URL'), + 'sms_token' => env('SMS_TOKEN'), ]; diff --git a/config/filesystems.php b/config/filesystems.php index 8d37998..d8d5251 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -39,7 +39,7 @@ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/storage', + 'url' => env('APP_URL') . '/storage', 'visibility' => 'public', 'throw' => false, ], @@ -47,7 +47,7 @@ 'health' => [ 'driver' => 'local', 'root' => storage_path('app/health'), - 'url' => env('APP_URL').'/storage', + 'url' => env('APP_URL') . '/storage', 'visibility' => 'public', 'throw' => false, ], diff --git a/config/logging.php b/config/logging.php index 767e7c6..14bc641 100644 --- a/config/logging.php +++ b/config/logging.php @@ -91,7 +91,7 @@ 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), - 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'), ], 'processors' => [PsrLogMessageProcessor::class], ], diff --git a/config/session.php b/config/session.php index 8fed97c..1b99f22 100644 --- a/config/session.php +++ b/config/session.php @@ -128,7 +128,7 @@ 'cookie' => env( 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_').'_session' + Str::slug(env('APP_NAME', 'laravel'), '_') . '_session' ), /* diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 0b7a136..42ed8ac 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -34,9 +34,7 @@ public function definition(): array ]; } - /** - * Indicate that the model's email address should be unverified. - */ + /** Indicate that the model's email address should be unverified. */ public function unverified(): static { return $this->state(fn (array $attributes) => [ 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 8aa6a1c..63bf47e 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -4,10 +4,9 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Run the migrations. - */ +return new class extends Migration +{ + /** Run the migrations. */ public function up(): void { Schema::create('users', function (Blueprint $table) { @@ -36,9 +35,7 @@ public function up(): void }); } - /** - * Reverse the migrations. - */ + /** Reverse the migrations. */ public function down(): void { Schema::dropIfExists('users'); diff --git a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php index 1bc0eee..7ef4ac4 100644 --- a/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php +++ b/database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php @@ -4,10 +4,9 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Run the migrations. - */ +return new class extends Migration +{ + /** Run the migrations. */ public function up(): void { Schema::create('password_reset_tokens', function (Blueprint $table) { @@ -17,9 +16,7 @@ public function up(): void }); } - /** - * Reverse the migrations. - */ + /** Reverse the migrations. */ public function down(): void { Schema::dropIfExists('password_reset_tokens'); 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 440f474..fcacb80 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,7 +4,8 @@ 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/2018_08_08_100000_create_telescope_entries_table.php b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php index 2c66941..b94db17 100644 --- a/database/migrations/2018_08_08_100000_create_telescope_entries_table.php +++ b/database/migrations/2018_08_08_100000_create_telescope_entries_table.php @@ -4,18 +4,15 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Get the migration connection name. - */ - public function getConnection(): string|null +return new class extends Migration +{ + /** Get the migration connection name. */ + public function getConnection(): ?string { return config('telescope.storage.database.connection'); } - /** - * Run the migrations. - */ + /** Run the migrations. */ public function up(): void { $schema = Schema::connection($this->getConnection()); @@ -45,9 +42,9 @@ public function up(): void $table->index('tag'); $table->foreign('entry_uuid') - ->references('uuid') - ->on('telescope_entries') - ->onDelete('cascade'); + ->references('uuid') + ->on('telescope_entries') + ->onDelete('cascade'); }); $schema->create('telescope_monitoring', function (Blueprint $table) { @@ -55,9 +52,7 @@ public function up(): void }); } - /** - * Reverse the migrations. - */ + /** Reverse the migrations. */ public function down(): void { $schema = Schema::connection($this->getConnection()); 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 51aaa6f..3b42b80 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,10 +4,9 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Run the migrations. - */ +return new class extends Migration +{ + /** Run the migrations. */ public function up(): void { Schema::create('failed_jobs', function (Blueprint $table) { @@ -21,9 +20,7 @@ public function up(): void }); } - /** - * Reverse the migrations. - */ + /** Reverse the migrations. */ public function down(): void { Schema::dropIfExists('failed_jobs'); 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 82dbff5..5abbc7f 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,10 +4,9 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Run the migrations. - */ +return new class extends Migration +{ + /** Run the migrations. */ public function up(): void { Schema::create('personal_access_tokens', function (Blueprint $table) { @@ -22,9 +21,7 @@ public function up(): void }); } - /** - * Reverse the migrations. - */ + /** Reverse the migrations. */ public function down(): void { Schema::dropIfExists('personal_access_tokens'); diff --git a/database/migrations/2023_10_01_052437_create_jobs_table.php b/database/migrations/2023_10_01_052437_create_jobs_table.php index 7a5df54..bae8d9d 100644 --- a/database/migrations/2023_10_01_052437_create_jobs_table.php +++ b/database/migrations/2023_10_01_052437_create_jobs_table.php @@ -4,10 +4,9 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Run the migrations. - */ +return new class extends Migration +{ + /** Run the migrations. */ public function up(): void { Schema::create('jobs', function (Blueprint $table) { @@ -21,9 +20,7 @@ public function up(): void }); } - /** - * Reverse the migrations. - */ + /** Reverse the migrations. */ public function down(): void { Schema::dropIfExists('jobs'); diff --git a/database/migrations/2023_11_06_113844_create_permission_tables.php b/database/migrations/2023_11_06_113844_create_permission_tables.php index 353b698..b1f3919 100644 --- a/database/migrations/2023_11_06_113844_create_permission_tables.php +++ b/database/migrations/2023_11_06_113844_create_permission_tables.php @@ -4,10 +4,9 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration { - /** - * Run the migrations. - */ +return new class extends Migration +{ + /** Run the migrations. */ public function up(): void { $teams = config('permission.teams'); @@ -126,9 +125,7 @@ public function up(): void ->forget(config('permission.cache.key')); } - /** - * Reverse the migrations. - */ + /** Reverse the migrations. */ public function down(): void { $tableNames = config('permission.table_names'); diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index c89aa6f..e3483b8 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -7,9 +7,7 @@ class DatabaseSeeder extends Seeder { - /** - * Seed the application's database. - */ + /** Seed the application's database. */ public function run(): void { // \App\Models\User::factory(10)->create(); diff --git a/database/seeders/PermissionSeeder.php b/database/seeders/PermissionSeeder.php index 8f9e847..763aa18 100644 --- a/database/seeders/PermissionSeeder.php +++ b/database/seeders/PermissionSeeder.php @@ -9,9 +9,8 @@ class PermissionSeeder extends Seeder { use RolePermissionTrait; - /** - * Run the database seeds. - */ + + /** Run the database seeds. */ public function run(): void { $permissions = [ diff --git a/database/seeders/RoleSeeder.php b/database/seeders/RoleSeeder.php index e348bd2..49bc201 100644 --- a/database/seeders/RoleSeeder.php +++ b/database/seeders/RoleSeeder.php @@ -11,10 +11,9 @@ class RoleSeeder extends Seeder { use RolePermissionTrait; - private $guard = "sanctum"; - /** - * Run the database seeds. - */ + private $guard = 'sanctum'; + + /** Run the database seeds. */ public function run(): void { // Reset cached roles and permissions @@ -22,14 +21,14 @@ public function run(): void $superAdmin = Role::create([ 'guard_name' => config('constants.GUARD_NAME'), - 'name' => UserRole::SUPER_ADMIN + 'name' => UserRole::SUPER_ADMIN, ]); $superAdmin->givePermissionTo(Permission::all()); - $admin =Role::create([ + $admin = Role::create([ 'guard_name' => config('constants.GUARD_NAME'), - 'name' => UserRole::ADMIN + 'name' => UserRole::ADMIN, ]); $admin->givePermissionTo([ 'role.view.all', @@ -38,7 +37,7 @@ public function run(): void Role::create([ 'guard_name' => config('constants.GUARD_NAME'), - 'name' => UserRole::USER + 'name' => UserRole::USER, ]); } } diff --git a/database/seeders/UserSeeder.php b/database/seeders/UserSeeder.php index ce72d25..feca0e7 100644 --- a/database/seeders/UserSeeder.php +++ b/database/seeders/UserSeeder.php @@ -12,7 +12,6 @@ class UserSeeder extends Seeder { - /** * The current Faker instance. * @@ -20,16 +19,6 @@ class UserSeeder extends Seeder */ protected $faker; - /** - * Get a new Faker instance. - * - * @return \Faker\Generator - */ - protected function withFaker() - { - return Container::getInstance()->make(Generator::class); - } - /** * Create a new seeder instance. * @@ -40,15 +29,13 @@ public function __construct() $this->faker = $this->withFaker(); } - /** - * Run the database seeds. - */ + /** Run the database seeds. */ public function run(): void { //superadmin $superAdmin = new User(); - $superAdmin->name = $this->faker->firstName. ' '. $this->faker->lastName; + $superAdmin->name = $this->faker->firstName . ' ' . $this->faker->lastName; $superAdmin->user_name = 'super.admin'; $superAdmin->email = 'superadmin@ims.com'; $superAdmin->email_verified_at = now(); @@ -61,4 +48,14 @@ public function run(): void $superAdmin->assignRole(UserRole::SUPER_ADMIN); } + + /** + * Get a new Faker instance. + * + * @return \Faker\Generator + */ + protected function withFaker() + { + return Container::getInstance()->make(Generator::class); + } } diff --git a/ims-api-starter.postman_collection.json b/ims-laravel-api-starter.postman_collection.json similarity index 96% rename from ims-api-starter.postman_collection.json rename to ims-laravel-api-starter.postman_collection.json index 47fdd9b..628b653 100644 --- a/ims-api-starter.postman_collection.json +++ b/ims-laravel-api-starter.postman_collection.json @@ -1,7 +1,7 @@ { "info": { "_postman_id": "164d39b6-556a-4626-bbd4-25a5f1546520", - "name": "ims-api-starter", + "name": "ims-laravel-api-starter", "description": "# IMS-API-STARTER API Documentation\n\n## Introduction\n\nProvide a brief introduction to the ims-api-starter API.", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "29444436", @@ -51,6 +51,9 @@ { "name": "Login", "request": { + "auth": { + "type": "noauth" + }, "method": "POST", "header": [ { @@ -63,24 +66,13 @@ } ], "body": { - "mode": "formdata", - "formdata": [ - { - "key": "email", - "value": "superadmin@ims.com", - "type": "text" - }, - { - "key": "password", - "value": "123456", - "type": "text" - }, - { - "key": "device", - "value": "Redmi Note 11", - "type": "text" + "mode": "raw", + "raw": "{\r\n \"email\": \"superadmin@ims.com\",\r\n \"password\": \"123456\",\r\n \"device\": \"samsung\"\r\n}", + "options": { + "raw": { + "language": "json" } - ] + } }, "url": { "raw": "{{base_url}}/api/v1/login", @@ -303,7 +295,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"name\": \"Test Role 8\",\r\n \"permissions\": [\r\n 1,2,3\r\n ]\r\n}", + "raw": "{\r\n \"name\": \"Test Role 9\",\r\n \"permissions\": [\r\n 1,2,3\r\n ]\r\n}", "options": { "raw": { "language": "json" @@ -337,7 +329,7 @@ } ] }, - "method": "POST", + "method": "PATCH", "header": [ { "key": "Accept", @@ -349,22 +341,16 @@ } ], "body": { - "mode": "formdata", - "formdata": [ - { - "key": "id", - "value": "4", - "type": "text" - }, - { - "key": "name", - "value": "sdasadsdad", - "type": "text" + "mode": "raw", + "raw": "{\r\n \"name\": \"Role Update\"\r\n}", + "options": { + "raw": { + "language": "json" } - ] + } }, "url": { - "raw": "{{base_url}}/api/v1/role/update", + "raw": "{{base_url}}/api/v1/role/:id", "host": [ "{{base_url}}" ], @@ -372,7 +358,13 @@ "api", "v1", "role", - "update" + ":id" + ], + "variable": [ + { + "key": "id", + "value": "5" + } ] } }, @@ -826,7 +818,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"name\": \"John Doe\",\r\n \"email\": \"john54451.doe@example.com\",\r\n \"password\": \"password123\",\r\n \"password_confirmation\": \"password123\",\r\n \"phone\": \"15134517590\",\r\n \"designation\": \"Software Engineer\",\r\n \"address\": \"123 Main Street, City, Country\",\r\n \"roles\": [2,3]\r\n}", + "raw": "{\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"name\": \"John Doe\",\r\n \"email\": \"john12.doe2@example.com\",\r\n \"password\": \"password123\",\r\n \"password_confirmation\": \"password123\",\r\n \"phone\": \"154517550\",\r\n \"designation\": \"Software Engineer\",\r\n \"address\": \"123 Main Street, City, Country\",\r\n \"roles\": [2,3]\r\n}", "options": { "raw": { "language": "json" @@ -1063,7 +1055,7 @@ } ] }, - "method": "POST", + "method": "PATCH", "header": [ { "key": "Accept", @@ -1072,7 +1064,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"id\": 10,\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"name\": \"John Doe\",\r\n \"email\": \"john.doe@example.com\",\r\n \"phone\": \"1345677890\",\r\n \"designation\": \"Software Engineer 2\",\r\n \"address\": \"123 Main Street, City, Country\",\r\n \"is_active\": 1\r\n}", + "raw": "{\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"name\": \"John Doe\",\r\n \"email\": \"john.doe22@example.com\",\r\n \"phone\": \"1345677822\",\r\n \"designation\": \"Software Engineer 2\",\r\n \"address\": \"123 Main Street, City, Country\",\r\n \"is_active\": 0\r\n}", "options": { "raw": { "language": "json" @@ -1080,7 +1072,7 @@ } }, "url": { - "raw": "{{base_url}}/api/v1/user/update", + "raw": "{{base_url}}/api/v1/user/:id", "host": [ "{{base_url}}" ], @@ -1088,7 +1080,13 @@ "api", "v1", "user", - "update" + ":id" + ], + "variable": [ + { + "key": "id", + "value": "6" + } ] } }, @@ -1319,7 +1317,7 @@ } ] }, - "method": "POST", + "method": "PATCH", "header": [ { "key": "Accept", diff --git a/lang/bn/auth.php b/lang/bn/auth.php index a53b81f..d222ffe 100644 --- a/lang/bn/auth.php +++ b/lang/bn/auth.php @@ -3,7 +3,7 @@ declare(strict_types=1); return [ - 'failed' => 'এই পরিচয়পত্র আমাদের রেকর্ডের সাথে মেলে না।', + 'failed' => 'এই পরিচয়পত্র আমাদের রেকর্ডের সাথে মেলে না।', 'password' => 'পাসওয়ার্ড ভুল।', 'throttle' => 'লগইন করার জন্য অনেকবার চেষ্টা করেছেন, :seconds সেকেন্ড পরে পুনরায় চেষ্টা করুন।', ]; diff --git a/lang/bn/http-statuses.php b/lang/bn/http-statuses.php index d2c769a..dbcfaaa 100644 --- a/lang/bn/http-statuses.php +++ b/lang/bn/http-statuses.php @@ -3,82 +3,82 @@ declare(strict_types=1); return [ - '0' => 'অজানা ত্রুটি', - '100' => 'চালিয়ে যান', - '101' => 'স্যুইচিং প্রোটোকল', - '102' => 'প্রক্রিয়াকরণ', - '200' => 'ঠিক আছে', - '201' => 'তৈরি হয়েছে', - '202' => 'গৃহীত', - '203' => 'অ-অনুমোদিত তথ্য', - '204' => 'কোন উপাদান নেই', - '205' => 'কন্টেন্ট রিসেট করুন', - '206' => 'আংশিক বিষয়বস্তু', - '207' => 'মাল্টি-স্ট্যাটাস', - '208' => 'ইতিমধ্যে রিপোর্ট করা হয়েছে', - '226' => 'আমি ব্যবহৃত', - '300' => 'একাধিক পছন্দ', - '301' => 'স্থায়ীভাবে স্থানান্তরিত', - '302' => 'পাওয়া গেছে', - '303' => 'অন্যান্য দেখুন', - '304' => 'সংশোধিত নয়', - '305' => 'ব্যবহার প্রক্সি', - '307' => 'অস্থায়ী পুনঃনির্দেশ', - '308' => 'স্থায়ী পুনর্নির্দেশ', - '400' => 'খারাপ অনুরোধ', - '401' => 'অননুমোদিত', - '402' => 'অর্থপ্রদান আবশ্যক', - '403' => 'নিষিদ্ধ', - '404' => 'পাওয়া যায়নি', - '405' => 'পদ্ধতি অনুমতি নেই', - '406' => 'গ্রহণযোগ্য নয়', - '407' => 'প্রক্সি প্রমাণীকরণ প্রয়োজন', - '408' => 'অনুরোধের সময়সীমা শেষ', - '409' => 'দ্বন্দ্ব', - '410' => 'সর্বস্বান্ত', - '411' => 'দৈর্ঘ্য প্রয়োজন', - '412' => 'পূর্বশর্ত ব্যর্থ হয়েছে', - '413' => 'পেলোড খুব বড়', - '414' => 'URI অনেক লম্বা', - '415' => 'অসমর্থিত মিডিয়া প্রকার', - '416' => 'পরিসীমা সন্তোষজনক নয়', - '417' => 'প্রত্যাশা ব্যর্থ হয়েছে', - '418' => 'আমি একজন চাপাতা', - '419' => 'অধিবেশনের মেয়াদ শেষ হয়েছে', - '421' => 'ভুল নির্দেশিত অনুরোধ', - '422' => 'আনপ্রসেস এন্টিটি', - '423' => 'তালাবদ্ধ', - '424' => 'ব্যর্থ নির্ভরতা', - '425' => 'খুব তারাতারি', - '426' => 'আপগ্রেড প্রয়োজন', - '428' => 'পূর্বশর্ত আবশ্যক', - '429' => 'অনেক অনুরোধ', - '431' => 'অনুরোধ শিরোনাম ক্ষেত্রগুলি খুব বড়৷', - '444' => 'সাড়া ছাড়া সংযোগ বন্ধ', - '449' => 'এর সাথে পুনরায় চেষ্টা করুন', - '451' => 'আইনি কারণে অনুপলব্ধ', - '499' => 'ক্লায়েন্ট বন্ধ অনুরোধ', - '500' => 'অভ্যন্তরীণ সার্ভার ত্রুটি', - '501' => 'বাস্তবায়িত হয়নি', - '502' => 'খারাপ গেটওয়ে', - '503' => 'রক্ষণাবেক্ষণ মোড', - '504' => 'গেটওয়ে টাইমআউট', - '505' => 'HTTP সংস্করণ সমর্থিত নয়', - '506' => 'বৈকল্পিক এছাড়াও আলোচনা', - '507' => 'অপর্যাপ্ত মজুত', - '508' => 'লুপ সনাক্ত করা হয়েছে', - '509' => 'ব্যান্ডউইথ সীমা অতিক্রম করেছে', - '510' => 'বর্ধিত নয়', - '511' => 'নেটওয়ার্ক প্রমাণীকরণ প্রয়োজন', - '520' => 'অজানা ত্রুটি', - '521' => 'ওয়েব সার্ভার ডাউন', - '522' => 'সংযোগ সময় শেষ হয়েছে', - '523' => 'অরিজিন ইজ অরিচেবল', - '524' => 'একটি টাইমআউট ঘটেছে৷', - '525' => 'SSL হ্যান্ডশেক ব্যর্থ হয়েছে৷', - '526' => 'অবৈধ SSL শংসাপত্র', - '527' => 'রেলগান ত্রুটি', - '598' => 'নেটওয়ার্ক রিড টাইমআউট ত্রুটি৷', - '599' => 'নেটওয়ার্ক সংযোগ টাইমআউট ত্রুটি৷', + '0' => 'অজানা ত্রুটি', + '100' => 'চালিয়ে যান', + '101' => 'স্যুইচিং প্রোটোকল', + '102' => 'প্রক্রিয়াকরণ', + '200' => 'ঠিক আছে', + '201' => 'তৈরি হয়েছে', + '202' => 'গৃহীত', + '203' => 'অ-অনুমোদিত তথ্য', + '204' => 'কোন উপাদান নেই', + '205' => 'কন্টেন্ট রিসেট করুন', + '206' => 'আংশিক বিষয়বস্তু', + '207' => 'মাল্টি-স্ট্যাটাস', + '208' => 'ইতিমধ্যে রিপোর্ট করা হয়েছে', + '226' => 'আমি ব্যবহৃত', + '300' => 'একাধিক পছন্দ', + '301' => 'স্থায়ীভাবে স্থানান্তরিত', + '302' => 'পাওয়া গেছে', + '303' => 'অন্যান্য দেখুন', + '304' => 'সংশোধিত নয়', + '305' => 'ব্যবহার প্রক্সি', + '307' => 'অস্থায়ী পুনঃনির্দেশ', + '308' => 'স্থায়ী পুনর্নির্দেশ', + '400' => 'খারাপ অনুরোধ', + '401' => 'অননুমোদিত', + '402' => 'অর্থপ্রদান আবশ্যক', + '403' => 'নিষিদ্ধ', + '404' => 'পাওয়া যায়নি', + '405' => 'পদ্ধতি অনুমতি নেই', + '406' => 'গ্রহণযোগ্য নয়', + '407' => 'প্রক্সি প্রমাণীকরণ প্রয়োজন', + '408' => 'অনুরোধের সময়সীমা শেষ', + '409' => 'দ্বন্দ্ব', + '410' => 'সর্বস্বান্ত', + '411' => 'দৈর্ঘ্য প্রয়োজন', + '412' => 'পূর্বশর্ত ব্যর্থ হয়েছে', + '413' => 'পেলোড খুব বড়', + '414' => 'URI অনেক লম্বা', + '415' => 'অসমর্থিত মিডিয়া প্রকার', + '416' => 'পরিসীমা সন্তোষজনক নয়', + '417' => 'প্রত্যাশা ব্যর্থ হয়েছে', + '418' => 'আমি একজন চাপাতা', + '419' => 'অধিবেশনের মেয়াদ শেষ হয়েছে', + '421' => 'ভুল নির্দেশিত অনুরোধ', + '422' => 'আনপ্রসেস এন্টিটি', + '423' => 'তালাবদ্ধ', + '424' => 'ব্যর্থ নির্ভরতা', + '425' => 'খুব তারাতারি', + '426' => 'আপগ্রেড প্রয়োজন', + '428' => 'পূর্বশর্ত আবশ্যক', + '429' => 'অনেক অনুরোধ', + '431' => 'অনুরোধ শিরোনাম ক্ষেত্রগুলি খুব বড়৷', + '444' => 'সাড়া ছাড়া সংযোগ বন্ধ', + '449' => 'এর সাথে পুনরায় চেষ্টা করুন', + '451' => 'আইনি কারণে অনুপলব্ধ', + '499' => 'ক্লায়েন্ট বন্ধ অনুরোধ', + '500' => 'অভ্যন্তরীণ সার্ভার ত্রুটি', + '501' => 'বাস্তবায়িত হয়নি', + '502' => 'খারাপ গেটওয়ে', + '503' => 'রক্ষণাবেক্ষণ মোড', + '504' => 'গেটওয়ে টাইমআউট', + '505' => 'HTTP সংস্করণ সমর্থিত নয়', + '506' => 'বৈকল্পিক এছাড়াও আলোচনা', + '507' => 'অপর্যাপ্ত মজুত', + '508' => 'লুপ সনাক্ত করা হয়েছে', + '509' => 'ব্যান্ডউইথ সীমা অতিক্রম করেছে', + '510' => 'বর্ধিত নয়', + '511' => 'নেটওয়ার্ক প্রমাণীকরণ প্রয়োজন', + '520' => 'অজানা ত্রুটি', + '521' => 'ওয়েব সার্ভার ডাউন', + '522' => 'সংযোগ সময় শেষ হয়েছে', + '523' => 'অরিজিন ইজ অরিচেবল', + '524' => 'একটি টাইমআউট ঘটেছে৷', + '525' => 'SSL হ্যান্ডশেক ব্যর্থ হয়েছে৷', + '526' => 'অবৈধ SSL শংসাপত্র', + '527' => 'রেলগান ত্রুটি', + '598' => 'নেটওয়ার্ক রিড টাইমআউট ত্রুটি৷', + '599' => 'নেটওয়ার্ক সংযোগ টাইমআউট ত্রুটি৷', 'unknownError' => 'অজানা ত্রুটি', ]; diff --git a/lang/bn/messages.php b/lang/bn/messages.php index c3d5cb9..82224d0 100644 --- a/lang/bn/messages.php +++ b/lang/bn/messages.php @@ -2,20 +2,20 @@ declare(strict_types=1); - return [ 'phone.exists' => 'এই ফোন নাম্বার আমাদের ডাটাবেজে পাওয়া যায়নি।', - 'phone.max' => 'ফোন নাম্বার ১১ ডিজিটের চেয়ে বড় হতে পারেনা।', - 'otp.size' => 'ওটিপি ৬ ডিজিটের চেয়ে বড় হতে পারেনা।', - 'password.size' => 'পাসওয়ার্ড অবশ্যই 6 অক্ষর হতে হবে।', + 'phone.max' => 'ফোন নাম্বার ১১ ডিজিটের চেয়ে বড় হতে পারেনা।', + 'otp.size' => 'ওটিপি ৬ ডিজিটের চেয়ে বড় হতে পারেনা।', + 'password.size' => 'পাসওয়ার্ড অবশ্যই 6 অক্ষর হতে হবে।', 'password.required' => 'পাসওয়ার্ড পূরণ করা বাধ্যতামূলক।', - 'otp.sent' => 'আপনার ওটিপি প্রেরণ করা হয়েছে।', - 'login.general'=> 'লগিন করা সম্ভব হচ্ছে না।', + 'otp.sent' => 'আপনার ওটিপি প্রেরণ করা হয়েছে।', + 'login.general' => 'লগিন করা সম্ভব হচ্ছে না।', 'login.invalid.password' => 'পাসওয়ার্ড সঠিক নয়!', 'login.invalid.otp' => 'ওটিপিটি সঠিক নয়!', 'login.expired.otp' => 'ওটিপির মেয়াদ শেষ হয়ে গেছে!', 'login.deactive' => 'আপনার একাউন্টটি এক্টিভ নয়!লগিন করা সম্ভব নয়।', 'login.unverified' => 'আপনার ফোন নাম্বার ভ্যারিফাই হয়নি! লগিন করা সম্ভব নয়।', - 'login.lockout' => 'অনেকবার ভুল তথ্য দিয়ে লগিন এর চেষ্টা করা হয়েছে! কিছুক্ষণ পরে আবার চেষ্টা করুন।', - 'login.success' => 'লগিন সফল হয়েছে।', + 'login.lockout' => 'অনেকবার ভুল তথ্য দিয়ে লগিন এর চেষ্টা করা হয়েছে! কিছুক্ষণ পরে আবার চেষ্টা করুন।', + 'login.success' => 'লগিন সফল হয়েছে।', + 'password.current.wrong' => 'ভুল বর্তমান পাসওয়ার্ড! অনুগ্রহ করে সঠিক পাসওয়ার্ড দিয়ে আবার চেষ্টা করুন।', ]; diff --git a/lang/bn/pagination.php b/lang/bn/pagination.php index 6994947..d958069 100644 --- a/lang/bn/pagination.php +++ b/lang/bn/pagination.php @@ -3,6 +3,6 @@ declare(strict_types=1); return [ - 'next' => 'পরবর্তী »', + 'next' => 'পরবর্তী »', 'previous' => '« পুর্ববর্তী', ]; diff --git a/lang/bn/passwords.php b/lang/bn/passwords.php index 696cb63..f58c7cf 100644 --- a/lang/bn/passwords.php +++ b/lang/bn/passwords.php @@ -3,9 +3,9 @@ declare(strict_types=1); return [ - 'reset' => 'আপনার পাসওয়ার্ড পুনরায় সেট করা হয়েছে!', - 'sent' => 'আমরা আপনার পাসওয়ার্ড পুনরায় সেট করার লিঙ্ক ই-মেইল করেছি!', + 'reset' => 'আপনার পাসওয়ার্ড পুনরায় সেট করা হয়েছে!', + 'sent' => 'আমরা আপনার পাসওয়ার্ড পুনরায় সেট করার লিঙ্ক ই-মেইল করেছি!', 'throttled' => 'থামুন! অনুগ্রহ করে কিছুক্ষণ পর পূনরায় চেষ্টা করুন।', - 'token' => 'এই পাসওয়ার্ড রিসেট টোকেনটি সঠিক নয়।', - 'user' => 'এই ই-মেইল দিয়ে কোন ব্যবহারকারী খুঁজে পাওয়া যাচ্ছে না', + 'token' => 'এই পাসওয়ার্ড রিসেট টোকেনটি সঠিক নয়।', + 'user' => 'এই ই-মেইল দিয়ে কোন ব্যবহারকারী খুঁজে পাওয়া যাচ্ছে না', ]; diff --git a/lang/bn/validation.php b/lang/bn/validation.php index 3894b42..236a4be 100644 --- a/lang/bn/validation.php +++ b/lang/bn/validation.php @@ -3,215 +3,215 @@ declare(strict_types=1); return [ - 'accepted' => ':Attribute গ্রহণ করা আবশ্যক।', - 'accepted_if' => ':Attribute অবশ্যই গ্রহণ করতে হবে যখন :other সমান :value হয়।', - 'active_url' => 'এই :attribute একটি বৈধ URL নয়।', - 'after' => ':Date অবশ্যই :attribute এর পরের একটি তারিখ হতে হবে।', - 'after_or_equal' => ':Attribute টি অবশ্যই :date এর সাথে মিল অথবা এর পরের একটি তারিখ হতে হবে।', - 'alpha' => ':Attribute শুধুমাত্র অক্ষর থাকতে পারে।', - 'alpha_dash' => ':Attribute শুধুমাত্র অক্ষর, সংখ্যা, এবং ড্যাশ থাকতে পারে।', - 'alpha_num' => ':Attribute শুধুমাত্র বর্ণ ও সংখ্যা থাকতে পারে।', - 'array' => ':Attribute একটি অ্যারে হতে হবে।', - 'ascii' => ':Attribute টিতে শুধুমাত্র একক-বাইট বর্ণসংখ্যার অক্ষর এবং প্রতীক থাকতে হবে।', - 'before' => ':Date অবশ্যই :attribute এর আগের একটি তারিখ হতে হবে।', - 'before_or_equal' => ':Attribute টি অবশ্যই :date এর সাথে মিল অথবা এর আগের একটি তারিখ হতে হবে।', - 'between' => [ - 'array' => ':Min এবং :max আইটেম :attribute মধ্যে হতে হবে।', - 'file' => ':Min এবং :max কিলোবাইট :attribute মধ্যে হতে হবে।', + 'accepted' => ':Attribute গ্রহণ করা আবশ্যক।', + 'accepted_if' => ':Attribute অবশ্যই গ্রহণ করতে হবে যখন :other সমান :value হয়।', + 'active_url' => 'এই :attribute একটি বৈধ URL নয়।', + 'after' => ':Date অবশ্যই :attribute এর পরের একটি তারিখ হতে হবে।', + 'after_or_equal' => ':Attribute টি অবশ্যই :date এর সাথে মিল অথবা এর পরের একটি তারিখ হতে হবে।', + 'alpha' => ':Attribute শুধুমাত্র অক্ষর থাকতে পারে।', + 'alpha_dash' => ':Attribute শুধুমাত্র অক্ষর, সংখ্যা, এবং ড্যাশ থাকতে পারে।', + 'alpha_num' => ':Attribute শুধুমাত্র বর্ণ ও সংখ্যা থাকতে পারে।', + 'array' => ':Attribute একটি অ্যারে হতে হবে।', + 'ascii' => ':Attribute টিতে শুধুমাত্র একক-বাইট বর্ণসংখ্যার অক্ষর এবং প্রতীক থাকতে হবে।', + 'before' => ':Date অবশ্যই :attribute এর আগের একটি তারিখ হতে হবে।', + 'before_or_equal' => ':Attribute টি অবশ্যই :date এর সাথে মিল অথবা এর আগের একটি তারিখ হতে হবে।', + 'between' => [ + 'array' => ':Min এবং :max আইটেম :attribute মধ্যে হতে হবে।', + 'file' => ':Min এবং :max কিলোবাইট :attribute মধ্যে হতে হবে।', 'numeric' => ':Min এবং :max :attribute মধ্যে হতে হবে।', - 'string' => ':Min এবং :max অক্ষর :attribute মধ্যে হতে হবে।', + 'string' => ':Min এবং :max অক্ষর :attribute মধ্যে হতে হবে।', ], - 'boolean' => ':Attribute স্থানে সত্য বা মিথ্যা হতে হবে।', - 'can' => ':Attribute ক্ষেত্রটিতে একটি অননুমোদিত মান রয়েছে।', - 'confirmed' => ':Attribute ক্ষেত্রটি নিশ্চিতকরণ এর সাথে মিলছে না।', - 'current_password' => 'বর্তমান পাসওয়ার্ড।', - 'date' => ':Attribute একটি বৈধ তারিখ নয়।', - 'date_equals' => 'এই :attribute সমান তারিখ হতে হবে :date।', - 'date_format' => ':Attribute, :format এর সাথে বিন্যাস মিলছে না।', - 'decimal' => ':Attribute-এর অবশ্যই :decimal দশমিক স্থান থাকতে হবে।', - 'declined' => ':Attribute অবশ্যই প্রত্যাখ্যান করতে হবে।', - 'declined_if' => ':Attribute অবশ্যই প্রত্যাখ্যান করতে হবে যখন :value হবে :other।', - 'different' => ':Attribute এবং :other আলাদা হতে হবে।', - 'digits' => ':Attribute :digits অবশ্যই একটি সংখ্যার ডিজিট হতে হবে।', - 'digits_between' => ':Attribute অবশ্যই :min এবং :max ডিজিট এর মধ্যে হতে হবে।', - 'dimensions' => ':Attribute অবৈধ ইমেজ মাত্রা রয়েছে।', - 'distinct' => ':Attribute এর স্থানে একটি নকল মান আছে।', - 'doesnt_end_with' => ':Attribute নিম্নলিখিত: :values এর একটি দিয়ে শেষ নাও হতে পারে।', - 'doesnt_start_with' => ':Attribute :values এর একটি দিয়ে শুরু হতে পারে না।', - 'email' => ':Attribute একটি বৈধ ইমেইল ঠিকানা হতে হবে।', - 'ends_with' => ':Attribute নিম্নলিখিত এক সঙ্গে শেষ করতে হবে: :values।', - 'enum' => 'নির্বাচিত :attribute অবৈধ।', - 'exists' => 'নির্বাচিত :attribute টি পাওয়া যায় নি।', - 'file' => ':Attribute একটি ফাইল হতে হবে।', - 'filled' => ':Attribute স্থানটি পূরণ করতে হবে।', - 'gt' => [ - 'array' => ':Attribute এ অবশ্যই :value আইটেমের থেকে বেশি থাকতে হবে।', - 'file' => ':Attribute অবশ্যই :value কিলোবাইটের চেয়ে বেশি হতে হবে।', + 'boolean' => ':Attribute স্থানে সত্য বা মিথ্যা হতে হবে।', + 'can' => ':Attribute ক্ষেত্রটিতে একটি অননুমোদিত মান রয়েছে।', + 'confirmed' => ':Attribute ক্ষেত্রটি নিশ্চিতকরণ এর সাথে মিলছে না।', + 'current_password' => 'বর্তমান পাসওয়ার্ড।', + 'date' => ':Attribute একটি বৈধ তারিখ নয়।', + 'date_equals' => 'এই :attribute সমান তারিখ হতে হবে :date।', + 'date_format' => ':Attribute, :format এর সাথে বিন্যাস মিলছে না।', + 'decimal' => ':Attribute-এর অবশ্যই :decimal দশমিক স্থান থাকতে হবে।', + 'declined' => ':Attribute অবশ্যই প্রত্যাখ্যান করতে হবে।', + 'declined_if' => ':Attribute অবশ্যই প্রত্যাখ্যান করতে হবে যখন :value হবে :other।', + 'different' => ':Attribute এবং :other আলাদা হতে হবে।', + 'digits' => ':Attribute :digits অবশ্যই একটি সংখ্যার ডিজিট হতে হবে।', + 'digits_between' => ':Attribute অবশ্যই :min এবং :max ডিজিট এর মধ্যে হতে হবে।', + 'dimensions' => ':Attribute অবৈধ ইমেজ মাত্রা রয়েছে।', + 'distinct' => ':Attribute এর স্থানে একটি নকল মান আছে।', + 'doesnt_end_with' => ':Attribute নিম্নলিখিত: :values এর একটি দিয়ে শেষ নাও হতে পারে।', + 'doesnt_start_with' => ':Attribute :values এর একটি দিয়ে শুরু হতে পারে না।', + 'email' => ':Attribute একটি বৈধ ইমেইল ঠিকানা হতে হবে।', + 'ends_with' => ':Attribute নিম্নলিখিত এক সঙ্গে শেষ করতে হবে: :values।', + 'enum' => 'নির্বাচিত :attribute অবৈধ।', + 'exists' => 'নির্বাচিত :attribute টি পাওয়া যায় নি।', + 'file' => ':Attribute একটি ফাইল হতে হবে।', + 'filled' => ':Attribute স্থানটি পূরণ করতে হবে।', + 'gt' => [ + 'array' => ':Attribute এ অবশ্যই :value আইটেমের থেকে বেশি থাকতে হবে।', + 'file' => ':Attribute অবশ্যই :value কিলোবাইটের চেয়ে বেশি হতে হবে।', 'numeric' => ':Attribute অবশ্যই :value-এর থেকে বড় হতে হবে৷', - 'string' => ':Attribute অবশ্যই :value অক্ষরের চেয়ে বড় হতে হবে।', + 'string' => ':Attribute অবশ্যই :value অক্ষরের চেয়ে বড় হতে হবে।', ], - 'gte' => [ - 'array' => ':Attribute-এর অবশ্যই :value আইটেম বা তার বেশি থাকতে হবে।', - 'file' => ':Attribute অবশ্যই :value কিলোবাইটের থেকে বড় বা সমান হতে হবে।', + 'gte' => [ + 'array' => ':Attribute-এর অবশ্যই :value আইটেম বা তার বেশি থাকতে হবে।', + 'file' => ':Attribute অবশ্যই :value কিলোবাইটের থেকে বড় বা সমান হতে হবে।', 'numeric' => ':Attribute অবশ্যই :value এর চেয়ে বড় বা সমান হতে হবে।', - 'string' => ':Attribute অবশ্যই :value অক্ষরের চেয়ে বড় বা সমান হতে হবে।', + 'string' => ':Attribute অবশ্যই :value অক্ষরের চেয়ে বড় বা সমান হতে হবে।', ], - 'image' => ':Attribute একটি ইমেজ হতে হবে।', - 'in' => 'নির্বাচিত :attribute টি অবৈধ।', - 'in_array' => ':Attribute উপাদানটি :other এ খুঁজে পাওয়া যায়নি।', - 'integer' => ':Attribute একটি পূর্ণসংখ্যা হতে হবে।', - 'ip' => ':Attribute একটি বৈধ IP address হতে হবে।', - 'ipv4' => ':Attribute টি একটি বৈধ IPv4 address হতে হবে।', - 'ipv6' => ':Attribute টি একটি বৈধ IPv6 address হতে হবে।', - 'json' => ':Attribute একটি বৈধ JSON স্ট্রিং হতে হবে।', - 'lowercase' => ':Attribute অবশ্যই ছোট হাতের হতে হবে।', - 'lt' => [ - 'array' => ':Attribute এর থেকে কম :value আইটেম থাকতে হবে।', - 'file' => ':Attribute অবশ্যই :value কিলোবাইটের চেয়ে কম হতে হবে।', + 'image' => ':Attribute একটি ইমেজ হতে হবে।', + 'in' => 'নির্বাচিত :attribute টি অবৈধ।', + 'in_array' => ':Attribute উপাদানটি :other এ খুঁজে পাওয়া যায়নি।', + 'integer' => ':Attribute একটি পূর্ণসংখ্যা হতে হবে।', + 'ip' => ':Attribute একটি বৈধ IP address হতে হবে।', + 'ipv4' => ':Attribute টি একটি বৈধ IPv4 address হতে হবে।', + 'ipv6' => ':Attribute টি একটি বৈধ IPv6 address হতে হবে।', + 'json' => ':Attribute একটি বৈধ JSON স্ট্রিং হতে হবে।', + 'lowercase' => ':Attribute অবশ্যই ছোট হাতের হতে হবে।', + 'lt' => [ + 'array' => ':Attribute এর থেকে কম :value আইটেম থাকতে হবে।', + 'file' => ':Attribute অবশ্যই :value কিলোবাইটের চেয়ে কম হতে হবে।', 'numeric' => ':Attribute অবশ্যই :value এর চেয়ে কম হতে হবে।', - 'string' => ':Attribute অবশ্যই :value অক্ষরের চেয়ে কম হতে হবে।', + 'string' => ':Attribute অবশ্যই :value অক্ষরের চেয়ে কম হতে হবে।', ], - 'lte' => [ - 'array' => ':Attribute এ অবশ্যই :value আইটেমের বেশি থাকা উচিত নয়৷', - 'file' => ':Attribute অবশ্যই :value কিলোবাইটের থেকে কম বা সমান হতে হবে।', + 'lte' => [ + 'array' => ':Attribute এ অবশ্যই :value আইটেমের বেশি থাকা উচিত নয়৷', + 'file' => ':Attribute অবশ্যই :value কিলোবাইটের থেকে কম বা সমান হতে হবে।', 'numeric' => ':Attribute অবশ্যই :value এর থেকে কম বা সমান হতে হবে।', - 'string' => ':Attribute অবশ্যই :value অক্ষরের চেয়ে কম বা সমান হতে হবে।', + 'string' => ':Attribute অবশ্যই :value অক্ষরের চেয়ে কম বা সমান হতে হবে।', ], - 'mac_address' => ':Attribute একটি বৈধ MAC ঠিকানা হতে হবে।', - 'max' => [ - 'array' => ':Attribute এর মান :max টি উপাদানের চেয়ে বড় হতে পারেনা।', - 'file' => ':Attribute এর মান :max কিলোবাইট এর চেয়ে বড় হতে পারেনা।', + 'mac_address' => ':Attribute একটি বৈধ MAC ঠিকানা হতে হবে।', + 'max' => [ + 'array' => ':Attribute এর মান :max টি উপাদানের চেয়ে বড় হতে পারেনা।', + 'file' => ':Attribute এর মান :max কিলোবাইট এর চেয়ে বড় হতে পারেনা।', 'numeric' => ':Attribute এর মান :max এর চেয়ে বড় হতে পারেনা।', - 'string' => ':Attribute এর মান :max অক্ষর এর চেয়ে বড় হতে পারেনা।', + 'string' => ':Attribute এর মান :max অক্ষর এর চেয়ে বড় হতে পারেনা।', ], - 'max_digits' => 'এই :attribute এ :max ডিজিট এর বেশি হতে পারবে না।', - 'mimes' => ':Attribute এর একটি ফাইল হতে হবে: :values।', - 'mimetypes' => ':Attribute এর একটি ফাইল হতে হবে: :values।', - 'min' => [ - 'array' => ':Attribute অবশ্যই কমপক্ষে :min উপাদানের সমান হতে হবে।', - 'file' => ':Attribute অবশ্যই কমপক্ষে :min কিলোবাইট এর সমান হতে হবে।', + 'max_digits' => 'এই :attribute এ :max ডিজিট এর বেশি হতে পারবে না।', + 'mimes' => ':Attribute এর একটি ফাইল হতে হবে: :values।', + 'mimetypes' => ':Attribute এর একটি ফাইল হতে হবে: :values।', + 'min' => [ + 'array' => ':Attribute অবশ্যই কমপক্ষে :min উপাদানের সমান হতে হবে।', + 'file' => ':Attribute অবশ্যই কমপক্ষে :min কিলোবাইট এর সমান হতে হবে।', 'numeric' => ':Attribute অবশ্যই কমপক্ষে :min এর সমান হতে হবে।', - 'string' => ':Attribute অবশ্যই কমপক্ষে :min অক্ষর এর সমান হতে হবে।', + 'string' => ':Attribute অবশ্যই কমপক্ষে :min অক্ষর এর সমান হতে হবে।', ], - 'min_digits' => 'এই :attribute এ সর্বোনিম্ন :min ডিজিট হতে হবে।', - 'missing' => ':Attributeটি ক্ষেত্র অবশ্যই অনুপস্থিত।', - 'missing_if' => ':Other :value হলে :attribute ফিল্ডটি অবশ্যই অনুপস্থিত থাকবে।', - 'missing_unless' => ':Other :value না হলে :attribute ফিল্ডটি অবশ্যই অনুপস্থিত থাকবে।', - 'missing_with' => ':Values উপস্থিত থাকলে :attribute ক্ষেত্রটি অবশ্যই অনুপস্থিত থাকবে৷', - 'missing_with_all' => ':Valuesটি উপস্থিত থাকলে :attribute ক্ষেত্রটি অবশ্যই অনুপস্থিত থাকবে৷', - 'multiple_of' => 'এই :attribute একটি একাধিক :value হতে হবে।', - 'not_in' => 'নির্বাচিত :attribute অবৈধ।', - 'not_regex' => ':Attribute বিন্যাস অবৈধ।', - 'numeric' => ':Attribute একটি সংখ্যা হতে হবে।', - 'password' => [ - 'letters' => ':Attribute -এ অন্তত একটি অক্ষর থাকতে হবে।', - 'mixed' => ':Attribute -এ অন্তত একটি বড় হাতের এবং একটি ছোট হাতের অক্ষর থাকতে হবে।', - 'numbers' => ':Attribute -এ অন্তত একটি নম্বর থাকতে হবে।', - 'symbols' => ':Attribute -এ অন্তত একটি প্রতীক থাকতে হবে।', + 'min_digits' => 'এই :attribute এ সর্বোনিম্ন :min ডিজিট হতে হবে।', + 'missing' => ':Attributeটি ক্ষেত্র অবশ্যই অনুপস্থিত।', + 'missing_if' => ':Other :value হলে :attribute ফিল্ডটি অবশ্যই অনুপস্থিত থাকবে।', + 'missing_unless' => ':Other :value না হলে :attribute ফিল্ডটি অবশ্যই অনুপস্থিত থাকবে।', + 'missing_with' => ':Values উপস্থিত থাকলে :attribute ক্ষেত্রটি অবশ্যই অনুপস্থিত থাকবে৷', + 'missing_with_all' => ':Valuesটি উপস্থিত থাকলে :attribute ক্ষেত্রটি অবশ্যই অনুপস্থিত থাকবে৷', + 'multiple_of' => 'এই :attribute একটি একাধিক :value হতে হবে।', + 'not_in' => 'নির্বাচিত :attribute অবৈধ।', + 'not_regex' => ':Attribute বিন্যাস অবৈধ।', + 'numeric' => ':Attribute একটি সংখ্যা হতে হবে।', + 'password' => [ + 'letters' => ':Attribute -এ অন্তত একটি অক্ষর থাকতে হবে।', + 'mixed' => ':Attribute -এ অন্তত একটি বড় হাতের এবং একটি ছোট হাতের অক্ষর থাকতে হবে।', + 'numbers' => ':Attribute -এ অন্তত একটি নম্বর থাকতে হবে।', + 'symbols' => ':Attribute -এ অন্তত একটি প্রতীক থাকতে হবে।', 'uncompromised' => 'প্রদত্ত :attribute একটি ডেটা ফাঁসের মধ্যে পাওয়া গেছে। অনুগ্রহ করে একটি ভিন্ন :attribute চয়ন করুন।', ], - 'present' => ':Attribute ক্ষেত্র উপস্থিত থাকা আবশ্যক।', - 'prohibited' => 'এই :attribute ক্ষেত্রের নিষিদ্ধ।', - 'prohibited_if' => 'এই :attribute ক্ষেত্র নিষিদ্ধ করা হয়, যখন :other হয় :value।', - 'prohibited_unless' => 'এই :attribute ক্ষেত্র নিষিদ্ধ করা হয়, যদি না, :other হয় :values।', - 'prohibits' => ':Attribute ক্ষেত্রটি :other উপস্থিত হতে নিষেধ করে৷', - 'regex' => ':Attribute বিন্যাস অবৈধ।', - 'required' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক।', - 'required_array_keys' => ':Attribute ফিল্ডে অবশ্যই :values এর জন্য এন্ট্রি থাকতে হবে।', - 'required_if' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যেখানে :other হল :value।', + 'present' => ':Attribute ক্ষেত্র উপস্থিত থাকা আবশ্যক।', + 'prohibited' => 'এই :attribute ক্ষেত্রের নিষিদ্ধ।', + 'prohibited_if' => 'এই :attribute ক্ষেত্র নিষিদ্ধ করা হয়, যখন :other হয় :value।', + 'prohibited_unless' => 'এই :attribute ক্ষেত্র নিষিদ্ধ করা হয়, যদি না, :other হয় :values।', + 'prohibits' => ':Attribute ক্ষেত্রটি :other উপস্থিত হতে নিষেধ করে৷', + 'regex' => ':Attribute বিন্যাস অবৈধ।', + 'required' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক।', + 'required_array_keys' => ':Attribute ফিল্ডে অবশ্যই :values এর জন্য এন্ট্রি থাকতে হবে।', + 'required_if' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যেখানে :other হল :value।', 'required_if_accepted' => ':Attribute ক্ষেত্রটি প্রয়োজন হয় যখন :other গৃহীত হয়।', - 'required_unless' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যদি না :other, :values তে উপস্থিত থাকে।', - 'required_with' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যখন :values উপস্থিত।', - 'required_with_all' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যখন :values উপস্থিত।', - 'required_without' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যখন :values অনুপস্থিত।', + 'required_unless' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যদি না :other, :values তে উপস্থিত থাকে।', + 'required_with' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যখন :values উপস্থিত।', + 'required_with_all' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যখন :values উপস্থিত।', + 'required_without' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যখন :values অনুপস্থিত।', 'required_without_all' => ':Attribute স্থানটি পূরণ করা বাধ্যতামূলক যখন সকল :values অনুপস্থিত।', - 'same' => ':Attribute এবং :other অবশ্যই মিলতে হবে।', - 'size' => [ - 'array' => ':Attribute অবশ্যই :size আইটেম হতে হবে।', - 'file' => ':Attribute অবশ্যই :size কিলোবাইট হতে হবে।', + 'same' => ':Attribute এবং :other অবশ্যই মিলতে হবে।', + 'size' => [ + 'array' => ':Attribute অবশ্যই :size আইটেম হতে হবে।', + 'file' => ':Attribute অবশ্যই :size কিলোবাইট হতে হবে।', 'numeric' => ':Attribute অবশ্যই :size হতে হবে।', - 'string' => ':Attribute অবশ্যই :size অক্ষর হতে হবে।', + 'string' => ':Attribute অবশ্যই :size অক্ষর হতে হবে।', ], - 'starts_with' => 'এই :attribute নিম্নলিখিত এক সঙ্গে শুরু হবে: :values।', - 'string' => ':Attribute একটি স্ট্রিং হতে হবে।', - 'timezone' => ':Attribute একটি বৈধ সময় অঞ্চল হতে হবে।', - 'ulid' => 'এই :attribute অবশ্যই একটি বৈধ ULID হতে হবে৷', - 'unique' => ':Attribute ইতিমধ্যেই নেওয়া হয়েছে।', - 'uploaded' => ':Attribute আপলোড করতে ব্যর্থ হয়েছে।', - 'uppercase' => 'এই :attribute অবশ্যই বড় হাতের হতে হবে।', - 'url' => 'এই :attribute একটি বৈধ URL হতে হবে।', - 'uuid' => 'এই :attribute একটি বৈধ UUID হতে হবে।', - 'attributes' => [ - 'address' => 'ঠিকানা', - 'age' => 'বয়স', - 'amount' => 'পরিমাণ', - 'area' => 'এলাকা', - 'available' => 'উপলব্ধ', - 'birthday' => 'জন্মদিন', - 'body' => 'বডি', - 'city' => 'জেলা', - 'content' => 'কনটেন্ট', - 'country' => 'দেশ', - 'created_at' => 'এ নির্মিত', - 'creator' => 'সৃষ্টিকর্তা', - 'current_password' => 'বর্তমান পাসওয়ার্ড', - 'date' => 'তারিখ', - 'date_of_birth' => 'জন্ম তারিখ', - 'day' => 'দিন', - 'deleted_at' => 'এ মুছে ফেলা হয়েছে', - 'description' => 'বর্ণনা', - 'district' => 'জেলা', - 'duration' => 'সময়কাল', - 'email' => 'ই-মেইল', - 'excerpt' => 'উদ্ধৃতি', - 'filter' => 'ছাঁকনি', - 'first_name' => 'নাম (প্রথম অংশ)', - 'gender' => 'লিঙ্গ', - 'group' => 'দল', - 'hour' => 'ঘন্টা', - 'image' => 'ইমেজ', - 'last_name' => 'নাম (শেষ অংশ)', - 'lesson' => 'পাঠ', - 'line_address_1' => 'লাইন ঠিকানা 1', - 'line_address_2' => 'লাইন ঠিকানা 2', - 'message' => 'বার্তা', - 'middle_name' => 'মধ্য নাম', - 'minute' => 'মিনিট', - 'mobile' => 'মোবাইল', - 'month' => 'মাস', - 'name' => 'নাম', - 'national_code' => 'জাতীয় কোড', - 'number' => 'সংখ্যা', - 'password' => 'পাসওয়ার্ড', - 'password_confirmation' => 'পাসওয়ার্ড যাচাইকরণ', - 'phone' => 'ফোন', - 'photo' => 'ছবি', - 'postal_code' => 'পোস্ট অফিসের নাম্বার', - 'price' => 'মূল্য', - 'province' => 'প্রদেশ', + 'starts_with' => 'এই :attribute নিম্নলিখিত এক সঙ্গে শুরু হবে: :values।', + 'string' => ':Attribute একটি স্ট্রিং হতে হবে।', + 'timezone' => ':Attribute একটি বৈধ সময় অঞ্চল হতে হবে।', + 'ulid' => 'এই :attribute অবশ্যই একটি বৈধ ULID হতে হবে৷', + 'unique' => ':Attribute ইতিমধ্যেই নেওয়া হয়েছে।', + 'uploaded' => ':Attribute আপলোড করতে ব্যর্থ হয়েছে।', + 'uppercase' => 'এই :attribute অবশ্যই বড় হাতের হতে হবে।', + 'url' => 'এই :attribute একটি বৈধ URL হতে হবে।', + 'uuid' => 'এই :attribute একটি বৈধ UUID হতে হবে।', + 'attributes' => [ + 'address' => 'ঠিকানা', + 'age' => 'বয়স', + 'amount' => 'পরিমাণ', + 'area' => 'এলাকা', + 'available' => 'উপলব্ধ', + 'birthday' => 'জন্মদিন', + 'body' => 'বডি', + 'city' => 'জেলা', + 'content' => 'কনটেন্ট', + 'country' => 'দেশ', + 'created_at' => 'এ নির্মিত', + 'creator' => 'সৃষ্টিকর্তা', + 'current_password' => 'বর্তমান পাসওয়ার্ড', + 'date' => 'তারিখ', + 'date_of_birth' => 'জন্ম তারিখ', + 'day' => 'দিন', + 'deleted_at' => 'এ মুছে ফেলা হয়েছে', + 'description' => 'বর্ণনা', + 'district' => 'জেলা', + 'duration' => 'সময়কাল', + 'email' => 'ই-মেইল', + 'excerpt' => 'উদ্ধৃতি', + 'filter' => 'ছাঁকনি', + 'first_name' => 'নাম (প্রথম অংশ)', + 'gender' => 'লিঙ্গ', + 'group' => 'দল', + 'hour' => 'ঘন্টা', + 'image' => 'ইমেজ', + 'last_name' => 'নাম (শেষ অংশ)', + 'lesson' => 'পাঠ', + 'line_address_1' => 'লাইন ঠিকানা 1', + 'line_address_2' => 'লাইন ঠিকানা 2', + 'message' => 'বার্তা', + 'middle_name' => 'মধ্য নাম', + 'minute' => 'মিনিট', + 'mobile' => 'মোবাইল', + 'month' => 'মাস', + 'name' => 'নাম', + 'national_code' => 'জাতীয় কোড', + 'number' => 'সংখ্যা', + 'password' => 'পাসওয়ার্ড', + 'password_confirmation' => 'পাসওয়ার্ড যাচাইকরণ', + 'phone' => 'ফোন', + 'photo' => 'ছবি', + 'postal_code' => 'পোস্ট অফিসের নাম্বার', + 'price' => 'মূল্য', + 'province' => 'প্রদেশ', 'recaptcha_response_field' => 'recaptcha প্রতিক্রিয়া ক্ষেত্র', - 'remember' => 'মনে রাখবেন', - 'restored_at' => 'এ পুনরুদ্ধার করা হয়েছে', - 'result_text_under_image' => 'ছবির নিচে ফলাফল পাঠ্য', - 'role' => 'ভূমিকা', - 'second' => 'দ্বিতীয়', - 'sex' => 'লিঙ্গ', - 'short_text' => 'সংক্ষিপ্ত লেখা', - 'size' => 'আকার', - 'state' => 'অবস্থা', - 'street' => 'রাস্তা', - 'student' => 'ছাত্র', - 'subject' => 'বিষয়', - 'teacher' => 'শিক্ষক', - 'terms' => 'শর্তসমূহ', - 'test_description' => 'পরীক্ষার বিবরণী', - 'test_locale' => 'পরীক্ষা লোকেল', - 'test_name' => 'পরীক্ষার নাম', - 'text' => 'পাঠ্য', - 'time' => 'সময়', - 'title' => 'টাইটেল', - 'updated_at' => 'এ আপডেট', - 'username' => 'ইউজারনেম', - 'year' => 'বছর', + 'remember' => 'মনে রাখবেন', + 'restored_at' => 'এ পুনরুদ্ধার করা হয়েছে', + 'result_text_under_image' => 'ছবির নিচে ফলাফল পাঠ্য', + 'role' => 'ভূমিকা', + 'second' => 'দ্বিতীয়', + 'sex' => 'লিঙ্গ', + 'short_text' => 'সংক্ষিপ্ত লেখা', + 'size' => 'আকার', + 'state' => 'অবস্থা', + 'street' => 'রাস্তা', + 'student' => 'ছাত্র', + 'subject' => 'বিষয়', + 'teacher' => 'শিক্ষক', + 'terms' => 'শর্তসমূহ', + 'test_description' => 'পরীক্ষার বিবরণী', + 'test_locale' => 'পরীক্ষা লোকেল', + 'test_name' => 'পরীক্ষার নাম', + 'text' => 'পাঠ্য', + 'time' => 'সময়', + 'title' => 'টাইটেল', + 'updated_at' => 'এ আপডেট', + 'username' => 'ইউজারনেম', + 'year' => 'বছর', ], ]; diff --git a/lang/en/auth.php b/lang/en/auth.php index 6db4982..4337d09 100644 --- a/lang/en/auth.php +++ b/lang/en/auth.php @@ -3,7 +3,7 @@ declare(strict_types=1); return [ - 'failed' => 'These credentials do not match our records.', + 'failed' => 'These credentials do not match our records.', 'password' => 'The password is incorrect.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', ]; diff --git a/lang/en/http-statuses.php b/lang/en/http-statuses.php index 3346f78..f2488f4 100644 --- a/lang/en/http-statuses.php +++ b/lang/en/http-statuses.php @@ -3,82 +3,82 @@ declare(strict_types=1); return [ - '0' => 'Unknown Error', - '100' => 'Continue', - '101' => 'Switching Protocols', - '102' => 'Processing', - '200' => 'OK', - '201' => 'Created', - '202' => 'Accepted', - '203' => 'Non-Authoritative Information', - '204' => 'No Content', - '205' => 'Reset Content', - '206' => 'Partial Content', - '207' => 'Multi-Status', - '208' => 'Already Reported', - '226' => 'IM Used', - '300' => 'Multiple Choices', - '301' => 'Moved Permanently', - '302' => 'Found', - '303' => 'See Other', - '304' => 'Not Modified', - '305' => 'Use Proxy', - '307' => 'Temporary Redirect', - '308' => 'Permanent Redirect', - '400' => 'Bad Request', - '401' => 'Unauthorized', - '402' => 'Payment Required', - '403' => 'Forbidden', - '404' => 'Not Found', - '405' => 'Method Not Allowed', - '406' => 'Not Acceptable', - '407' => 'Proxy Authentication Required', - '408' => 'Request Timeout', - '409' => 'Conflict', - '410' => 'Gone', - '411' => 'Length Required', - '412' => 'Precondition Failed', - '413' => 'Payload Too Large', - '414' => 'URI Too Long', - '415' => 'Unsupported Media Type', - '416' => 'Range Not Satisfiable', - '417' => 'Expectation Failed', - '418' => 'I\'m a teapot', - '419' => 'Session Has Expired', - '421' => 'Misdirected Request', - '422' => 'Unprocessable Entity', - '423' => 'Locked', - '424' => 'Failed Dependency', - '425' => 'Too Early', - '426' => 'Upgrade Required', - '428' => 'Precondition Required', - '429' => 'Too Many Requests', - '431' => 'Request Header Fields Too Large', - '444' => 'Connection Closed Without Response', - '449' => 'Retry With', - '451' => 'Unavailable For Legal Reasons', - '499' => 'Client Closed Request', - '500' => 'Internal Server Error', - '501' => 'Not Implemented', - '502' => 'Bad Gateway', - '503' => 'Maintenance Mode', - '504' => 'Gateway Timeout', - '505' => 'HTTP Version Not Supported', - '506' => 'Variant Also Negotiates', - '507' => 'Insufficient Storage', - '508' => 'Loop Detected', - '509' => 'Bandwidth Limit Exceeded', - '510' => 'Not Extended', - '511' => 'Network Authentication Required', - '520' => 'Unknown Error', - '521' => 'Web Server is Down', - '522' => 'Connection Timed Out', - '523' => 'Origin Is Unreachable', - '524' => 'A Timeout Occurred', - '525' => 'SSL Handshake Failed', - '526' => 'Invalid SSL Certificate', - '527' => 'Railgun Error', - '598' => 'Network Read Timeout Error', - '599' => 'Network Connect Timeout Error', + '0' => 'Unknown Error', + '100' => 'Continue', + '101' => 'Switching Protocols', + '102' => 'Processing', + '200' => 'OK', + '201' => 'Created', + '202' => 'Accepted', + '203' => 'Non-Authoritative Information', + '204' => 'No Content', + '205' => 'Reset Content', + '206' => 'Partial Content', + '207' => 'Multi-Status', + '208' => 'Already Reported', + '226' => 'IM Used', + '300' => 'Multiple Choices', + '301' => 'Moved Permanently', + '302' => 'Found', + '303' => 'See Other', + '304' => 'Not Modified', + '305' => 'Use Proxy', + '307' => 'Temporary Redirect', + '308' => 'Permanent Redirect', + '400' => 'Bad Request', + '401' => 'Unauthorized', + '402' => 'Payment Required', + '403' => 'Forbidden', + '404' => 'Not Found', + '405' => 'Method Not Allowed', + '406' => 'Not Acceptable', + '407' => 'Proxy Authentication Required', + '408' => 'Request Timeout', + '409' => 'Conflict', + '410' => 'Gone', + '411' => 'Length Required', + '412' => 'Precondition Failed', + '413' => 'Payload Too Large', + '414' => 'URI Too Long', + '415' => 'Unsupported Media Type', + '416' => 'Range Not Satisfiable', + '417' => 'Expectation Failed', + '418' => 'I\'m a teapot', + '419' => 'Session Has Expired', + '421' => 'Misdirected Request', + '422' => 'Unprocessable Entity', + '423' => 'Locked', + '424' => 'Failed Dependency', + '425' => 'Too Early', + '426' => 'Upgrade Required', + '428' => 'Precondition Required', + '429' => 'Too Many Requests', + '431' => 'Request Header Fields Too Large', + '444' => 'Connection Closed Without Response', + '449' => 'Retry With', + '451' => 'Unavailable For Legal Reasons', + '499' => 'Client Closed Request', + '500' => 'Internal Server Error', + '501' => 'Not Implemented', + '502' => 'Bad Gateway', + '503' => 'Maintenance Mode', + '504' => 'Gateway Timeout', + '505' => 'HTTP Version Not Supported', + '506' => 'Variant Also Negotiates', + '507' => 'Insufficient Storage', + '508' => 'Loop Detected', + '509' => 'Bandwidth Limit Exceeded', + '510' => 'Not Extended', + '511' => 'Network Authentication Required', + '520' => 'Unknown Error', + '521' => 'Web Server is Down', + '522' => 'Connection Timed Out', + '523' => 'Origin Is Unreachable', + '524' => 'A Timeout Occurred', + '525' => 'SSL Handshake Failed', + '526' => 'Invalid SSL Certificate', + '527' => 'Railgun Error', + '598' => 'Network Read Timeout Error', + '599' => 'Network Connect Timeout Error', 'unknownError' => 'Unknown Error', ]; diff --git a/lang/en/messages.php b/lang/en/messages.php index ac992e1..91bb1d5 100644 --- a/lang/en/messages.php +++ b/lang/en/messages.php @@ -2,20 +2,20 @@ declare(strict_types=1); - return [ 'phone.exists' => 'This phone number is not available in our database.', - 'phone.max' => 'The phone number cannot be bigger than 11 digits.', - 'otp.size' => 'OTP cannot be larger than 6 digits.', - 'password.size' => 'The password must be at least 6 characters.', + 'phone.max' => 'The phone number cannot be bigger than 11 digits.', + 'otp.size' => 'OTP cannot be larger than 6 digits.', + 'password.size' => 'The password must be at least 6 characters.', 'password.required' => 'password is required', - 'otp.sent' => 'Your OTP has been sent.', - 'login.general'=> 'It is not possible to login.', + 'otp.sent' => 'Your OTP has been sent.', + 'login.general' => 'It is not possible to login.', 'login.invalid.password' => 'The password is incorrect', 'login.invalid.otp' => 'OTPT is not correct!', 'login.expired.otp' => 'The OTP has expired!', 'login.deactive' => 'Your account is not active! It is not possible to login.', 'login.unverified' => 'Your phone number has not been verified! It is not possible to login.', - 'login.lockout' => 'I have tried to login with wrong information many times! Try again after a while.', - 'login.success' => 'Login is successful.', + 'login.lockout' => 'I have tried to login with wrong information many times! Try again after a while.', + 'login.success' => 'Login is successful.', + 'password.current.wrong' => 'Wrong current password! Please try again with the correct password.', ]; diff --git a/lang/en/pagination.php b/lang/en/pagination.php index f4cedde..c493712 100644 --- a/lang/en/pagination.php +++ b/lang/en/pagination.php @@ -3,6 +3,6 @@ declare(strict_types=1); return [ - 'next' => 'Next »', + 'next' => 'Next »', 'previous' => '« Previous', ]; diff --git a/lang/en/passwords.php b/lang/en/passwords.php index f3b65ba..1130b8d 100644 --- a/lang/en/passwords.php +++ b/lang/en/passwords.php @@ -3,9 +3,9 @@ declare(strict_types=1); return [ - 'reset' => 'Your password has been reset.', - 'sent' => 'We have emailed your password reset link.', + 'reset' => 'Your password has been reset.', + 'sent' => 'We have emailed your password reset link.', 'throttled' => 'Please wait before retrying.', - 'token' => 'This password reset token is invalid.', - 'user' => 'We can\'t find a user with that email address.', + 'token' => 'This password reset token is invalid.', + 'user' => 'We can\'t find a user with that email address.', ]; diff --git a/lang/en/validation.php b/lang/en/validation.php index 2076bd3..bd96682 100644 --- a/lang/en/validation.php +++ b/lang/en/validation.php @@ -3,215 +3,215 @@ declare(strict_types=1); return [ - 'accepted' => 'The :attribute must be accepted.', - 'accepted_if' => 'The :attribute must be accepted when :other is :value.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', - 'before' => 'The :attribute must be a date before :date.', - 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', - 'between' => [ - 'array' => 'The :attribute must have between :min and :max items.', - 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'accepted' => 'The :attribute must be accepted.', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => 'The :attribute may only contain letters.', + 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', + 'alpha_num' => 'The :attribute may only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', + 'before' => 'The :attribute must be a date before :date.', + 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'between' => [ + 'array' => 'The :attribute must have between :min and :max items.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', 'numeric' => 'The :attribute must be between :min and :max.', - 'string' => 'The :attribute must be between :min and :max characters.', + 'string' => 'The :attribute must be between :min and :max characters.', ], - 'boolean' => 'The :attribute field must be true or false.', - 'can' => 'The :attribute field contains an unauthorized value.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'current_password' => 'The password is incorrect.', - 'date' => 'The :attribute is not a valid date.', - 'date_equals' => 'The :attribute must be a date equal to :date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'decimal' => 'The :attribute field must have :decimal decimal places.', - 'declined' => 'The :attribute must be declined.', - 'declined_if' => 'The :attribute must be declined when :other is :value.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', - 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', - 'email' => 'The :attribute must be a valid email address.', - 'ends_with' => 'The :attribute must end with one of the following: :values.', - 'enum' => 'The selected :attribute is invalid.', - 'exists' => 'The selected :attribute is invalid.', - 'file' => 'The :attribute must be a file.', - 'filled' => 'The :attribute field is required.', - 'gt' => [ - 'array' => 'The :attribute must have more than :value items.', - 'file' => 'The :attribute must be greater than :value kilobytes.', + 'boolean' => 'The :attribute field must be true or false.', + 'can' => 'The :attribute field contains an unauthorized value.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'current_password' => 'The password is incorrect.', + 'date' => 'The :attribute is not a valid date.', + 'date_equals' => 'The :attribute must be a date equal to :date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'decimal' => 'The :attribute field must have :decimal decimal places.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.', + 'email' => 'The :attribute must be a valid email address.', + 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field is required.', + 'gt' => [ + 'array' => 'The :attribute must have more than :value items.', + 'file' => 'The :attribute must be greater than :value kilobytes.', 'numeric' => 'The :attribute must be greater than :value.', - 'string' => 'The :attribute must be greater than :value characters.', + 'string' => 'The :attribute must be greater than :value characters.', ], - 'gte' => [ - 'array' => 'The :attribute must have :value items or more.', - 'file' => 'The :attribute must be greater than or equal :value kilobytes.', + 'gte' => [ + 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal :value kilobytes.', 'numeric' => 'The :attribute must be greater than or equal :value.', - 'string' => 'The :attribute must be greater than or equal :value characters.', + 'string' => 'The :attribute must be greater than or equal :value characters.', ], - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'ipv4' => 'The :attribute must be a valid IPv4 address.', - 'ipv6' => 'The :attribute must be a valid IPv6 address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'lowercase' => 'The :attribute field must be lowercase.', - 'lt' => [ - 'array' => 'The :attribute must have less than :value items.', - 'file' => 'The :attribute must be less than :value kilobytes.', + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'ipv4' => 'The :attribute must be a valid IPv4 address.', + 'ipv6' => 'The :attribute must be a valid IPv6 address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'lowercase' => 'The :attribute field must be lowercase.', + 'lt' => [ + 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', 'numeric' => 'The :attribute must be less than :value.', - 'string' => 'The :attribute must be less than :value characters.', + 'string' => 'The :attribute must be less than :value characters.', ], - 'lte' => [ - 'array' => 'The :attribute must not have more than :value items.', - 'file' => 'The :attribute must be less than or equal :value kilobytes.', + 'lte' => [ + 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal :value kilobytes.', 'numeric' => 'The :attribute must be less than or equal :value.', - 'string' => 'The :attribute must be less than or equal :value characters.', + 'string' => 'The :attribute must be less than or equal :value characters.', ], - 'mac_address' => 'The :attribute must be a valid MAC address.', - 'max' => [ - 'array' => 'The :attribute may not have more than :max items.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', + 'mac_address' => 'The :attribute must be a valid MAC address.', + 'max' => [ + 'array' => 'The :attribute may not have more than :max items.', + 'file' => 'The :attribute may not be greater than :max kilobytes.', 'numeric' => 'The :attribute may not be greater than :max.', - 'string' => 'The :attribute may not be greater than :max characters.', + 'string' => 'The :attribute may not be greater than :max characters.', ], - 'max_digits' => 'The :attribute field must not have more than :max digits.', - 'mimes' => 'The :attribute must be a file of type: :values.', - 'mimetypes' => 'The :attribute must be a file of type: :values.', - 'min' => [ - 'array' => 'The :attribute must have at least :min items.', - 'file' => 'The :attribute must be at least :min kilobytes.', + 'max_digits' => 'The :attribute field must not have more than :max digits.', + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ + 'array' => 'The :attribute must have at least :min items.', + 'file' => 'The :attribute must be at least :min kilobytes.', 'numeric' => 'The :attribute must be at least :min.', - 'string' => 'The :attribute must be at least :min characters.', + 'string' => 'The :attribute must be at least :min characters.', ], - 'min_digits' => 'The :attribute field must have at least :min digits.', - 'missing' => 'The :attribute field must be missing.', - 'missing_if' => 'The :attribute field must be missing when :other is :value.', - 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', - 'missing_with' => 'The :attribute field must be missing when :values is present.', - 'missing_with_all' => 'The :attribute field must be missing when :values are present.', - 'multiple_of' => 'The :attribute must be a multiple of :value.', - 'not_in' => 'The selected :attribute is invalid.', - 'not_regex' => 'The :attribute format is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'password' => [ - 'letters' => 'The :attribute field must contain at least one letter.', - 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', - 'numbers' => 'The :attribute field must contain at least one number.', - 'symbols' => 'The :attribute field must contain at least one symbol.', + 'min_digits' => 'The :attribute field must have at least :min digits.', + 'missing' => 'The :attribute field must be missing.', + 'missing_if' => 'The :attribute field must be missing when :other is :value.', + 'missing_unless' => 'The :attribute field must be missing unless :other is :value.', + 'missing_with' => 'The :attribute field must be missing when :values is present.', + 'missing_with_all' => 'The :attribute field must be missing when :values are present.', + 'multiple_of' => 'The :attribute must be a multiple of :value.', + 'not_in' => 'The selected :attribute is invalid.', + 'not_regex' => 'The :attribute format is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'password' => [ + 'letters' => 'The :attribute field must contain at least one letter.', + 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute field must contain at least one number.', + 'symbols' => 'The :attribute field must contain at least one symbol.', 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', ], - 'present' => 'The :attribute field must be present.', - 'prohibited' => 'The :attribute field is prohibited.', - 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', - 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', - 'prohibits' => 'The :attribute field prohibits :other from being present.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_array_keys' => 'The :attribute field must contain entries for: :values.', - 'required_if' => 'The :attribute field is required when :other is :value.', + 'present' => 'The :attribute field must be present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', + 'required_if' => 'The :attribute field is required when :other is :value.', 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values is present.', - 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values is present.', + 'required_without' => 'The :attribute field is required when :values is not present.', 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size' => [ - 'array' => 'The :attribute must contain :size items.', - 'file' => 'The :attribute must be :size kilobytes.', + 'same' => 'The :attribute and :other must match.', + 'size' => [ + 'array' => 'The :attribute must contain :size items.', + 'file' => 'The :attribute must be :size kilobytes.', 'numeric' => 'The :attribute must be :size.', - 'string' => 'The :attribute must be :size characters.', + 'string' => 'The :attribute must be :size characters.', ], - 'starts_with' => 'The :attribute must start with one of the following: :values', - 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', - 'ulid' => 'The :attribute field must be a valid ULID.', - 'unique' => 'The :attribute has already been taken.', - 'uploaded' => 'The :attribute failed to upload.', - 'uppercase' => 'The :attribute field must be uppercase.', - 'url' => 'The :attribute format is invalid.', - 'uuid' => 'The :attribute must be a valid UUID.', - 'attributes' => [ - 'address' => 'address', - 'age' => 'age', - 'amount' => 'amount', - 'area' => 'area', - 'available' => 'available', - 'birthday' => 'birthday', - 'body' => 'body', - 'city' => 'city', - 'content' => 'content', - 'country' => 'country', - 'created_at' => 'created at', - 'creator' => 'creator', - 'current_password' => 'current password', - 'date' => 'date', - 'date_of_birth' => 'date of birth', - 'day' => 'day', - 'deleted_at' => 'deleted at', - 'description' => 'description', - 'district' => 'district', - 'duration' => 'duration', - 'email' => 'email', - 'excerpt' => 'excerpt', - 'filter' => 'filter', - 'first_name' => 'first name', - 'gender' => 'gender', - 'group' => 'group', - 'hour' => 'hour', - 'image' => 'image', - 'last_name' => 'last name', - 'lesson' => 'lesson', - 'line_address_1' => 'line address 1', - 'line_address_2' => 'line address 2', - 'message' => 'message', - 'middle_name' => 'middle name', - 'minute' => 'minute', - 'mobile' => 'mobile', - 'month' => 'month', - 'name' => 'name', - 'national_code' => 'national code', - 'number' => 'number', - 'password' => 'password', - 'password_confirmation' => 'password confirmation', - 'phone' => 'phone', - 'photo' => 'photo', - 'postal_code' => 'postal code', - 'price' => 'price', - 'province' => 'province', + 'starts_with' => 'The :attribute must start with one of the following: :values', + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid zone.', + 'ulid' => 'The :attribute field must be a valid ULID.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'uppercase' => 'The :attribute field must be uppercase.', + 'url' => 'The :attribute format is invalid.', + 'uuid' => 'The :attribute must be a valid UUID.', + 'attributes' => [ + 'address' => 'address', + 'age' => 'age', + 'amount' => 'amount', + 'area' => 'area', + 'available' => 'available', + 'birthday' => 'birthday', + 'body' => 'body', + 'city' => 'city', + 'content' => 'content', + 'country' => 'country', + 'created_at' => 'created at', + 'creator' => 'creator', + 'current_password' => 'current password', + 'date' => 'date', + 'date_of_birth' => 'date of birth', + 'day' => 'day', + 'deleted_at' => 'deleted at', + 'description' => 'description', + 'district' => 'district', + 'duration' => 'duration', + 'email' => 'email', + 'excerpt' => 'excerpt', + 'filter' => 'filter', + 'first_name' => 'first name', + 'gender' => 'gender', + 'group' => 'group', + 'hour' => 'hour', + 'image' => 'image', + 'last_name' => 'last name', + 'lesson' => 'lesson', + 'line_address_1' => 'line address 1', + 'line_address_2' => 'line address 2', + 'message' => 'message', + 'middle_name' => 'middle name', + 'minute' => 'minute', + 'mobile' => 'mobile', + 'month' => 'month', + 'name' => 'name', + 'national_code' => 'national code', + 'number' => 'number', + 'password' => 'password', + 'password_confirmation' => 'password confirmation', + 'phone' => 'phone', + 'photo' => 'photo', + 'postal_code' => 'postal code', + 'price' => 'price', + 'province' => 'province', 'recaptcha_response_field' => 'recaptcha response field', - 'remember' => 'remember', - 'restored_at' => 'restored at', - 'result_text_under_image' => 'result text under image', - 'role' => 'role', - 'second' => 'second', - 'sex' => 'sex', - 'short_text' => 'short text', - 'size' => 'size', - 'state' => 'state', - 'street' => 'street', - 'student' => 'student', - 'subject' => 'subject', - 'teacher' => 'teacher', - 'terms' => 'terms', - 'test_description' => 'test description', - 'test_locale' => 'test locale', - 'test_name' => 'test name', - 'text' => 'text', - 'time' => 'time', - 'title' => 'title', - 'updated_at' => 'updated at', - 'username' => 'username', - 'year' => 'year', + 'remember' => 'remember', + 'restored_at' => 'restored at', + 'result_text_under_image' => 'result text under image', + 'role' => 'role', + 'second' => 'second', + 'sex' => 'sex', + 'short_text' => 'short text', + 'size' => 'size', + 'state' => 'state', + 'street' => 'street', + 'student' => 'student', + 'subject' => 'subject', + 'teacher' => 'teacher', + 'terms' => 'terms', + 'test_description' => 'test description', + 'test_locale' => 'test locale', + 'test_name' => 'test name', + 'text' => 'text', + 'time' => 'time', + 'title' => 'title', + 'updated_at' => 'updated at', + 'username' => 'username', + 'year' => 'year', ], ]; diff --git a/pint.json b/pint.json new file mode 100644 index 0000000..8538c92 --- /dev/null +++ b/pint.json @@ -0,0 +1,90 @@ +{ + "preset": "laravel", + "rules": { + "array_syntax": { + "syntax": "short" + }, + "no_unused_imports": true, + "unary_operator_spaces": true, + "ordered_imports": { + "imports_order": [ + "class", + "function", + "const" + ], + "sort_algorithm": "alpha" + }, + "phpdoc_align": true, + "ordered_class_elements": { + "order": [ + "use_trait", + "case", + "constant_public", + "constant_protected", + "constant_private", + "property_public", + "property_protected", + "property_private", + "construct", + "destruct", + "magic", + "method_public_static", + "method_public", + "method_protected_static", + "method_protected", + "method_private_static", + "method_private" + ], + "sort_algorithm": "none" + }, + "phpdoc_order": true, + "phpdoc_line_span": { + "property": "single", + "const": "single", + "method": "single" + }, + "single_quote": true, + "blank_line_after_namespace": true, + "blank_line_after_opening_tag": true, + "method_chaining_indentation": true, + "class_attributes_separation": { + "elements": { + "method": "one" + } + }, + "visibility_required": { + "elements": [ + "method", + "property" + ] + }, + "no_superfluous_elseif": true, + "no_useless_else": true, + "simplified_if_return": true, + "ternary_to_null_coalescing": true, + "trim_array_spaces": true, + "cast_spaces": { + "space": "single" + }, + "concat_space": { + "spacing": "one" + }, + "control_structure_braces": true, + "control_structure_continuation_position": true, + "elseif": true, + "yoda_style": false + }, + "exclude": [ + "bootstrap", + "storage", + "vendor", + "docker" + ], + "notName": [ + "*.blade.php" + ], + "notPath": [ + "_ide_helper.php", + "_ide_helper_models.php" + ] +} \ No newline at end of file diff --git a/public/index.php b/public/index.php index 1d69f3a..f3c2ebc 100644 --- a/public/index.php +++ b/public/index.php @@ -16,7 +16,7 @@ | */ -if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { +if (file_exists($maintenance = __DIR__ . '/../storage/framework/maintenance.php')) { require $maintenance; } @@ -31,7 +31,7 @@ | */ -require __DIR__.'/../vendor/autoload.php'; +require __DIR__ . '/../vendor/autoload.php'; /* |-------------------------------------------------------------------------- @@ -44,7 +44,7 @@ | */ -$app = require_once __DIR__.'/../bootstrap/app.php'; +$app = require_once __DIR__ . '/../bootstrap/app.php'; $kernel = $app->make(Kernel::class); diff --git a/routes/api.php b/routes/api.php index d8a258f..e6da814 100644 --- a/routes/api.php +++ b/routes/api.php @@ -20,20 +20,13 @@ Route::get('/healthz', [HealthController::class, 'healthz']); Route::get('/http-test', function (Request $request) { return response()->json([ - "success" => true, + 'success' => true, ], Response::HTTP_OK); })->name('http.test'); // auth routes -include "api/v1/Auth/LoginRoutes.php"; -include "api/v1/RolePermission/RolePermissionRoutes.php"; +include 'api/v1/LoginRoutes.php'; +include 'api/v1/RolePermissionRoutes.php'; //User routes -include "api/v1/User/UserRoutes.php"; - - - - -Route::middleware('auth:sanctum')->get('/user', function (Request $request) { - return $request->user(); -}); +include 'api/v1/UserRoutes.php'; diff --git a/routes/api/v1/Auth/LoginRoutes.php b/routes/api/v1/LoginRoutes.php similarity index 100% rename from routes/api/v1/Auth/LoginRoutes.php rename to routes/api/v1/LoginRoutes.php diff --git a/routes/api/v1/RolePermission/RolePermissionRoutes.php b/routes/api/v1/RolePermission/RolePermissionRoutes.php deleted file mode 100644 index 4505fa7..0000000 --- a/routes/api/v1/RolePermission/RolePermissionRoutes.php +++ /dev/null @@ -1,20 +0,0 @@ - 'v1', 'middleware' => ['auth:sanctum']], function () { - //role - //Route::resource('role', RoleController::class); - Route::get('/role', [RoleController::class , 'index']); - Route::get('/role/{id}', [RoleController::class , 'show']); - Route::post('/role', [RoleController::class , 'store']); - Route::post('/role/update', [RoleController::class , 'update']); - Route::delete('/role/{id}', [RoleController::class , 'destroy']); - Route::post('/role/assign-permission', [RoleController::class, 'assignPermission']); - //permission - Route::get('/permission', [PermissionController::class , 'index']); - Route::post('/permission', [PermissionController::class , 'store']); - Route::delete('/permission/{id}', [PermissionController::class , 'destroy']); - -}); diff --git a/routes/api/v1/RolePermissionRoutes.php b/routes/api/v1/RolePermissionRoutes.php new file mode 100644 index 0000000..95cb984 --- /dev/null +++ b/routes/api/v1/RolePermissionRoutes.php @@ -0,0 +1,19 @@ + 'v1', 'middleware' => ['auth:sanctum']], function () { + //role + Route::get('/role', [RoleController::class, 'index']); + Route::get('/role/{id}', [RoleController::class, 'show']); + Route::post('/role', [RoleController::class, 'store']); + Route::patch('/role/{id}', [RoleController::class, 'update']); + Route::delete('/role/{id}', [RoleController::class, 'destroy']); + Route::post('/role/assign-permission', [RoleController::class, 'assignPermission']); + //permission + Route::get('/permission', [PermissionController::class, 'index']); + Route::post('/permission', [PermissionController::class, 'store']); + Route::delete('/permission/{id}', [PermissionController::class, 'destroy']); + +}); diff --git a/routes/api/v1/User/UserRoutes.php b/routes/api/v1/UserRoutes.php similarity index 53% rename from routes/api/v1/User/UserRoutes.php rename to routes/api/v1/UserRoutes.php index e91602a..1cc1211 100644 --- a/routes/api/v1/User/UserRoutes.php +++ b/routes/api/v1/UserRoutes.php @@ -1,18 +1,19 @@ 'v1', 'middleware' => ['auth:sanctum']], function () { //User Management Roles for admins - Route::get('/user', [UserController::class , 'index']); - Route::get('/user/{id}', [UserController::class , 'show']); - Route::post('/user', [UserController::class , 'store']); - Route::post('/user/update', [UserController::class , 'update']); - Route::delete('/user/{id}', [UserController::class , 'destroy']); + Route::get('/user', [UserController::class, 'index']); + Route::get('/user/{id}', [UserController::class, 'show']); + Route::post('/user', [UserController::class, 'store']); + Route::patch('/user/{id}', [UserController::class, 'update']); + Route::delete('/user/{id}', [UserController::class, 'destroy']); Route::post('/user/assign-role', [UserController::class, 'assignRole']); Route::post('/user/change-password', [UserController::class, 'changePassword']); //Profile - Route::post('/user/profile/update', [UserController::class, 'updateProfile']); + Route::patch('/user/profile/update', [UserController::class, 'updateProfile']); Route::post('/user/profile/change-password', [UserController::class, 'changeProfilePassword']); }); diff --git a/tests/CreatesApplication.php b/tests/CreatesApplication.php index cc68301..1ccefb5 100644 --- a/tests/CreatesApplication.php +++ b/tests/CreatesApplication.php @@ -7,12 +7,10 @@ trait CreatesApplication { - /** - * Creates the application. - */ + /** Creates the application. */ public function createApplication(): Application { - $app = require __DIR__.'/../bootstrap/app.php'; + $app = require __DIR__ . '/../bootstrap/app.php'; $app->make(Kernel::class)->bootstrap(); diff --git a/tests/Feature/LoginFeatureTest.php b/tests/Feature/LoginFeatureTest.php index da7cc4e..d5cf297 100644 --- a/tests/Feature/LoginFeatureTest.php +++ b/tests/Feature/LoginFeatureTest.php @@ -5,8 +5,6 @@ uses(RefreshDatabase::class); -$testUser; - beforeEach(function () { $this->testUser = generateUser(); }); @@ -16,9 +14,9 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', ])->postJson('/api/v1/login', [ - 'email' => $this->testUser->email, - 'password' => '123456', - 'device' => 'testDevice', + 'email' => $this->testUser->email, + 'password' => '123456', + 'device' => 'testDevice', ]); $response->assertStatus(200); @@ -29,9 +27,9 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', ])->postJson('/api/v1/login', [ - 'email' => $this->testUser->email, - 'password' => 'wrongPassword', - 'device' => 'testDevice', + 'email' => $this->testUser->email, + 'password' => 'wrongPassword', + 'device' => 'testDevice', ]); $response->assertStatus(400); @@ -44,9 +42,9 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', ])->postJson('/api/v1/login', [ - 'email' => $this->testUser->email, - 'password' => 'wrongPassword', - 'device' => 'testDevice', + 'email' => $this->testUser->email, + 'password' => 'wrongPassword', + 'device' => 'testDevice', ]); $response->assertStatus(400); diff --git a/tests/Feature/ProfileFeatureTest.php b/tests/Feature/ProfileFeatureTest.php index 7a51ee4..770b256 100644 --- a/tests/Feature/ProfileFeatureTest.php +++ b/tests/Feature/ProfileFeatureTest.php @@ -4,16 +4,12 @@ uses(RefreshDatabase::class); -$testUser; -$authToken; - beforeEach(function () { $authData = generateUserAndAuthToken(); $this->testUser = $authData['user']; $this->authToken = $authData['token']; }); - it('should returns a successful response for viewing profile', function () { $userId = $this->testUser->id; $response = $this->withHeaders([ @@ -30,7 +26,7 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", - ])->postJson("/api/v1/user/profile/update", [ + ])->postJson('/api/v1/user/profile/update', [ 'name' => 'test', ]); $response->assertStatus(422); @@ -40,7 +36,7 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", - ])->postJson("/api/v1/user/profile/update", [ + ])->postJson('/api/v1/user/profile/update', [ 'name' => 'test', 'email' => 'test@2test.com', 'phone' => '1234567890', @@ -61,7 +57,7 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", - ])->postJson("/api/v1/user/profile/change-password", [ + ])->postJson('/api/v1/user/profile/change-password', [ 'current_password' => '123456', 'password' => 'password', 'password_confirmation' => 'password', diff --git a/tests/Feature/UserFeatureTest.php b/tests/Feature/UserFeatureTest.php index 2985cf0..1dd05ab 100644 --- a/tests/Feature/UserFeatureTest.php +++ b/tests/Feature/UserFeatureTest.php @@ -7,9 +7,6 @@ uses(RefreshDatabase::class); -$adminUser; -$authToken; - beforeEach(function () { $authData = generateAdminUserAndAuthToken(); $this->adminUser = $authData['user']; @@ -21,16 +18,16 @@ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", ])->postJson('/api/v1/user', [ - 'name' => 'test name', - 'email' => 'test@test.com', - 'password' => '123456', - 'password_confirmation' => '123456', - 'phone' => '1234567890', - 'designation' => 'manager', - 'address' => 'test address', - 'is_active' => UserStatus::ACTIVE->value, - 'roles' => [UserRoleID::USER_ID->value], - ]); + 'name' => 'test name', + 'email' => 'test@test.com', + 'password' => '123456', + 'password_confirmation' => '123456', + 'phone' => '1234567890', + 'designation' => 'manager', + 'address' => 'test address', + 'is_active' => UserStatus::ACTIVE->value, + 'roles' => [UserRoleID::USER_ID->value], + ]); $response->assertStatus(201); $data = $response->json(); @@ -44,7 +41,6 @@ $this->assertTrue($data['data']['created_by'] === $this->adminUser->id); $this->assertTrue($data['data']['roles'][0] === UserRole::USER->value); - }); it('should returns a successful response after updating a User', function () { @@ -53,15 +49,15 @@ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", ])->postJson('/api/v1/user', [ - 'name' => 'test name', - 'email' => 'test@test.com', - 'password' => '123456', - 'password_confirmation' => '123456', - 'phone' => '1234567890', - 'designation' => 'manager', - 'address' => 'test address', - 'roles' => [UserRoleID::USER_ID->value], - ]); + 'name' => 'test name', + 'email' => 'test@test.com', + 'password' => '123456', + 'password_confirmation' => '123456', + 'phone' => '1234567890', + 'designation' => 'manager', + 'address' => 'test address', + 'roles' => [UserRoleID::USER_ID->value], + ]); $newUserData = $userCreateResponse->json(); $userId = $newUserData['data']['id']; @@ -70,14 +66,14 @@ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", ])->postJson('/api/v1/user/update', [ - 'id' => $userId, - 'name' => 'test user update', - 'email' => 'test@2211test.com', - 'phone' => '1234567890', - 'designation' => 'manager', - 'address' => 'test address update', - 'is_active' => UserStatus::DEACTIVE->value, - ]); + 'id' => $userId, + 'name' => 'test user update', + 'email' => 'test@2211test.com', + 'phone' => '1234567890', + 'designation' => 'manager', + 'address' => 'test address update', + 'is_active' => UserStatus::DEACTIVE->value, + ]); $response->assertStatus(200); $data = $response->json(); $this->assertTrue($data['data']['id'] === $userId); @@ -96,15 +92,15 @@ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", ])->postJson('/api/v1/user', [ - 'name' => 'test name', - 'email' => 'test@test.com', - 'password' => '123456', - 'password_confirmation' => '123456', - 'phone' => '1234567890', - 'designation' => 'manager', - 'address' => 'test address', - 'roles' => [UserRoleID::USER_ID->value], - ]); + 'name' => 'test name', + 'email' => 'test@test.com', + 'password' => '123456', + 'password_confirmation' => '123456', + 'phone' => '1234567890', + 'designation' => 'manager', + 'address' => 'test address', + 'roles' => [UserRoleID::USER_ID->value], + ]); $newUserData = $userCreateResponse->json(); $userId = $newUserData['data']['id']; @@ -122,15 +118,15 @@ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", ])->postJson('/api/v1/user', [ - 'name' => 'test name', - 'email' => 'test@test.com', - 'password' => '123456', - 'password_confirmation' => '123456', - 'phone' => '1234567890', - 'designation' => 'manager', - 'address' => 'test address', - 'roles' => [UserRoleID::USER_ID->value], - ]); + 'name' => 'test name', + 'email' => 'test@test.com', + 'password' => '123456', + 'password_confirmation' => '123456', + 'phone' => '1234567890', + 'designation' => 'manager', + 'address' => 'test address', + 'roles' => [UserRoleID::USER_ID->value], + ]); $newUserData = $userCreateResponse->json(); $userId = $newUserData['data']['id']; @@ -138,7 +134,7 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", - ])->postJson("/api/v1/user/change-password", [ + ])->postJson('/api/v1/user/change-password', [ 'user_id' => $userId, 'password' => '123456', 'password_confirmation' => '123456', diff --git a/tests/Pest.php b/tests/Pest.php index 2a0b7bf..50f1f16 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -1,4 +1,5 @@ create(); $user->assignRole(UserRole::USER); + return $user; } @@ -68,6 +70,7 @@ function generateSuperAdmin() $user->id = UserRoleID::SUPER_ADMIN_ID->value; $user->save(); $user->assignRole(UserRole::SUPER_ADMIN); + return $user; } @@ -75,6 +78,7 @@ function generateAdmin() { $user = User::factory()->create(); $user->assignRole(UserRole::ADMIN); + return $user; } @@ -83,6 +87,7 @@ function generateUserAndAuthToken() $user = User::factory()->create(); $user->assignRole(UserRole::USER); $token = $user->createToken('test')->plainTextToken; + return [ 'user' => $user, 'token' => $token, @@ -94,6 +99,7 @@ function generateAdminUserAndAuthToken() $user = User::factory()->create(); $user->assignRole(UserRole::ADMIN); $token = $user->createToken('test')->plainTextToken; + return [ 'user' => $user, 'token' => $token, @@ -108,6 +114,7 @@ function generateSuperAdminUserAndAuthToken() $user->save(); $user->assignRole(UserRole::SUPER_ADMIN); $token = $user->createToken('test')->plainTextToken; + return [ 'user' => $user, 'token' => $token, diff --git a/tests/Unit/LoginUnitTest.php b/tests/Unit/LoginUnitTest.php index 3146622..f15ee8a 100644 --- a/tests/Unit/LoginUnitTest.php +++ b/tests/Unit/LoginUnitTest.php @@ -9,9 +9,6 @@ uses(RefreshDatabase::class); -$authService; -$testUser; - beforeEach(function () { $smsService = new SmsService(); $otpService = new OtpService($smsService); diff --git a/tests/Unit/ProfileUnitTest.php b/tests/Unit/ProfileUnitTest.php index 39608eb..7ca0756 100644 --- a/tests/Unit/ProfileUnitTest.php +++ b/tests/Unit/ProfileUnitTest.php @@ -7,10 +7,6 @@ uses(RefreshDatabase::class); -$userService; -$testUser; -$superAdminUser; - beforeEach(function () { $this->userService = new UserService(); $this->testUser = generateUser(); diff --git a/tests/Unit/UserUnitTest.php b/tests/Unit/UserUnitTest.php index ca74fe4..a8a41cd 100644 --- a/tests/Unit/UserUnitTest.php +++ b/tests/Unit/UserUnitTest.php @@ -9,10 +9,6 @@ uses(RefreshDatabase::class); -$userService; -$adminUser; -$superAdminUser; - beforeEach(function () { $this->userService = new UserService(); $this->adminUser = generateAdmin(); @@ -44,7 +40,6 @@ expect($user->roles()->pluck('name')->toArray())->toContain(UserRole::USER->value); }); - it('should update a user', function () { $userData = new UserDTO( null, @@ -118,7 +113,7 @@ [UserRole::USER] ); $user = $this->userService->insertUserData($userData); - $this->userService->assignUserRole($user, [2,3]); + $this->userService->assignUserRole($user, [2, 3]); expect($user->roles()->pluck('name')->toArray())->toContain(UserRole::ADMIN->value); }); From e3af065db45c81e833c6d5973fd09254637af4e9 Mon Sep 17 00:00:00 2001 From: Md Azizul Hakim Date: Sun, 13 Apr 2025 16:48:54 +0600 Subject: [PATCH 2/2] Fix unit tests --- app/Models/User.php | 1 + tests/Feature/ProfileFeatureTest.php | 4 ++-- tests/Feature/UserFeatureTest.php | 6 +++--- tests/Unit/UserUnitTest.php | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 5f77395..b1794f2 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -64,6 +64,7 @@ class User extends Authenticatable 'phone_verified_at' => 'datetime', 'last_login_at' => 'datetime', 'password' => 'hashed', + 'is_active' => 'boolean', ]; public function isSuperAdmin(): bool diff --git a/tests/Feature/ProfileFeatureTest.php b/tests/Feature/ProfileFeatureTest.php index 770b256..020f764 100644 --- a/tests/Feature/ProfileFeatureTest.php +++ b/tests/Feature/ProfileFeatureTest.php @@ -26,7 +26,7 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", - ])->postJson('/api/v1/user/profile/update', [ + ])->patchJson('/api/v1/user/profile/update', [ 'name' => 'test', ]); $response->assertStatus(422); @@ -36,7 +36,7 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", - ])->postJson('/api/v1/user/profile/update', [ + ])->patchJson('/api/v1/user/profile/update', [ 'name' => 'test', 'email' => 'test@2test.com', 'phone' => '1234567890', diff --git a/tests/Feature/UserFeatureTest.php b/tests/Feature/UserFeatureTest.php index 1dd05ab..6f8ed3c 100644 --- a/tests/Feature/UserFeatureTest.php +++ b/tests/Feature/UserFeatureTest.php @@ -37,7 +37,7 @@ $this->assertTrue($data['data']['phone'] === '1234567890'); $this->assertTrue($data['data']['address'] === 'test address'); $this->assertTrue($data['data']['designation'] === 'manager'); - $this->assertTrue($data['data']['is_active'] === UserStatus::ACTIVE->value); + $this->assertTrue($data['data']['is_active'] === true); $this->assertTrue($data['data']['created_by'] === $this->adminUser->id); $this->assertTrue($data['data']['roles'][0] === UserRole::USER->value); @@ -65,7 +65,7 @@ $response = $this->withHeaders([ 'Accept' => 'application/json', 'authorization' => "Bearer $this->authToken", - ])->postJson('/api/v1/user/update', [ + ])->patchJson("/api/v1/user/{$userId}", [ 'id' => $userId, 'name' => 'test user update', 'email' => 'test@2211test.com', @@ -81,7 +81,7 @@ $this->assertTrue($data['data']['email'] === 'test@2211test.com'); $this->assertTrue($data['data']['phone'] === '1234567890'); $this->assertTrue($data['data']['address'] === 'test address update'); - $this->assertTrue($data['data']['is_active'] === UserStatus::DEACTIVE->value); + $this->assertTrue($data['data']['is_active'] === false); $this->assertTrue($data['data']['updated_by'] === $this->adminUser->id); }); diff --git a/tests/Unit/UserUnitTest.php b/tests/Unit/UserUnitTest.php index a8a41cd..d725e94 100644 --- a/tests/Unit/UserUnitTest.php +++ b/tests/Unit/UserUnitTest.php @@ -36,7 +36,7 @@ expect(User::where('name', 'test name')->exists())->toBeTrue(); expect($user->email)->toBe('test@test.com'); expect($user->phone)->toBe('012378723200'); - expect($user->is_active)->toBe(UserStatus::ACTIVE); + expect($user->is_active)->toBe(true); expect($user->roles()->pluck('name')->toArray())->toContain(UserRole::USER->value); }); @@ -76,7 +76,7 @@ expect($updatedUser->email)->toBe('test@2test.com'); expect($updatedUser->phone)->toBe('012872320010'); expect($updatedUser->address)->toBe('test addresss update'); - expect($updatedUser->is_active)->toBe(UserStatus::DEACTIVE); + expect($updatedUser->is_active)->toBe(false); }); it('should delete a user', function () {