From 21fc123c3257a500276ad393ea6d8bf2a3cd0977 Mon Sep 17 00:00:00 2001 From: Mohammad Alavi Date: Wed, 27 Apr 2022 21:56:16 +0430 Subject: [PATCH] Migrate to laravel 9 (#675) --- .env.example | 6 +- .gitattributes | 15 +- .gitignore | 6 +- CHANGELOG.md | 62 + README.md | 2 +- .../ApiLoginProxyForWebClientAction.php | 13 +- .../Actions/ApiLogoutAction.php | 8 +- .../ApiRefreshProxyForWebClientAction.php | 4 +- .../Actions/ForgotPasswordAction.php | 4 +- .../Actions/GetAuthenticatedUserAction.php | 8 +- .../Actions/RegisterUserAction.php | 4 +- .../Actions/ResetPasswordAction.php | 4 +- .../Actions/SendVerificationEmailAction.php | 8 +- .../Actions/VerifyEmailAction.php | 4 +- .../Authentication/Actions/WebLoginAction.php | 13 +- .../Actions/WebLogoutAction.php | 9 +- .../Classes/LoginCustomAttribute.php | 97 + .../Exceptions/EmailNotVerifiedException.php | 4 +- .../InvalidEmailVerificationDataException.php | 4 +- .../InvalidResetPasswordTokenException.php | 4 +- .../Exceptions/LoginFailedException.php | 4 +- .../RefreshTokenMissingException.php | 4 +- .../Authentication/Helpers/helpers.php | 39 - .../Authentication/Mails/ForgotPassword.php | 7 +- .../Middlewares/RedirectIfAuthenticated.php | 10 +- .../Notifications/EmailVerified.php | 4 +- .../Notifications/PasswordReset.php | 4 +- .../Notifications/VerifyEmail.php | 18 +- .../Authentication/Notifications/Welcome.php | 4 +- .../Tasks/CallOAuthServerTask.php | 12 +- .../Tasks/CreatePasswordResetTokenTask.php | 4 +- .../Tasks/CreateUserByCredentialsTask.php | 4 +- .../Tasks/ExtractLoginCustomAttributeTask.php | 50 - .../Authentication/Tasks/LoginTask.php | 6 +- .../Tasks/MakeRefreshCookieTask.php | 4 +- .../Tasks/SendVerificationEmailTask.php | 4 +- .../Unit/CreateUserByCredentialsTaskTest.php | 2 +- .../Tests/Unit/ForgotPasswordActionTest.php | 2 - ...kTest.php => LoginCustomAttributeTest.php} | 13 +- .../LoginAttributeCaseSensitivityTrait.php | 15 - .../GetAuthenticatedUserController.php | 2 + .../UI/API/Controllers/LogoutController.php | 4 + .../API/Controllers/VerifyEmailController.php | 2 + .../UI/API/Requests/ForgotPasswordRequest.php | 4 +- .../Requests/GetAuthenticatedUserRequest.php | 4 +- .../LoginProxyPasswordGrantRequest.php | 9 +- .../UI/API/Requests/LogoutRequest.php | 4 +- .../UI/API/Requests/RefreshProxyRequest.php | 4 +- .../UI/API/Requests/RegisterUserRequest.php | 4 +- .../UI/API/Requests/ResetPasswordRequest.php | 4 +- .../Requests/SendVerificationEmailRequest.php | 4 +- .../UI/API/Requests/VerifyEmailRequest.php | 4 +- .../UI/WEB/Controllers/LoginController.php | 7 + .../UI/WEB/Controllers/LogoutController.php | 4 + .../UI/WEB/Requests/LoginRequest.php | 7 +- .../UI/WEB/Requests/LogoutRequest.php | 4 +- .../UI/WEB/Views/login.blade.php | 34 +- .../AppSection/Authentication/composer.json | 2 +- .../Actions/AssignRolesToUserAction.php | 6 +- .../Actions/AttachPermissionsToRoleAction.php | 6 +- .../Actions/CreatePermissionAction.php | 6 +- .../Actions/CreateRoleAction.php | 6 +- .../Actions/DeleteRoleAction.php | 4 +- .../DetachPermissionsFromRoleAction.php | 6 +- .../Actions/FindPermissionAction.php | 6 +- .../Authorization/Actions/FindRoleAction.php | 6 +- .../Actions/GetAllPermissionsAction.php | 8 +- .../Actions/GetAllRolesAction.php | 8 +- .../GiveAllPermissionsToRoleAction.php | 29 - .../Actions/RevokeRolesFromUserAction.php | 6 +- .../Actions/SyncPermissionsOnRoleAction.php | 6 +- .../Actions/SyncUserRolesAction.php | 6 +- .../Authorization/Configs/permission.php | 40 +- .../Data/Factories/PermissionFactory.php | 5 +- .../Data/Factories/RoleFactory.php | 9 +- ..._12_29_201047_create_permission_tables.php | 100 +- ...3_add_extra_fields_to_permissions_tale.php | 30 + ...122522_add_extra_fields_to_roles_table.php | 30 + .../Repositories/PermissionRepository.php | 4 +- .../Data/Repositories/RoleRepository.php | 4 +- .../AuthorizationDefaultUsersSeeder_4.php | 4 +- ...rizationGivePermissionsToRolesSeeder_3.php | 16 +- .../AuthorizationPermissionsSeeder_1.php | 18 +- .../Seeders/AuthorizationRolesSeeder_2.php | 10 +- .../Authorization/Models/Permission.php | 2 +- .../AppSection/Authorization/Models/Role.php | 2 +- .../Tasks/AssignRolesToUserTask.php | 4 +- .../Tasks/CreatePermissionTask.php | 19 +- .../Authorization/Tasks/CreateRoleTask.php | 15 +- .../Authorization/Tasks/DeleteRoleTask.php | 9 +- .../Tasks/DetachPermissionsFromRoleTask.php | 4 +- .../Tasks/FindPermissionTask.php | 29 +- .../Authorization/Tasks/FindRoleTask.php | 29 +- .../Tasks/GetAllPermissionsTask.php | 17 +- .../Authorization/Tasks/GetAllRolesTask.php | 23 +- .../Tasks/RevokeRoleFromUserTask.php | 9 +- .../Tests/Unit/CreatePermissionTaskTest.php | 2 +- .../Tests/Unit/CreateRoleTaskTest.php | 2 +- .../GiveAllPermissionsToRoleActionTest.php | 24 - .../AssignRolesToUserController.php | 5 +- .../AttachPermissionsToRoleController.php | 5 +- .../API/Controllers/CreateRoleController.php | 4 +- .../DetachPermissionsFromRoleController.php | 5 +- .../Controllers/FindPermissionController.php | 2 + .../UI/API/Controllers/FindRoleController.php | 2 + .../GetAllPermissionsController.php | 6 +- .../API/Controllers/GetAllRolesController.php | 6 +- .../RevokeRolesFromUserController.php | 2 + .../SyncPermissionOnRoleController.php | 2 + .../Controllers/SyncUserRolesController.php | 4 +- .../API/Requests/AssignRolesToUserRequest.php | 4 +- .../AttachPermissionsToRoleRequest.php | 4 +- .../UI/API/Requests/CreateRoleRequest.php | 4 +- .../UI/API/Requests/DeleteRoleRequest.php | 4 +- .../DetachPermissionsFromRoleRequest.php | 4 +- .../UI/API/Requests/FindPermissionRequest.php | 4 +- .../UI/API/Requests/FindRoleRequest.php | 4 +- .../API/Requests/GetAllPermissionsRequest.php | 4 +- .../UI/API/Requests/GetAllRolesRequest.php | 4 +- .../Requests/RevokeRolesFromUserRequest.php | 4 +- .../Requests/SyncPermissionsOnRoleRequest.php | 4 +- .../UI/API/Requests/SyncUserRolesRequest.php | 4 +- .../Functional/AssignRolesToUserTest.php | 25 +- .../API/Tests/Functional/DeleteRoleTest.php | 2 - .../Transformers/PermissionTransformer.php | 4 +- .../UI/API/Transformers/RoleTransformer.php | 4 +- .../GiveAllPermissionsToRoleCommand.php | 29 - .../UI/CLI/Tests/CliTestCase.php | 15 - .../GiveAllPermissionsToRoleTest.php | 29 - .../Controllers/UnauthorizedController.php | 19 + .../UI/WEB/Requests/UnauthorizedRequest.php | 49 + .../UI/WEB/Routes/GetUnauthorized.php | 7 + .../UI/WEB/Views/unauthorized.blade.php | 43 + .../AppSection/Authorization/composer.json | 2 +- .../User/Actions/CreateAdminAction.php | 36 +- .../User/Actions/DeleteUserAction.php | 4 +- .../User/Actions/FindUserByIdAction.php | 6 +- .../User/Actions/GetAllUsersAction.php | 7 +- .../User/Actions/UpdateUserAction.php | 4 +- .../User/Actions/UpdateUserPasswordAction.php | 4 +- .../User/Data/Factories/UserFactory.php | 10 +- .../2000_01_01_000001_create_users_table.php | 9 +- ...01_000002_create_password_resets_table.php | 9 +- .../User/Data/Repositories/UserRepository.php | 4 +- .../Data/Seeders/UserPermissionsSeeder_1.php | 18 +- .../AppSection/User/Models/User.php | 4 +- .../PasswordUpdatedNotification.php | 4 +- .../AppSection/User/Tasks/DeleteUserTask.php | 9 +- .../User/Tasks/FindUserByEmailTask.php | 6 +- .../User/Tasks/FindUserByIdTask.php | 6 +- .../AppSection/User/Tasks/GetAllUsersTask.php | 7 +- .../AppSection/User/Tasks/UpdateUserTask.php | 10 +- .../API/Controllers/DeleteUserController.php | 2 + .../Controllers/FindUserByIdController.php | 2 + .../API/Controllers/GetAllUsersController.php | 4 +- .../UI/API/Requests/DeleteUserRequest.php | 4 +- .../UI/API/Requests/FindUserByIdRequest.php | 4 +- .../UI/API/Requests/GetAllUsersRequest.php | 4 +- .../Requests/UpdateUserPasswordRequest.php | 4 +- .../UI/API/Requests/UpdateUserRequest.php | 4 +- .../UI/API/Transformers/UserTransformer.php | 4 +- .../UI/CLI/Commands/CreateAdminCommand.php | 4 +- app/Ship/Commands/closures.php | 6 +- app/Ship/Configs/apiato.php | 8 +- .../Exceptions/Handlers/ExceptionsHandler.php | 27 +- app/Ship/Kernels/HttpKernel.php | 15 +- app/Ship/Middlewares/EncryptCookies.php | 2 +- .../PreventRequestsDuringMaintenance.php | 2 +- app/Ship/Middlewares/TrimStrings.php | 2 +- app/Ship/Middlewares/TrustHosts.php | 4 +- app/Ship/Middlewares/TrustProxies.php | 2 +- app/Ship/Middlewares/VerifyCsrfToken.php | 2 +- ...9_12_174826_create_notifications_table.php | 4 +- ..._08_19_000000_create_failed_jobs_table.php | 4 +- .../2021_03_01_150940_create_jobs_table.php | 6 +- app/Ship/Parents/Jobs/Job.php | 2 - .../Providers/EventServiceProvider.php | 22 +- .../Providers/RouteServiceProvider.php | 14 + app/Ship/Providers/RouteServiceProvider.php | 9 + app/Ship/composer.json | 10 +- artisan | 2 +- composer.json | 78 +- composer.lock | 2320 ++++++----------- config/app.php | 69 +- config/auth.php | 6 +- config/broadcasting.php | 3 + config/cache.php | 15 +- config/cors.php | 24 +- config/database.php | 10 +- config/filesystems.php | 25 +- config/hashing.php | 6 +- config/logging.php | 22 +- config/mail.php | 13 +- config/services.php | 2 + config/session.php | 12 +- database/factories/ModelFactory.php | 2 +- database/seeders/DatabaseSeeder.php | 2 - {resources/lang => lang}/ar/auth.php | 0 {resources/lang => lang}/ar/pagination.php | 0 {resources/lang => lang}/ar/passwords.php | 0 {resources/lang => lang}/ar/validation.php | 0 {resources/lang => lang}/en/auth.php | 1 + {resources/lang => lang}/en/pagination.php | 0 {resources/lang => lang}/en/passwords.php | 4 +- {resources/lang => lang}/en/validation.php | 7 + {resources/lang => lang}/es/auth.php | 0 {resources/lang => lang}/es/pagination.php | 0 {resources/lang => lang}/es/passwords.php | 0 {resources/lang => lang}/es/validation.php | 0 {resources/lang => lang}/fa/auth.php | 0 {resources/lang => lang}/fa/pagination.php | 0 {resources/lang => lang}/fa/passwords.php | 0 {resources/lang => lang}/fa/validation.php | 0 {resources/lang => lang}/fr/auth.php | 0 {resources/lang => lang}/fr/pagination.php | 0 {resources/lang => lang}/fr/passwords.php | 0 {resources/lang => lang}/fr/validation.php | 0 package-lock.json | 372 +-- package.json | 10 +- phpunit.xml | 28 +- 220 files changed, 2005 insertions(+), 2846 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 app/Containers/AppSection/Authentication/Classes/LoginCustomAttribute.php delete mode 100644 app/Containers/AppSection/Authentication/Helpers/helpers.php delete mode 100644 app/Containers/AppSection/Authentication/Tasks/ExtractLoginCustomAttributeTask.php rename app/Containers/AppSection/Authentication/Tests/Unit/{ExtractLoginCustomAttributeTaskTest.php => LoginCustomAttributeTest.php} (72%) delete mode 100644 app/Containers/AppSection/Authentication/Traits/LoginAttributeCaseSensitivityTrait.php delete mode 100644 app/Containers/AppSection/Authorization/Actions/GiveAllPermissionsToRoleAction.php create mode 100644 app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122453_add_extra_fields_to_permissions_tale.php create mode 100644 app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122522_add_extra_fields_to_roles_table.php delete mode 100644 app/Containers/AppSection/Authorization/Tests/Unit/GiveAllPermissionsToRoleActionTest.php delete mode 100644 app/Containers/AppSection/Authorization/UI/CLI/Commands/GiveAllPermissionsToRoleCommand.php delete mode 100644 app/Containers/AppSection/Authorization/UI/CLI/Tests/CliTestCase.php delete mode 100644 app/Containers/AppSection/Authorization/UI/CLI/Tests/Functional/GiveAllPermissionsToRoleTest.php create mode 100644 app/Containers/AppSection/Authorization/UI/WEB/Controllers/UnauthorizedController.php create mode 100644 app/Containers/AppSection/Authorization/UI/WEB/Requests/UnauthorizedRequest.php create mode 100644 app/Containers/AppSection/Authorization/UI/WEB/Routes/GetUnauthorized.php create mode 100644 app/Containers/AppSection/Authorization/UI/WEB/Views/unauthorized.blade.php rename {resources/lang => lang}/ar/auth.php (100%) rename {resources/lang => lang}/ar/pagination.php (100%) rename {resources/lang => lang}/ar/passwords.php (100%) rename {resources/lang => lang}/ar/validation.php (100%) rename {resources/lang => lang}/en/auth.php (91%) rename {resources/lang => lang}/en/pagination.php (100%) rename {resources/lang => lang}/en/passwords.php (83%) rename {resources/lang => lang}/en/validation.php (94%) rename {resources/lang => lang}/es/auth.php (100%) rename {resources/lang => lang}/es/pagination.php (100%) rename {resources/lang => lang}/es/passwords.php (100%) rename {resources/lang => lang}/es/validation.php (100%) rename {resources/lang => lang}/fa/auth.php (100%) rename {resources/lang => lang}/fa/pagination.php (100%) rename {resources/lang => lang}/fa/passwords.php (100%) rename {resources/lang => lang}/fa/validation.php (100%) rename {resources/lang => lang}/fr/auth.php (100%) rename {resources/lang => lang}/fr/pagination.php (100%) rename {resources/lang => lang}/fr/passwords.php (100%) rename {resources/lang => lang}/fr/validation.php (100%) diff --git a/.env.example b/.env.example index d45ce6f04..a23d03a76 100644 --- a/.env.example +++ b/.env.example @@ -17,9 +17,9 @@ HASH_ID=true HASH_ID_KEY=apiato HASH_ID_LENGTH=16 -API_RATE_LIMIT_ENABLED=true -API_RATE_LIMIT_ATTEMPTS=30 -API_RATE_LIMIT_EXPIRES=1 +GLOBAL_API_RATE_LIMIT_ENABLED=true +GLOBAL_API_RATE_LIMIT_ATTEMPTS_PER_MIN=30 +GLOBAL_API_RATE_LIMIT_EXPIRES_IN_MIN=1 PAGINATION_LIMIT_DEFAULT=10 PAGINATION_SKIP=false diff --git a/.gitattributes b/.gitattributes index 6bc5a7499..510d9961f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,10 @@ * text=auto -*.css linguist-vendored -*.scss linguist-vendored -*.js linguist-vendored -.github export-ignore -CHANGELOG.md export-ignore -.travis.yml export-ignore -.env.travis export-ignore + +*.blade.php diff=html +*.css diff=css +*.html diff=html +*.md diff=markdown +*.php diff=php + /.github export-ignore +CHANGELOG.md export-ignore diff --git a/.gitignore b/.gitignore index 41eaef1bf..24ecbb8d3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,21 +4,21 @@ /storage/*.key /vendor .env -.env.testing .env.backup .phpunit.result.cache Homestead.json Homestead.yaml npm-debug.log yarn-error.log +/.idea +/.vscode +.env.testing storage/logs/laravel.log /public/uploads/ /laradock*/ _ide_helper*.php .phpstorm.meta.php /.vagrant -/.idea -/.vscode html_coverage Vagrantfile after.sh diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..64afb2d2d --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,62 @@ +## [v11.0.0](https://github.com/apiato/apiato/compare/v10.0.15...v11.0.0) - 2022-04-27 +Apiato 11 includes a variety of changes to the application skeleton. Please consult the diff to see what's new. + +# Release Notes + +### Added + +- Added support for `Laravel 9.0` +- Added new method to transformers: nullableItem() + This helps in situations when you want to check if a relation is null and act base on that. So instead of writing something like this: `return $user->something ? $this->item($user->something, new SomethingTransformer()) : $this->primitive(null);` you can just write `$this->nullableItem($user->something, new SomethingTransformer())` which returns null if the relation doesn't exist. +- Added apiato:generate:policy command +- You can publish compatible containers configs using php artisan `vendor:publish` for now these containers are updated: + Documentation + SocialAuth +- Added new method: `transactionalRun()` to actions. This is just a wrapper around actions `run()` which puts in into a `db::transaction` +- New commands: + - apiato:generate:factory + - apiato:generate:event + - apiato:generate:listener + - apiato:generate:middleware +- `apiato:generate:container` command is greatly improved with new goodies! + - added option to generate API events & listeners for generated container + - added option to generate API tests for generated container + - While generating Containers (API only) You can now choose to generate: + - **Events Listeners** (experimental! I think this might be useless!) + If you choose to generate Events: Events will be implemented in Tasks, e.g. CreateOrderTask will fire OrderCreatedEvent + - **Tests** + If you choose to generate Tests: + If Events are generated then the generated Tests will also test Events being fired! + **Note:** some generated tests are more like placeholders which you can uncomment and modify to your use case but nevertheless you will be way ahead! + You can find the placeholder tests by searching for **TODO TEST** + + +### Fixed + +- Fixed a small issue with the `HashIdTrait` +- Email verification now works actually! See the docs for more info. +- +Numerous more bugfixes... + +### Changed + +- Updated Dependencies in `composer.json` file to the latest versions +- In case of an `exception with empty error bag` we will now return {} instead of [] +- Localization language files are now loaded from `languages` folder instead of `resources/languages` +- Global throttling on routes is now named `api` and is only applied to api routes and not the web routes and can be bypassed using `withoutMiddleware()` method on route. +- Login attribute (email, name, etc...) is now case insensitive. This behaviour can be changed in the configs. +- You can now choose between `Multi Action` or `Single Action` Controllers when using `apiato:generate:container` command. +- Almost all middlewares are moved from ship to core +- apiato:generate:serviceprovider is removed and changed into multiple separate commands + - apiato:generate:provider:generic + - apiato:generate:provider:main + - apiato:generate:provider:middleware + - apiato:generate:provider:event + +### Removed + +- Removed(command): apiato:permissions:toRole +- Dropped support for Settings, Debugger, Payment + + + + diff --git a/README.md b/README.md index 4289ed654..610956765 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Apiato Logo

-

Build scalable API's faster | With PHP 8.0 and Laravel 8.0

+

Build scalable API's faster | With PHP 8.0 and Laravel 9.0

Build Status diff --git a/app/Containers/AppSection/Authentication/Actions/ApiLoginProxyForWebClientAction.php b/app/Containers/AppSection/Authentication/Actions/ApiLoginProxyForWebClientAction.php index d132cbcaf..c90cfd7ca 100644 --- a/app/Containers/AppSection/Authentication/Actions/ApiLoginProxyForWebClientAction.php +++ b/app/Containers/AppSection/Authentication/Actions/ApiLoginProxyForWebClientAction.php @@ -3,18 +3,15 @@ namespace App\Containers\AppSection\Authentication\Actions; use Apiato\Core\Exceptions\IncorrectIdException; +use App\Containers\AppSection\Authentication\Classes\LoginCustomAttribute; use App\Containers\AppSection\Authentication\Exceptions\LoginFailedException; use App\Containers\AppSection\Authentication\Tasks\CallOAuthServerTask; -use App\Containers\AppSection\Authentication\Tasks\ExtractLoginCustomAttributeTask; use App\Containers\AppSection\Authentication\Tasks\MakeRefreshCookieTask; -use App\Containers\AppSection\Authentication\Traits\LoginAttributeCaseSensitivityTrait; use App\Containers\AppSection\Authentication\UI\API\Requests\LoginProxyPasswordGrantRequest; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class ApiLoginProxyForWebClientAction extends Action +class ApiLoginProxyForWebClientAction extends ParentAction { - use LoginAttributeCaseSensitivityTrait; - /** * @param LoginProxyPasswordGrantRequest $request * @return array @@ -30,8 +27,8 @@ public function run(LoginProxyPasswordGrantRequest $request): array ] ); - list($username) = app(ExtractLoginCustomAttributeTask::class)->run($sanitizedData); - $sanitizedData = $this->enrichSanitizedData($this->processLoginAttributeCaseSensitivity($username), $sanitizedData); + list($username) = LoginCustomAttribute::extract($sanitizedData); + $sanitizedData = $this->enrichSanitizedData($username, $sanitizedData); $responseContent = app(CallOAuthServerTask::class)->run($sanitizedData, $request->headers->get('accept-language')); $refreshCookie = app(MakeRefreshCookieTask::class)->run($responseContent['refresh_token']); diff --git a/app/Containers/AppSection/Authentication/Actions/ApiLogoutAction.php b/app/Containers/AppSection/Authentication/Actions/ApiLogoutAction.php index 1a8484211..7d3e28df1 100644 --- a/app/Containers/AppSection/Authentication/Actions/ApiLogoutAction.php +++ b/app/Containers/AppSection/Authentication/Actions/ApiLogoutAction.php @@ -3,13 +3,17 @@ namespace App\Containers\AppSection\Authentication\Actions; use App\Containers\AppSection\Authentication\UI\API\Requests\LogoutRequest; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Laravel\Passport\RefreshTokenRepository; use Laravel\Passport\TokenRepository; use Lcobucci\JWT\Parser; -class ApiLogoutAction extends Action +class ApiLogoutAction extends ParentAction { + /** + * @param LogoutRequest $request + * @return void + */ public function run(LogoutRequest $request): void { $id = app(Parser::class)->parse($request->bearerToken())->claims()->get('jti'); diff --git a/app/Containers/AppSection/Authentication/Actions/ApiRefreshProxyForWebClientAction.php b/app/Containers/AppSection/Authentication/Actions/ApiRefreshProxyForWebClientAction.php index 3b810e8eb..5c8bc0a1d 100644 --- a/app/Containers/AppSection/Authentication/Actions/ApiRefreshProxyForWebClientAction.php +++ b/app/Containers/AppSection/Authentication/Actions/ApiRefreshProxyForWebClientAction.php @@ -8,10 +8,10 @@ use App\Containers\AppSection\Authentication\Tasks\CallOAuthServerTask; use App\Containers\AppSection\Authentication\Tasks\MakeRefreshCookieTask; use App\Containers\AppSection\Authentication\UI\API\Requests\RefreshProxyRequest; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Illuminate\Support\Facades\Request; -class ApiRefreshProxyForWebClientAction extends Action +class ApiRefreshProxyForWebClientAction extends ParentAction { /** * @param RefreshProxyRequest $request diff --git a/app/Containers/AppSection/Authentication/Actions/ForgotPasswordAction.php b/app/Containers/AppSection/Authentication/Actions/ForgotPasswordAction.php index a53ef8fbc..9e127831c 100644 --- a/app/Containers/AppSection/Authentication/Actions/ForgotPasswordAction.php +++ b/app/Containers/AppSection/Authentication/Actions/ForgotPasswordAction.php @@ -7,11 +7,11 @@ use App\Containers\AppSection\Authentication\Tasks\CreatePasswordResetTokenTask; use App\Containers\AppSection\Authentication\UI\API\Requests\ForgotPasswordRequest; use App\Containers\AppSection\User\Tasks\FindUserByEmailTask; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use App\Ship\Parents\Exceptions\Exception; use Illuminate\Support\Facades\Mail; -class ForgotPasswordAction extends Action +class ForgotPasswordAction extends ParentAction { /** * @param ForgotPasswordRequest $request diff --git a/app/Containers/AppSection/Authentication/Actions/GetAuthenticatedUserAction.php b/app/Containers/AppSection/Authentication/Actions/GetAuthenticatedUserAction.php index 5a98936b9..d287c8a52 100644 --- a/app/Containers/AppSection/Authentication/Actions/GetAuthenticatedUserAction.php +++ b/app/Containers/AppSection/Authentication/Actions/GetAuthenticatedUserAction.php @@ -3,11 +3,15 @@ namespace App\Containers\AppSection\Authentication\Actions; use App\Containers\AppSection\Authentication\UI\API\Requests\GetAuthenticatedUserRequest; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Illuminate\Contracts\Auth\Authenticatable; -class GetAuthenticatedUserAction extends Action +class GetAuthenticatedUserAction extends ParentAction { + /** + * @param GetAuthenticatedUserRequest $request + * @return Authenticatable + */ public function run(GetAuthenticatedUserRequest $request): Authenticatable { return $request->user(); diff --git a/app/Containers/AppSection/Authentication/Actions/RegisterUserAction.php b/app/Containers/AppSection/Authentication/Actions/RegisterUserAction.php index d17300615..e739a0cac 100644 --- a/app/Containers/AppSection/Authentication/Actions/RegisterUserAction.php +++ b/app/Containers/AppSection/Authentication/Actions/RegisterUserAction.php @@ -9,9 +9,9 @@ use App\Containers\AppSection\Authentication\UI\API\Requests\RegisterUserRequest; use App\Containers\AppSection\User\Models\User; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class RegisterUserAction extends Action +class RegisterUserAction extends ParentAction { /** * @param RegisterUserRequest $request diff --git a/app/Containers/AppSection/Authentication/Actions/ResetPasswordAction.php b/app/Containers/AppSection/Authentication/Actions/ResetPasswordAction.php index 66a801b6f..34df31bc1 100644 --- a/app/Containers/AppSection/Authentication/Actions/ResetPasswordAction.php +++ b/app/Containers/AppSection/Authentication/Actions/ResetPasswordAction.php @@ -9,12 +9,12 @@ use App\Containers\AppSection\User\Tasks\FindUserByEmailTask; use App\Ship\Exceptions\NotFoundException; use App\Ship\Exceptions\UpdateResourceFailedException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Password; use Illuminate\Support\Str; -class ResetPasswordAction extends Action +class ResetPasswordAction extends ParentAction { /** * @param ResetPasswordRequest $request diff --git a/app/Containers/AppSection/Authentication/Actions/SendVerificationEmailAction.php b/app/Containers/AppSection/Authentication/Actions/SendVerificationEmailAction.php index e216a0bd0..dba266369 100644 --- a/app/Containers/AppSection/Authentication/Actions/SendVerificationEmailAction.php +++ b/app/Containers/AppSection/Authentication/Actions/SendVerificationEmailAction.php @@ -4,10 +4,14 @@ use App\Containers\AppSection\Authentication\Tasks\SendVerificationEmailTask; use App\Containers\AppSection\Authentication\UI\API\Requests\SendVerificationEmailRequest; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class SendVerificationEmailAction extends Action +class SendVerificationEmailAction extends ParentAction { + /** + * @param SendVerificationEmailRequest $request + * @return void + */ public function run(SendVerificationEmailRequest $request): void { app(SendVerificationEmailTask::class)->run($request->user(), $request->verification_url); diff --git a/app/Containers/AppSection/Authentication/Actions/VerifyEmailAction.php b/app/Containers/AppSection/Authentication/Actions/VerifyEmailAction.php index 042a6a664..2e5127fe4 100644 --- a/app/Containers/AppSection/Authentication/Actions/VerifyEmailAction.php +++ b/app/Containers/AppSection/Authentication/Actions/VerifyEmailAction.php @@ -8,10 +8,10 @@ use App\Containers\AppSection\User\Models\User; use App\Containers\AppSection\User\Tasks\FindUserByIdTask; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Throwable; -class VerifyEmailAction extends Action +class VerifyEmailAction extends ParentAction { /** * @param VerifyEmailRequest $request diff --git a/app/Containers/AppSection/Authentication/Actions/WebLoginAction.php b/app/Containers/AppSection/Authentication/Actions/WebLoginAction.php index a08ed3727..b0db4f48a 100644 --- a/app/Containers/AppSection/Authentication/Actions/WebLoginAction.php +++ b/app/Containers/AppSection/Authentication/Actions/WebLoginAction.php @@ -3,20 +3,17 @@ namespace App\Containers\AppSection\Authentication\Actions; use Apiato\Core\Exceptions\IncorrectIdException; +use App\Containers\AppSection\Authentication\Classes\LoginCustomAttribute; use App\Containers\AppSection\Authentication\Exceptions\LoginFailedException; -use App\Containers\AppSection\Authentication\Tasks\ExtractLoginCustomAttributeTask; use App\Containers\AppSection\Authentication\Tasks\LoginTask; -use App\Containers\AppSection\Authentication\Traits\LoginAttributeCaseSensitivityTrait; use App\Containers\AppSection\Authentication\UI\WEB\Requests\LoginRequest; use App\Containers\AppSection\User\Models\User; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Support\Facades\Auth; -class WebLoginAction extends Action +class WebLoginAction extends ParentAction { - use LoginAttributeCaseSensitivityTrait; - /** * @param LoginRequest $request * @return User|Authenticatable|null @@ -31,10 +28,10 @@ public function run(LoginRequest $request): User|Authenticatable|null 'remember_me' => false, ]); - list($username, $loginAttribute) = app(ExtractLoginCustomAttributeTask::class)->run($sanitizedData); + list($username, $loginAttribute) = LoginCustomAttribute::extract($sanitizedData); $loggedIn = app(LoginTask::class)->run( - $this->processLoginAttributeCaseSensitivity($username), + $username, $sanitizedData['password'], $loginAttribute, $sanitizedData['remember_me'] diff --git a/app/Containers/AppSection/Authentication/Actions/WebLogoutAction.php b/app/Containers/AppSection/Authentication/Actions/WebLogoutAction.php index 130428dee..636327b69 100644 --- a/app/Containers/AppSection/Authentication/Actions/WebLogoutAction.php +++ b/app/Containers/AppSection/Authentication/Actions/WebLogoutAction.php @@ -2,13 +2,16 @@ namespace App\Containers\AppSection\Authentication\Actions; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Illuminate\Support\Facades\Auth; -class WebLogoutAction extends Action +class WebLogoutAction extends ParentAction { + /** + * @return void + */ public function run(): void { - Auth::logout(); + Auth::guard('web')->logout(); } } diff --git a/app/Containers/AppSection/Authentication/Classes/LoginCustomAttribute.php b/app/Containers/AppSection/Authentication/Classes/LoginCustomAttribute.php new file mode 100644 index 000000000..790a5d539 --- /dev/null +++ b/app/Containers/AppSection/Authentication/Classes/LoginCustomAttribute.php @@ -0,0 +1,97 @@ + []]; + } + + return $allowedLoginFields; + } + + /** + * @param string $username + * @return string + */ + private static function processLoginAttributeCaseSensitivity(string $username): string + { + return config('appSection-authentication.login.case_sensitive') ? $username : strtolower($username); + } + + public static function mergeValidationRules(array $rules): array + { + $prefix = config('appSection-authentication.login.prefix', ''); + $allowedLoginAttributes = config('appSection-authentication.login.attributes', ['email' => []]); + + if (count($allowedLoginAttributes) === 1) { + $key = array_key_first($allowedLoginAttributes); + $optionalValidators = $allowedLoginAttributes[$key]; + $validators = implode('|', $optionalValidators); + + $fieldName = $prefix . $key; + + $rules[$fieldName] = "required:$fieldName|$validators"; + + return $rules; + } + + foreach ($allowedLoginAttributes as $key => $optionalValidators) { + // build all other login fields together + $otherLoginFields = Arr::except($allowedLoginAttributes, $key); + $otherLoginFields = array_keys($otherLoginFields); + $otherLoginFields = preg_filter('/^/', $prefix, $otherLoginFields); + $otherLoginFields = implode(',', $otherLoginFields); + + $validators = implode('|', $optionalValidators); + + $fieldName = $prefix . $key; + + $rules[$fieldName] = "required_without_all:$otherLoginFields|$validators"; + } + + return $rules; + } +} diff --git a/app/Containers/AppSection/Authentication/Exceptions/EmailNotVerifiedException.php b/app/Containers/AppSection/Authentication/Exceptions/EmailNotVerifiedException.php index 6039ae2e5..1f3b586f8 100644 --- a/app/Containers/AppSection/Authentication/Exceptions/EmailNotVerifiedException.php +++ b/app/Containers/AppSection/Authentication/Exceptions/EmailNotVerifiedException.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\Authentication\Exceptions; -use App\Ship\Parents\Exceptions\Exception; +use App\Ship\Parents\Exceptions\Exception as ParentException; use Symfony\Component\HttpFoundation\Response; -class EmailNotVerifiedException extends Exception +class EmailNotVerifiedException extends ParentException { protected $code = Response::HTTP_FORBIDDEN; protected $message = 'Your email address is not verified.'; diff --git a/app/Containers/AppSection/Authentication/Exceptions/InvalidEmailVerificationDataException.php b/app/Containers/AppSection/Authentication/Exceptions/InvalidEmailVerificationDataException.php index d4cb78c6d..f5eeee06a 100644 --- a/app/Containers/AppSection/Authentication/Exceptions/InvalidEmailVerificationDataException.php +++ b/app/Containers/AppSection/Authentication/Exceptions/InvalidEmailVerificationDataException.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\Authentication\Exceptions; -use App\Ship\Parents\Exceptions\Exception; +use App\Ship\Parents\Exceptions\Exception as ParentException; use Symfony\Component\HttpFoundation\Response; -class InvalidEmailVerificationDataException extends Exception +class InvalidEmailVerificationDataException extends ParentException { protected $code = Response::HTTP_UNPROCESSABLE_ENTITY; protected $message = 'Invalid Email Verification Data Provided.'; diff --git a/app/Containers/AppSection/Authentication/Exceptions/InvalidResetPasswordTokenException.php b/app/Containers/AppSection/Authentication/Exceptions/InvalidResetPasswordTokenException.php index c944bf4b7..ec05edb48 100644 --- a/app/Containers/AppSection/Authentication/Exceptions/InvalidResetPasswordTokenException.php +++ b/app/Containers/AppSection/Authentication/Exceptions/InvalidResetPasswordTokenException.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\Authentication\Exceptions; -use App\Ship\Parents\Exceptions\Exception; +use App\Ship\Parents\Exceptions\Exception as ParentException; use Symfony\Component\HttpFoundation\Response; -class InvalidResetPasswordTokenException extends Exception +class InvalidResetPasswordTokenException extends ParentException { protected $code = Response::HTTP_FORBIDDEN; protected $message = 'Invalid Reset Password Token Provided.'; diff --git a/app/Containers/AppSection/Authentication/Exceptions/LoginFailedException.php b/app/Containers/AppSection/Authentication/Exceptions/LoginFailedException.php index 4bf01b629..c701ae339 100644 --- a/app/Containers/AppSection/Authentication/Exceptions/LoginFailedException.php +++ b/app/Containers/AppSection/Authentication/Exceptions/LoginFailedException.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\Authentication\Exceptions; -use App\Ship\Parents\Exceptions\Exception; +use App\Ship\Parents\Exceptions\Exception as ParentException; use Symfony\Component\HttpFoundation\Response; -class LoginFailedException extends Exception +class LoginFailedException extends ParentException { protected $code = Response::HTTP_UNPROCESSABLE_ENTITY; protected $message = 'An Exception happened during the Login Process.'; diff --git a/app/Containers/AppSection/Authentication/Exceptions/RefreshTokenMissingException.php b/app/Containers/AppSection/Authentication/Exceptions/RefreshTokenMissingException.php index f85cce323..9e95ee660 100644 --- a/app/Containers/AppSection/Authentication/Exceptions/RefreshTokenMissingException.php +++ b/app/Containers/AppSection/Authentication/Exceptions/RefreshTokenMissingException.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\Authentication\Exceptions; -use App\Ship\Parents\Exceptions\Exception; +use App\Ship\Parents\Exceptions\Exception as ParentException; use Symfony\Component\HttpFoundation\Response; -class RefreshTokenMissingException extends Exception +class RefreshTokenMissingException extends ParentException { protected $code = Response::HTTP_BAD_REQUEST; protected $message = 'We could not find the Refresh Token. Maybe none is provided?'; diff --git a/app/Containers/AppSection/Authentication/Helpers/helpers.php b/app/Containers/AppSection/Authentication/Helpers/helpers.php deleted file mode 100644 index 09fdea785..000000000 --- a/app/Containers/AppSection/Authentication/Helpers/helpers.php +++ /dev/null @@ -1,39 +0,0 @@ - []]); - - if (count($allowedLoginAttributes) === 1) { - $key = array_key_first($allowedLoginAttributes); - $optionalValidators = $allowedLoginAttributes[$key]; - $validators = implode('|', $optionalValidators); - - $fieldName = $prefix . $key; - - $rules[$fieldName] = "required:$fieldName|$validators"; - - return $rules; - } - - foreach ($allowedLoginAttributes as $key => $optionalValidators) { - // build all other login fields together - $otherLoginFields = Arr::except($allowedLoginAttributes, $key); - $otherLoginFields = array_keys($otherLoginFields); - $otherLoginFields = preg_filter('/^/', $prefix, $otherLoginFields); - $otherLoginFields = implode(',', $otherLoginFields); - - $validators = implode('|', $optionalValidators); - - $fieldName = $prefix . $key; - - $rules[$fieldName] = "required_without_all:$otherLoginFields|$validators"; - } - - return $rules; - } -} diff --git a/app/Containers/AppSection/Authentication/Mails/ForgotPassword.php b/app/Containers/AppSection/Authentication/Mails/ForgotPassword.php index 8a8b69718..17fa72254 100644 --- a/app/Containers/AppSection/Authentication/Mails/ForgotPassword.php +++ b/app/Containers/AppSection/Authentication/Mails/ForgotPassword.php @@ -3,11 +3,11 @@ namespace App\Containers\AppSection\Authentication\Mails; use App\Containers\AppSection\User\Models\User; -use App\Ship\Parents\Mails\Mail; +use App\Ship\Parents\Mails\Mail as ParentMail; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; -class ForgotPassword extends Mail implements ShouldQueue +class ForgotPassword extends ParentMail implements ShouldQueue { use Queueable; @@ -15,8 +15,7 @@ public function __construct( protected User $recipient, protected string $token, protected string $reseturl - ) - { + ) { } public function build(): static diff --git a/app/Containers/AppSection/Authentication/Middlewares/RedirectIfAuthenticated.php b/app/Containers/AppSection/Authentication/Middlewares/RedirectIfAuthenticated.php index ad5b86499..b9648c64e 100644 --- a/app/Containers/AppSection/Authentication/Middlewares/RedirectIfAuthenticated.php +++ b/app/Containers/AppSection/Authentication/Middlewares/RedirectIfAuthenticated.php @@ -5,7 +5,9 @@ use App\Ship\Parents\Middlewares\Middleware as ParentMiddleware; use App\Ship\Providers\RouteServiceProvider; use Closure; +use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; +use Illuminate\Http\Response; use Illuminate\Support\Facades\Auth; class RedirectIfAuthenticated extends ParentMiddleware @@ -14,17 +16,17 @@ class RedirectIfAuthenticated extends ParentMiddleware * Handle an incoming request. * * @param Request $request - * @param Closure $next + * @param Closure(\Illuminate\Http\Request): (\Illuminate\Http\Response|\Illuminate\Http\RedirectResponse) $next * @param string|null ...$guards - * @return mixed + * @return Response|RedirectResponse */ - public function handle(Request $request, Closure $next, ...$guards): mixed + public function handle(Request $request, Closure $next, ...$guards) { $guards = empty($guards) ? [null] : $guards; foreach ($guards as $guard) { if (Auth::guard($guard)->check()) { - return redirect()->route(RouteServiceProvider::HOME); + return redirect(RouteServiceProvider::HOME); } } diff --git a/app/Containers/AppSection/Authentication/Notifications/EmailVerified.php b/app/Containers/AppSection/Authentication/Notifications/EmailVerified.php index 88f2473dd..d904dda94 100644 --- a/app/Containers/AppSection/Authentication/Notifications/EmailVerified.php +++ b/app/Containers/AppSection/Authentication/Notifications/EmailVerified.php @@ -3,12 +3,12 @@ namespace App\Containers\AppSection\Authentication\Notifications; use App\Ship\Parents\Models\UserModel; -use App\Ship\Parents\Notifications\Notification; +use App\Ship\Parents\Notifications\Notification as ParentNotification; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; -class EmailVerified extends Notification implements ShouldQueue +class EmailVerified extends ParentNotification implements ShouldQueue { use Queueable; diff --git a/app/Containers/AppSection/Authentication/Notifications/PasswordReset.php b/app/Containers/AppSection/Authentication/Notifications/PasswordReset.php index 582a45b84..99676ce1d 100644 --- a/app/Containers/AppSection/Authentication/Notifications/PasswordReset.php +++ b/app/Containers/AppSection/Authentication/Notifications/PasswordReset.php @@ -3,12 +3,12 @@ namespace App\Containers\AppSection\Authentication\Notifications; use App\Ship\Parents\Models\UserModel; -use App\Ship\Parents\Notifications\Notification; +use App\Ship\Parents\Notifications\Notification as ParentNotification; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; -class PasswordReset extends Notification implements ShouldQueue +class PasswordReset extends ParentNotification implements ShouldQueue { use Queueable; diff --git a/app/Containers/AppSection/Authentication/Notifications/VerifyEmail.php b/app/Containers/AppSection/Authentication/Notifications/VerifyEmail.php index b33967f57..1c12ae144 100644 --- a/app/Containers/AppSection/Authentication/Notifications/VerifyEmail.php +++ b/app/Containers/AppSection/Authentication/Notifications/VerifyEmail.php @@ -3,13 +3,13 @@ namespace App\Containers\AppSection\Authentication\Notifications; use App\Ship\Parents\Models\UserModel; -use App\Ship\Parents\Notifications\Notification; +use App\Ship\Parents\Notifications\Notification as ParentNotification; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Support\Facades\URL; -class VerifyEmail extends Notification implements ShouldQueue +class VerifyEmail extends ParentNotification implements ShouldQueue { use Queueable; @@ -38,12 +38,12 @@ private function createUrl(UserModel $notifiable): string $hash = sha1($notifiable->getEmailForVerification()); return $this->verification_url . '?url=' . URL::temporarySignedRoute( - 'verification.verify', - now()->addMinutes(config('appSection-authentication.verification_link_expiration_time')), - [ - 'id' => $id, - 'hash' => $hash, - ] - ); + 'verification.verify', + now()->addMinutes(config('appSection-authentication.verification_link_expiration_time')), + [ + 'id' => $id, + 'hash' => $hash, + ] + ); } } diff --git a/app/Containers/AppSection/Authentication/Notifications/Welcome.php b/app/Containers/AppSection/Authentication/Notifications/Welcome.php index 79111fd79..f19d99c85 100644 --- a/app/Containers/AppSection/Authentication/Notifications/Welcome.php +++ b/app/Containers/AppSection/Authentication/Notifications/Welcome.php @@ -2,12 +2,12 @@ namespace App\Containers\AppSection\Authentication\Notifications; -use App\Ship\Parents\Notifications\Notification; +use App\Ship\Parents\Notifications\Notification as ParentNotification; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; -class Welcome extends Notification implements ShouldQueue +class Welcome extends ParentNotification implements ShouldQueue { use Queueable; diff --git a/app/Containers/AppSection/Authentication/Tasks/CallOAuthServerTask.php b/app/Containers/AppSection/Authentication/Tasks/CallOAuthServerTask.php index 97a6b9aad..4fda4100f 100644 --- a/app/Containers/AppSection/Authentication/Tasks/CallOAuthServerTask.php +++ b/app/Containers/AppSection/Authentication/Tasks/CallOAuthServerTask.php @@ -3,12 +3,12 @@ namespace App\Containers\AppSection\Authentication\Tasks; use App\Containers\AppSection\Authentication\Exceptions\LoginFailedException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use GuzzleHttp\Utils; use Illuminate\Http\Request; use Illuminate\Support\Facades\App; -class CallOAuthServerTask extends Task +class CallOAuthServerTask extends ParentTask { /** * @throws LoginFailedException @@ -22,15 +22,13 @@ public function run(array $data, string $languageHeader = null): float|object|in 'HTTP_ACCEPT_LANGUAGE' => $languageHeader ?? config('app.locale'), ]; - $request = Request::create($authFullApiUrl, 'POST', $data, [], [], $headers); - + $request = Request::create($authFullApiUrl, 'POST', $data, server: $headers); $response = App::handle($request); - $content = Utils::jsonDecode($response->getContent(), true); // If the internal request to the oauth token endpoint was not successful we throw an exception - if (!$response->isSuccessful()) { - throw new LoginFailedException($content['message']); + if (!$response->isOk()) { + throw new LoginFailedException($content['message'] ?? null); } return $content; diff --git a/app/Containers/AppSection/Authentication/Tasks/CreatePasswordResetTokenTask.php b/app/Containers/AppSection/Authentication/Tasks/CreatePasswordResetTokenTask.php index 3344e6515..3a46fae14 100644 --- a/app/Containers/AppSection/Authentication/Tasks/CreatePasswordResetTokenTask.php +++ b/app/Containers/AppSection/Authentication/Tasks/CreatePasswordResetTokenTask.php @@ -3,9 +3,9 @@ namespace App\Containers\AppSection\Authentication\Tasks; use App\Ship\Parents\Models\UserModel; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; -class CreatePasswordResetTokenTask extends Task +class CreatePasswordResetTokenTask extends ParentTask { public function run(UserModel $user): string { diff --git a/app/Containers/AppSection/Authentication/Tasks/CreateUserByCredentialsTask.php b/app/Containers/AppSection/Authentication/Tasks/CreateUserByCredentialsTask.php index ca5e1e9ba..7933f70cf 100644 --- a/app/Containers/AppSection/Authentication/Tasks/CreateUserByCredentialsTask.php +++ b/app/Containers/AppSection/Authentication/Tasks/CreateUserByCredentialsTask.php @@ -5,11 +5,11 @@ use App\Containers\AppSection\User\Data\Repositories\UserRepository; use App\Containers\AppSection\User\Models\User; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Exception; use Illuminate\Support\Facades\Hash; -class CreateUserByCredentialsTask extends Task +class CreateUserByCredentialsTask extends ParentTask { public function __construct( protected UserRepository $repository diff --git a/app/Containers/AppSection/Authentication/Tasks/ExtractLoginCustomAttributeTask.php b/app/Containers/AppSection/Authentication/Tasks/ExtractLoginCustomAttributeTask.php deleted file mode 100644 index e738a7973..000000000 --- a/app/Containers/AppSection/Authentication/Tasks/ExtractLoginCustomAttributeTask.php +++ /dev/null @@ -1,50 +0,0 @@ -getAllowedLoginAttributes(); - - $fields = array_keys($allowedLoginAttributes); - $loginUsername = null; - // The original attribute the user tried to log in witch - // eg 'email', 'name', 'phone' - $loginAttribute = null; - - // Find first login custom attribute (allowed login attributes) found in request - // eg: search the request exactly in order which they are in 'authentication-container' - // for 'email' then 'phone' then 'name' in request - // and put the first one found in 'username' field witch its value as 'username' value - foreach ($fields as $field) { - $fieldName = $prefix . $field; - $loginUsername = Arr::get($data, $fieldName); - $loginAttribute = $field; - - if ($loginUsername !== null) { - break; - } - } - - return [ - $loginUsername, - $loginAttribute, - ]; - } - - private function getAllowedLoginAttributes(): mixed - { - $allowedLoginFields = config('appSection-authentication.login.attributes'); - if (!$allowedLoginFields) { - $allowedLoginFields = ['email' => []]; - } - - return $allowedLoginFields; - } -} diff --git a/app/Containers/AppSection/Authentication/Tasks/LoginTask.php b/app/Containers/AppSection/Authentication/Tasks/LoginTask.php index 6307dca00..c19267595 100644 --- a/app/Containers/AppSection/Authentication/Tasks/LoginTask.php +++ b/app/Containers/AppSection/Authentication/Tasks/LoginTask.php @@ -2,13 +2,13 @@ namespace App\Containers\AppSection\Authentication\Tasks; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Illuminate\Support\Facades\Auth; -class LoginTask extends Task +class LoginTask extends ParentTask { public function run(string $username, string $password, string $field = 'email', bool $remember = false): bool { - return Auth::attempt([$field => $username, 'password' => $password], $remember); + return Auth::guard('web')->attempt([$field => $username, 'password' => $password], $remember); } } diff --git a/app/Containers/AppSection/Authentication/Tasks/MakeRefreshCookieTask.php b/app/Containers/AppSection/Authentication/Tasks/MakeRefreshCookieTask.php index 7b08703a4..b5bdc51ac 100644 --- a/app/Containers/AppSection/Authentication/Tasks/MakeRefreshCookieTask.php +++ b/app/Containers/AppSection/Authentication/Tasks/MakeRefreshCookieTask.php @@ -2,12 +2,12 @@ namespace App\Containers\AppSection\Authentication\Tasks; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Illuminate\Contracts\Foundation\Application; use Illuminate\Cookie\CookieJar; use Symfony\Component\HttpFoundation\Cookie; -class MakeRefreshCookieTask extends Task +class MakeRefreshCookieTask extends ParentTask { public function run($refreshToken): CookieJar|Cookie|Application { diff --git a/app/Containers/AppSection/Authentication/Tasks/SendVerificationEmailTask.php b/app/Containers/AppSection/Authentication/Tasks/SendVerificationEmailTask.php index 14df203c8..6d9d6f5b8 100644 --- a/app/Containers/AppSection/Authentication/Tasks/SendVerificationEmailTask.php +++ b/app/Containers/AppSection/Authentication/Tasks/SendVerificationEmailTask.php @@ -3,9 +3,9 @@ namespace App\Containers\AppSection\Authentication\Tasks; use App\Ship\Contracts\MustVerifyEmail; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; -class SendVerificationEmailTask extends Task +class SendVerificationEmailTask extends ParentTask { public function run(MustVerifyEmail $user, ?string $verificationUrl = null): void { diff --git a/app/Containers/AppSection/Authentication/Tests/Unit/CreateUserByCredentialsTaskTest.php b/app/Containers/AppSection/Authentication/Tests/Unit/CreateUserByCredentialsTaskTest.php index bb85d3a3c..d9bba04a1 100644 --- a/app/Containers/AppSection/Authentication/Tests/Unit/CreateUserByCredentialsTaskTest.php +++ b/app/Containers/AppSection/Authentication/Tests/Unit/CreateUserByCredentialsTaskTest.php @@ -3,7 +3,7 @@ namespace App\Containers\AppSection\Authentication\Tests\Unit; use App\Containers\AppSection\Authentication\Tasks\CreateUserByCredentialsTask; -use App\Containers\AppSection\User\Tests\TestCase; +use App\Containers\AppSection\Authentication\Tests\TestCase; use App\Ship\Exceptions\CreateResourceFailedException; /** diff --git a/app/Containers/AppSection/Authentication/Tests/Unit/ForgotPasswordActionTest.php b/app/Containers/AppSection/Authentication/Tests/Unit/ForgotPasswordActionTest.php index 7741887d0..1566d06af 100644 --- a/app/Containers/AppSection/Authentication/Tests/Unit/ForgotPasswordActionTest.php +++ b/app/Containers/AppSection/Authentication/Tests/Unit/ForgotPasswordActionTest.php @@ -5,8 +5,6 @@ use App\Containers\AppSection\Authentication\Actions\ForgotPasswordAction; use App\Containers\AppSection\Authentication\Tests\TestCase; use App\Containers\AppSection\Authentication\UI\API\Requests\ForgotPasswordRequest; -use App\Containers\AppSection\User\Models\User; -use App\Ship\Exceptions\NotFoundException; /** * Class ForgotPasswordActionTest. diff --git a/app/Containers/AppSection/Authentication/Tests/Unit/ExtractLoginCustomAttributeTaskTest.php b/app/Containers/AppSection/Authentication/Tests/Unit/LoginCustomAttributeTest.php similarity index 72% rename from app/Containers/AppSection/Authentication/Tests/Unit/ExtractLoginCustomAttributeTaskTest.php rename to app/Containers/AppSection/Authentication/Tests/Unit/LoginCustomAttributeTest.php index c95db9e3c..244be1a2e 100644 --- a/app/Containers/AppSection/Authentication/Tests/Unit/ExtractLoginCustomAttributeTaskTest.php +++ b/app/Containers/AppSection/Authentication/Tests/Unit/LoginCustomAttributeTest.php @@ -2,18 +2,17 @@ namespace App\Containers\AppSection\Authentication\Tests\Unit; -use App\Containers\AppSection\Authentication\Tasks\ExtractLoginCustomAttributeTask; +use App\Containers\AppSection\Authentication\Classes\LoginCustomAttribute; use App\Containers\AppSection\Authentication\Tests\TestCase; use Illuminate\Support\Facades\Config; /** - * Class ExtractLoginCustomAttributeTaskTest. + * Class LoginCustomAttributeTest. * * @group authentication * @group unit - * */ -class ExtractLoginCustomAttributeTaskTest extends TestCase +class LoginCustomAttributeTest extends TestCase { public function testGivenValidLoginAttributeThenExtractUsername(): void { @@ -22,7 +21,7 @@ public function testGivenValidLoginAttributeThenExtractUsername(): void 'password' => 'so-secret', ]; - $result = app(ExtractLoginCustomAttributeTask::class)->run($userDetails); + $result = LoginCustomAttribute::extract($userDetails); $this->assertAttributeIsExtracted($result, $userDetails); } @@ -30,7 +29,7 @@ public function testGivenValidLoginAttributeThenExtractUsername(): void private function assertAttributeIsExtracted(array $result, array $userDetails): void { list($username, $loginAttribute) = $result; - $this->assertSame($username, $userDetails['email']); + $this->assertSame($username, strtolower($userDetails['email'])); $this->assertSame($loginAttribute, 'email'); } @@ -42,7 +41,7 @@ public function testWhenNoLoginAttributeIsProvidedShouldUseEmailFieldAsDefaultFa 'password' => 'so-secret', ]; - $result = app(ExtractLoginCustomAttributeTask::class)->run($userDetails); + $result = LoginCustomAttribute::extract($userDetails); $this->assertAttributeIsExtracted($result, $userDetails); } diff --git a/app/Containers/AppSection/Authentication/Traits/LoginAttributeCaseSensitivityTrait.php b/app/Containers/AppSection/Authentication/Traits/LoginAttributeCaseSensitivityTrait.php deleted file mode 100644 index 840d80aca..000000000 --- a/app/Containers/AppSection/Authentication/Traits/LoginAttributeCaseSensitivityTrait.php +++ /dev/null @@ -1,15 +0,0 @@ -run($request); diff --git a/app/Containers/AppSection/Authentication/UI/API/Controllers/VerifyEmailController.php b/app/Containers/AppSection/Authentication/UI/API/Controllers/VerifyEmailController.php index 027052918..101c20e47 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Controllers/VerifyEmailController.php +++ b/app/Containers/AppSection/Authentication/UI/API/Controllers/VerifyEmailController.php @@ -12,6 +12,8 @@ class VerifyEmailController extends ApiController { /** + * @param VerifyEmailRequest $request + * @return JsonResponse * @throws NotFoundException * @throws Throwable */ diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/ForgotPasswordRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/ForgotPasswordRequest.php index ea1a1c3f3..b06d756f3 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/ForgotPasswordRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/ForgotPasswordRequest.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; use Illuminate\Validation\Rule; -class ForgotPasswordRequest extends Request +class ForgotPasswordRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/GetAuthenticatedUserRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/GetAuthenticatedUserRequest.php index c1b89a8a3..1e71533a2 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/GetAuthenticatedUserRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/GetAuthenticatedUserRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class GetAuthenticatedUserRequest extends Request +class GetAuthenticatedUserRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php index b2e106b8c..de33ff19d 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/LoginProxyPasswordGrantRequest.php @@ -2,9 +2,10 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Containers\AppSection\Authentication\Classes\LoginCustomAttribute; +use App\Ship\Parents\Requests\Request as ParentRequest; -class LoginProxyPasswordGrantRequest extends Request +class LoginProxyPasswordGrantRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. @@ -36,12 +37,12 @@ public function rules(): array { $rules = [ // we don't need to require email here. The proper login attribute (with proper validations) - // will be added automatically by "loginAttributeValidationRulesMerger" method below + // will be added automatically by "mergeValidationRules" method below // 'email' => 'required', 'password' => 'required', ]; - return loginAttributeValidationRulesMerger($rules); + return LoginCustomAttribute::mergeValidationRules($rules); } /** diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php index c68ded395..5c2a0153c 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/LogoutRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class LogoutRequest extends Request +class LogoutRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php index 80bc9d2e8..32dd355be 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/RefreshProxyRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class RefreshProxyRequest extends Request +class RefreshProxyRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/RegisterUserRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/RegisterUserRequest.php index 3e396610d..718d620e8 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/RegisterUserRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/RegisterUserRequest.php @@ -3,10 +3,10 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; use App\Containers\AppSection\User\Models\User; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; use Illuminate\Validation\Rule; -class RegisterUserRequest extends Request +class RegisterUserRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/ResetPasswordRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/ResetPasswordRequest.php index 6e3069146..9acfa08b7 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/ResetPasswordRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/ResetPasswordRequest.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; use Illuminate\Validation\Rules\Password; -class ResetPasswordRequest extends Request +class ResetPasswordRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/SendVerificationEmailRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/SendVerificationEmailRequest.php index 14340279f..5b55f8288 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/SendVerificationEmailRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/SendVerificationEmailRequest.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; use Illuminate\Validation\Rule; -class SendVerificationEmailRequest extends Request +class SendVerificationEmailRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/API/Requests/VerifyEmailRequest.php b/app/Containers/AppSection/Authentication/UI/API/Requests/VerifyEmailRequest.php index bfb2b2e9d..b3edbc12d 100644 --- a/app/Containers/AppSection/Authentication/UI/API/Requests/VerifyEmailRequest.php +++ b/app/Containers/AppSection/Authentication/UI/API/Requests/VerifyEmailRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authentication\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class VerifyEmailRequest extends Request +class VerifyEmailRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LoginController.php b/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LoginController.php index 3facee702..30b9c5314 100644 --- a/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LoginController.php +++ b/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LoginController.php @@ -14,11 +14,18 @@ class LoginController extends WebController { + /** + * @return Factory|View|Application + */ public function showLoginPage(): Factory|View|Application { return view('appSection@authentication::login'); } + /** + * @param LoginRequest $request + * @return RedirectResponse + */ public function login(LoginRequest $request): RedirectResponse { try { diff --git a/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LogoutController.php b/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LogoutController.php index 0d106cf3c..c5724cdeb 100644 --- a/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LogoutController.php +++ b/app/Containers/AppSection/Authentication/UI/WEB/Controllers/LogoutController.php @@ -12,6 +12,10 @@ class LogoutController extends WebController { + /** + * @param LogoutRequest $request + * @return Redirector|Application|RedirectResponse + */ public function logout(LogoutRequest $request): Redirector|Application|RedirectResponse { app(WebLogoutAction::class)->run(); diff --git a/app/Containers/AppSection/Authentication/UI/WEB/Requests/LoginRequest.php b/app/Containers/AppSection/Authentication/UI/WEB/Requests/LoginRequest.php index 58be8634d..41e981e34 100644 --- a/app/Containers/AppSection/Authentication/UI/WEB/Requests/LoginRequest.php +++ b/app/Containers/AppSection/Authentication/UI/WEB/Requests/LoginRequest.php @@ -2,9 +2,10 @@ namespace App\Containers\AppSection\Authentication\UI\WEB\Requests; -use App\Ship\Parents\Requests\Request; +use App\Containers\AppSection\Authentication\Classes\LoginCustomAttribute; +use App\Ship\Parents\Requests\Request as ParentRequest; -class LoginRequest extends Request +class LoginRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. @@ -38,7 +39,7 @@ public function rules(): array 'password' => 'required|min:3|max:30', ]; - return loginAttributeValidationRulesMerger($rules); + return LoginCustomAttribute::mergeValidationRules($rules); } /** diff --git a/app/Containers/AppSection/Authentication/UI/WEB/Requests/LogoutRequest.php b/app/Containers/AppSection/Authentication/UI/WEB/Requests/LogoutRequest.php index 3fc1b3185..d1dc94c1c 100644 --- a/app/Containers/AppSection/Authentication/UI/WEB/Requests/LogoutRequest.php +++ b/app/Containers/AppSection/Authentication/UI/WEB/Requests/LogoutRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authentication\UI\WEB\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class LogoutRequest extends Request +class LogoutRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authentication/UI/WEB/Views/login.blade.php b/app/Containers/AppSection/Authentication/UI/WEB/Views/login.blade.php index fab887951..5fdf8e6a7 100644 --- a/app/Containers/AppSection/Authentication/UI/WEB/Views/login.blade.php +++ b/app/Containers/AppSection/Authentication/UI/WEB/Views/login.blade.php @@ -68,25 +68,7 @@ display: none; } - .container { - position: relative; - z-index: 1; - max-width: 300px; - margin: 0 auto; - } - - .container:before, .container:after { - content: ""; - display: block; - clear: both; - } - - .container .info { - margin: 50px auto; - text-align: center; - } - - h1, .container .info h1 { + h1 { margin: 0 0 15px; padding: 0; font-size: 36px; @@ -98,20 +80,6 @@ text-align: center; } - .container .info span { - color: #4d4d4d; - font-size: 12px; - } - - .container .info span a { - color: #000000; - text-decoration: none; - } - - .container .info span .fa { - color: #EF3B3A; - } - body { background: #ffffff; font-family: "Roboto", sans-serif; diff --git a/app/Containers/AppSection/Authentication/composer.json b/app/Containers/AppSection/Authentication/composer.json index eb5e1f4f5..5ea7f2e64 100644 --- a/app/Containers/AppSection/Authentication/composer.json +++ b/app/Containers/AppSection/Authentication/composer.json @@ -3,7 +3,7 @@ "description": "apiato Container.", "type": "apiato-container", "require": { - "laravel/passport": "^10.1.0" + "laravel/passport": "^10.3.0" }, "require-dev": { "roave/security-advisories": "dev-latest" diff --git a/app/Containers/AppSection/Authorization/Actions/AssignRolesToUserAction.php b/app/Containers/AppSection/Authorization/Actions/AssignRolesToUserAction.php index fd17f0d99..04f460ae4 100644 --- a/app/Containers/AppSection/Authorization/Actions/AssignRolesToUserAction.php +++ b/app/Containers/AppSection/Authorization/Actions/AssignRolesToUserAction.php @@ -8,11 +8,13 @@ use App\Containers\AppSection\User\Models\User; use App\Containers\AppSection\User\Tasks\FindUserByIdTask; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class AssignRolesToUserAction extends Action +class AssignRolesToUserAction extends ParentAction { /** + * @param AssignRolesToUserRequest $request + * @return User * @throws NotFoundException */ public function run(AssignRolesToUserRequest $request): User diff --git a/app/Containers/AppSection/Authorization/Actions/AttachPermissionsToRoleAction.php b/app/Containers/AppSection/Authorization/Actions/AttachPermissionsToRoleAction.php index c8e4e6a72..cbf6866bf 100644 --- a/app/Containers/AppSection/Authorization/Actions/AttachPermissionsToRoleAction.php +++ b/app/Containers/AppSection/Authorization/Actions/AttachPermissionsToRoleAction.php @@ -7,11 +7,13 @@ use App\Containers\AppSection\Authorization\Tasks\FindRoleTask; use App\Containers\AppSection\Authorization\UI\API\Requests\AttachPermissionsToRoleRequest; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class AttachPermissionsToRoleAction extends Action +class AttachPermissionsToRoleAction extends ParentAction { /** + * @param AttachPermissionsToRoleRequest $request + * @return Role * @throws NotFoundException */ public function run(AttachPermissionsToRoleRequest $request): Role diff --git a/app/Containers/AppSection/Authorization/Actions/CreatePermissionAction.php b/app/Containers/AppSection/Authorization/Actions/CreatePermissionAction.php index 6e9752b74..0b9bcc1bd 100644 --- a/app/Containers/AppSection/Authorization/Actions/CreatePermissionAction.php +++ b/app/Containers/AppSection/Authorization/Actions/CreatePermissionAction.php @@ -5,12 +5,14 @@ use App\Containers\AppSection\Authorization\Models\Permission; use App\Containers\AppSection\Authorization\Tasks\CreatePermissionTask; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use App\Ship\Parents\Requests\Request; -class CreatePermissionAction extends Action +class CreatePermissionAction extends ParentAction { /** + * @param Request $request + * @return Permission * @throws CreateResourceFailedException */ public function run(Request $request): Permission diff --git a/app/Containers/AppSection/Authorization/Actions/CreateRoleAction.php b/app/Containers/AppSection/Authorization/Actions/CreateRoleAction.php index bba42fc79..338c83cb4 100644 --- a/app/Containers/AppSection/Authorization/Actions/CreateRoleAction.php +++ b/app/Containers/AppSection/Authorization/Actions/CreateRoleAction.php @@ -6,11 +6,13 @@ use App\Containers\AppSection\Authorization\Tasks\CreateRoleTask; use App\Containers\AppSection\Authorization\UI\API\Requests\CreateRoleRequest; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class CreateRoleAction extends Action +class CreateRoleAction extends ParentAction { /** + * @param CreateRoleRequest $request + * @return Role * @throws CreateResourceFailedException */ public function run(CreateRoleRequest $request): Role diff --git a/app/Containers/AppSection/Authorization/Actions/DeleteRoleAction.php b/app/Containers/AppSection/Authorization/Actions/DeleteRoleAction.php index 3e8e0f599..3e9046ab9 100644 --- a/app/Containers/AppSection/Authorization/Actions/DeleteRoleAction.php +++ b/app/Containers/AppSection/Authorization/Actions/DeleteRoleAction.php @@ -6,9 +6,9 @@ use App\Containers\AppSection\Authorization\UI\API\Requests\DeleteRoleRequest; use App\Ship\Exceptions\DeleteResourceFailedException; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class DeleteRoleAction extends Action +class DeleteRoleAction extends ParentAction { /** * @param DeleteRoleRequest $request diff --git a/app/Containers/AppSection/Authorization/Actions/DetachPermissionsFromRoleAction.php b/app/Containers/AppSection/Authorization/Actions/DetachPermissionsFromRoleAction.php index af613ff8d..495b33388 100644 --- a/app/Containers/AppSection/Authorization/Actions/DetachPermissionsFromRoleAction.php +++ b/app/Containers/AppSection/Authorization/Actions/DetachPermissionsFromRoleAction.php @@ -8,11 +8,13 @@ use App\Containers\AppSection\Authorization\Tasks\FindRoleTask; use App\Containers\AppSection\Authorization\UI\API\Requests\DetachPermissionsFromRoleRequest; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class DetachPermissionsFromRoleAction extends Action +class DetachPermissionsFromRoleAction extends ParentAction { /** + * @param DetachPermissionsFromRoleRequest $request + * @return Role * @throws NotFoundException */ public function run(DetachPermissionsFromRoleRequest $request): Role diff --git a/app/Containers/AppSection/Authorization/Actions/FindPermissionAction.php b/app/Containers/AppSection/Authorization/Actions/FindPermissionAction.php index 33324bb68..cf9072092 100644 --- a/app/Containers/AppSection/Authorization/Actions/FindPermissionAction.php +++ b/app/Containers/AppSection/Authorization/Actions/FindPermissionAction.php @@ -6,11 +6,13 @@ use App\Containers\AppSection\Authorization\Tasks\FindPermissionTask; use App\Containers\AppSection\Authorization\UI\API\Requests\FindPermissionRequest; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class FindPermissionAction extends Action +class FindPermissionAction extends ParentAction { /** + * @param FindPermissionRequest $request + * @return Permission * @throws NotFoundException */ public function run(FindPermissionRequest $request): Permission diff --git a/app/Containers/AppSection/Authorization/Actions/FindRoleAction.php b/app/Containers/AppSection/Authorization/Actions/FindRoleAction.php index f3c28521f..998d982b9 100644 --- a/app/Containers/AppSection/Authorization/Actions/FindRoleAction.php +++ b/app/Containers/AppSection/Authorization/Actions/FindRoleAction.php @@ -6,11 +6,13 @@ use App\Containers\AppSection\Authorization\Tasks\FindRoleTask; use App\Containers\AppSection\Authorization\UI\API\Requests\FindRoleRequest; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class FindRoleAction extends Action +class FindRoleAction extends ParentAction { /** + * @param FindRoleRequest $request + * @return Role * @throws NotFoundException */ public function run(FindRoleRequest $request): Role diff --git a/app/Containers/AppSection/Authorization/Actions/GetAllPermissionsAction.php b/app/Containers/AppSection/Authorization/Actions/GetAllPermissionsAction.php index 8b2a1fa66..e93ad2f2e 100644 --- a/app/Containers/AppSection/Authorization/Actions/GetAllPermissionsAction.php +++ b/app/Containers/AppSection/Authorization/Actions/GetAllPermissionsAction.php @@ -4,17 +4,17 @@ use Apiato\Core\Exceptions\CoreInternalErrorException; use App\Containers\AppSection\Authorization\Tasks\GetAllPermissionsTask; -use App\Containers\AppSection\Authorization\UI\API\Requests\GetAllPermissionsRequest; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Prettus\Repository\Exceptions\RepositoryException; -class GetAllPermissionsAction extends Action +class GetAllPermissionsAction extends ParentAction { /** + * @return mixed * @throws CoreInternalErrorException * @throws RepositoryException */ - public function run(GetAllPermissionsRequest $request) + public function run(): mixed { return app(GetAllPermissionsTask::class)->run(); } diff --git a/app/Containers/AppSection/Authorization/Actions/GetAllRolesAction.php b/app/Containers/AppSection/Authorization/Actions/GetAllRolesAction.php index 9c1ae8eb5..28a4fcef9 100644 --- a/app/Containers/AppSection/Authorization/Actions/GetAllRolesAction.php +++ b/app/Containers/AppSection/Authorization/Actions/GetAllRolesAction.php @@ -4,17 +4,17 @@ use Apiato\Core\Exceptions\CoreInternalErrorException; use App\Containers\AppSection\Authorization\Tasks\GetAllRolesTask; -use App\Containers\AppSection\Authorization\UI\API\Requests\GetAllRolesRequest; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Prettus\Repository\Exceptions\RepositoryException; -class GetAllRolesAction extends Action +class GetAllRolesAction extends ParentAction { /** + * @return mixed * @throws CoreInternalErrorException * @throws RepositoryException */ - public function run(GetAllRolesRequest $request) + public function run(): mixed { return app(GetAllRolesTask::class)->run(); } diff --git a/app/Containers/AppSection/Authorization/Actions/GiveAllPermissionsToRoleAction.php b/app/Containers/AppSection/Authorization/Actions/GiveAllPermissionsToRoleAction.php deleted file mode 100644 index bc1f865d6..000000000 --- a/app/Containers/AppSection/Authorization/Actions/GiveAllPermissionsToRoleAction.php +++ /dev/null @@ -1,29 +0,0 @@ -run($roleName); - $allPermissionsNames = app(GetAllPermissionsTask::class)->run(true)->pluck('name')->toArray(); - $role->syncPermissions($allPermissionsNames); - - return $allPermissionsNames; - } -} diff --git a/app/Containers/AppSection/Authorization/Actions/RevokeRolesFromUserAction.php b/app/Containers/AppSection/Authorization/Actions/RevokeRolesFromUserAction.php index f63f4bf3c..9f0adfa02 100644 --- a/app/Containers/AppSection/Authorization/Actions/RevokeRolesFromUserAction.php +++ b/app/Containers/AppSection/Authorization/Actions/RevokeRolesFromUserAction.php @@ -8,11 +8,13 @@ use App\Containers\AppSection\User\Models\User; use App\Containers\AppSection\User\Tasks\FindUserByIdTask; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class RevokeRolesFromUserAction extends Action +class RevokeRolesFromUserAction extends ParentAction { /** + * @param RevokeRolesFromUserRequest $request + * @return User * @throws NotFoundException */ public function run(RevokeRolesFromUserRequest $request): User diff --git a/app/Containers/AppSection/Authorization/Actions/SyncPermissionsOnRoleAction.php b/app/Containers/AppSection/Authorization/Actions/SyncPermissionsOnRoleAction.php index b597bdb04..9f1b1b914 100644 --- a/app/Containers/AppSection/Authorization/Actions/SyncPermissionsOnRoleAction.php +++ b/app/Containers/AppSection/Authorization/Actions/SyncPermissionsOnRoleAction.php @@ -7,11 +7,13 @@ use App\Containers\AppSection\Authorization\Tasks\FindRoleTask; use App\Containers\AppSection\Authorization\UI\API\Requests\SyncPermissionsOnRoleRequest; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class SyncPermissionsOnRoleAction extends Action +class SyncPermissionsOnRoleAction extends ParentAction { /** + * @param SyncPermissionsOnRoleRequest $request + * @return Role * @throws NotFoundException */ public function run(SyncPermissionsOnRoleRequest $request): Role diff --git a/app/Containers/AppSection/Authorization/Actions/SyncUserRolesAction.php b/app/Containers/AppSection/Authorization/Actions/SyncUserRolesAction.php index 98ae94a7b..e88786a87 100644 --- a/app/Containers/AppSection/Authorization/Actions/SyncUserRolesAction.php +++ b/app/Containers/AppSection/Authorization/Actions/SyncUserRolesAction.php @@ -7,11 +7,13 @@ use App\Containers\AppSection\User\Models\User; use App\Containers\AppSection\User\Tasks\FindUserByIdTask; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class SyncUserRolesAction extends Action +class SyncUserRolesAction extends ParentAction { /** + * @param SyncUserRolesRequest $request + * @return User * @throws NotFoundException */ public function run(SyncUserRolesRequest $request): User diff --git a/app/Containers/AppSection/Authorization/Configs/permission.php b/app/Containers/AppSection/Authorization/Configs/permission.php index daadbcc5e..706ef237f 100644 --- a/app/Containers/AppSection/Authorization/Configs/permission.php +++ b/app/Containers/AppSection/Authorization/Configs/permission.php @@ -72,6 +72,11 @@ ], 'column_names' => [ + /* + * Change this if you want to name the related pivots other than defaults + */ + 'role_pivot_key' => null, //default 'role_id', + 'permission_pivot_key' => null, //default 'permission_id', /* * Change this if you want to name the related model primary key other than @@ -82,8 +87,32 @@ */ 'model_morph_key' => 'model_id', + + /* + * Change this if you want to use the teams feature and your related model's + * foreign key is other than `team_id`. + */ + + 'team_foreign_key' => 'team_id', ], + /* + * When set to true, the method for checking permissions will be registered on the gate. + * Set this to false, if you want to implement custom logic for checking permissions. + */ + + 'register_permission_check_method' => true, + + /* + * When set to true the package implements teams using the 'team_foreign_key'. If you want + * the migrations to register the 'team_foreign_key', you must set this to true + * before doing the migration. If you already did the migration then you must make a new + * migration to also add 'team_foreign_key' to 'roles', 'model_has_roles', and + * 'model_has_permissions'(view the latest version of package's migration file) + */ + + 'teams' => false, + /* * When set to true, the required permission names are added to the exception * message. This could be considered an information leak in some contexts, so @@ -121,17 +150,6 @@ 'key' => 'spatie.permission.cache', - /* - * When checking for a permission against a model by passing a Permission - * instance to the check, this key determines what attribute on the - * Permissions model is used to cache against. - * - * Ideally, this should match your preferred way of checking permissions, eg: - * `$user->can('view-posts')` would be 'name'. - */ - - 'model_key' => 'name', - /* * You may optionally indicate a specific cache driver to use for permission and * role caching using any of the `store` drivers listed in the cache.php config diff --git a/app/Containers/AppSection/Authorization/Data/Factories/PermissionFactory.php b/app/Containers/AppSection/Authorization/Data/Factories/PermissionFactory.php index e1a6e7e9e..93e183d43 100644 --- a/app/Containers/AppSection/Authorization/Data/Factories/PermissionFactory.php +++ b/app/Containers/AppSection/Authorization/Data/Factories/PermissionFactory.php @@ -3,9 +3,9 @@ namespace App\Containers\AppSection\Authorization\Data\Factories; use App\Containers\AppSection\Authorization\Models\Permission; -use Illuminate\Database\Eloquent\Factories\Factory; +use App\Ship\Parents\Factories\Factory as ParentFactory; -class PermissionFactory extends Factory +class PermissionFactory extends ParentFactory { protected $model = Permission::class; @@ -13,6 +13,7 @@ public function definition(): array { return [ 'name' => $this->faker->firstName(), + 'guard_name' => 'api', ]; } } diff --git a/app/Containers/AppSection/Authorization/Data/Factories/RoleFactory.php b/app/Containers/AppSection/Authorization/Data/Factories/RoleFactory.php index 2ea5c41e7..bc3b8e2e3 100644 --- a/app/Containers/AppSection/Authorization/Data/Factories/RoleFactory.php +++ b/app/Containers/AppSection/Authorization/Data/Factories/RoleFactory.php @@ -3,9 +3,9 @@ namespace App\Containers\AppSection\Authorization\Data\Factories; use App\Containers\AppSection\Authorization\Models\Role; -use Illuminate\Database\Eloquent\Factories\Factory; +use App\Ship\Parents\Factories\Factory as ParentFactory; -class RoleFactory extends Factory +class RoleFactory extends ParentFactory { protected $model = Role::class; @@ -13,12 +13,13 @@ public function definition(): array { return [ 'name' => $this->faker->firstName(), + 'guard_name' => 'api', ]; } - public function admin(): RoleFactory + public function admin(): static { - return $this->state(function () { + return $this->state(function (array $attributes) { return [ 'name' => config('appSection-authorization.admin_role'), ]; diff --git a/app/Containers/AppSection/Authorization/Data/Migrations/2016_12_29_201047_create_permission_tables.php b/app/Containers/AppSection/Authorization/Data/Migrations/2016_12_29_201047_create_permission_tables.php index 8ef94124f..e5412d43f 100644 --- a/app/Containers/AppSection/Authorization/Data/Migrations/2016_12_29_201047_create_permission_tables.php +++ b/app/Containers/AppSection/Authorization/Data/Migrations/2016_12_29_201047_create_permission_tables.php @@ -1,102 +1,121 @@ bigIncrements('id'); - $table->string('name'); - $table->string('guard_name'); - $table->string('display_name')->nullable(); - $table->string('description')->nullable(); + $table->string('name'); // For MySQL 8.0 use string('name', 125); + $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125); $table->timestamps(); $table->unique(['name', 'guard_name']); }); - Schema::create($tableNames['roles'], function (Blueprint $table) { + Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) { $table->bigIncrements('id'); - $table->string('name'); - $table->string('guard_name'); - $table->string('display_name')->nullable(); - $table->string('description')->nullable(); + if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing + $table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable(); + $table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index'); + } + $table->string('name'); // For MySQL 8.0 use string('name', 125); + $table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125); $table->timestamps(); - - $table->unique(['name', 'guard_name']); + if ($teams || config('permission.testing')) { + $table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']); + } else { + $table->unique(['name', 'guard_name']); + } }); - Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) { - $table->unsignedBigInteger('permission_id'); + Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) { + $table->unsignedBigInteger(PermissionRegistrar::$pivotPermission); $table->string('model_type'); $table->unsignedBigInteger($columnNames['model_morph_key']); $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index'); - $table->foreign('permission_id') + $table->foreign(PermissionRegistrar::$pivotPermission) ->references('id') ->on($tableNames['permissions']) ->onDelete('cascade'); + if ($teams) { + $table->unsignedBigInteger($columnNames['team_foreign_key']); + $table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index'); + + $table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'], + 'model_has_permissions_permission_model_type_primary'); + } else { + $table->primary([PermissionRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'], + 'model_has_permissions_permission_model_type_primary'); + } - $table->primary( - ['permission_id', $columnNames['model_morph_key'], 'model_type'], - 'model_has_permissions_permission_model_type_primary' - ); }); - Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) { - $table->unsignedBigInteger('role_id'); + Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $teams) { + $table->unsignedBigInteger(PermissionRegistrar::$pivotRole); $table->string('model_type'); $table->unsignedBigInteger($columnNames['model_morph_key']); $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index'); - $table->foreign('role_id') + $table->foreign(PermissionRegistrar::$pivotRole) ->references('id') ->on($tableNames['roles']) ->onDelete('cascade'); - - $table->primary( - ['role_id', $columnNames['model_morph_key'], 'model_type'], - 'model_has_roles_role_model_type_primary' - ); + if ($teams) { + $table->unsignedBigInteger($columnNames['team_foreign_key']); + $table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index'); + + $table->primary([$columnNames['team_foreign_key'], PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'], + 'model_has_roles_role_model_type_primary'); + } else { + $table->primary([PermissionRegistrar::$pivotRole, $columnNames['model_morph_key'], 'model_type'], + 'model_has_roles_role_model_type_primary'); + } }); Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { - $table->unsignedBigInteger('permission_id'); - $table->unsignedBigInteger('role_id'); + $table->unsignedBigInteger(PermissionRegistrar::$pivotPermission); + $table->unsignedBigInteger(PermissionRegistrar::$pivotRole); - $table->foreign('permission_id') + $table->foreign(PermissionRegistrar::$pivotPermission) ->references('id') ->on($tableNames['permissions']) ->onDelete('cascade'); - $table->foreign('role_id') + $table->foreign(PermissionRegistrar::$pivotRole) ->references('id') ->on($tableNames['roles']) ->onDelete('cascade'); - $table->primary(['permission_id', 'role_id'], 'role_has_permissions_permission_id_role_id_primary'); + $table->primary([PermissionRegistrar::$pivotPermission, PermissionRegistrar::$pivotRole], 'role_has_permissions_permission_id_role_id_primary'); }); app('cache') - ->store(config('permission.cache.store') !== 'default' ? config('permission.cache.store') : null) + ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) ->forget(config('permission.cache.key')); } @@ -104,14 +123,13 @@ public function up(): void * Reverse the migrations. * * @return void - * @throws Exception */ - public function down(): void + public function down() { $tableNames = config('permission.table_names'); if (empty($tableNames)) { - throw new RuntimeException('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); + throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.'); } Schema::drop($tableNames['role_has_permissions']); @@ -120,4 +138,4 @@ public function down(): void Schema::drop($tableNames['roles']); Schema::drop($tableNames['permissions']); } -} +}; diff --git a/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122453_add_extra_fields_to_permissions_tale.php b/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122453_add_extra_fields_to_permissions_tale.php new file mode 100644 index 000000000..81d40305f --- /dev/null +++ b/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122453_add_extra_fields_to_permissions_tale.php @@ -0,0 +1,30 @@ +string('display_name')->nullable(); + $table->string('description')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + $permissionsTableName = config('permission.table_names')['permissions']; + Schema::table($permissionsTableName, function (Blueprint $table) { + $table->dropColumn('display_name'); + $table->dropColumn('description'); + }); + } +}; diff --git a/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122522_add_extra_fields_to_roles_table.php b/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122522_add_extra_fields_to_roles_table.php new file mode 100644 index 000000000..095db49ed --- /dev/null +++ b/app/Containers/AppSection/Authorization/Data/Migrations/2017_04_22_122522_add_extra_fields_to_roles_table.php @@ -0,0 +1,30 @@ +string('display_name')->nullable(); + $table->string('description')->nullable(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + $rolesTableName = config('permission.table_names')['roles']; + Schema::table($rolesTableName, function (Blueprint $table) { + $table->dropColumn('display_name'); + $table->dropColumn('description'); + }); + } +}; diff --git a/app/Containers/AppSection/Authorization/Data/Repositories/PermissionRepository.php b/app/Containers/AppSection/Authorization/Data/Repositories/PermissionRepository.php index d265cdc18..81ea87da3 100644 --- a/app/Containers/AppSection/Authorization/Data/Repositories/PermissionRepository.php +++ b/app/Containers/AppSection/Authorization/Data/Repositories/PermissionRepository.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\Data\Repositories; -use App\Ship\Parents\Repositories\Repository; +use App\Ship\Parents\Repositories\Repository as ParentRepository; -class PermissionRepository extends Repository +class PermissionRepository extends ParentRepository { protected $fieldSearchable = [ 'name' => '=', diff --git a/app/Containers/AppSection/Authorization/Data/Repositories/RoleRepository.php b/app/Containers/AppSection/Authorization/Data/Repositories/RoleRepository.php index 6ceeeaa94..3677bc6e1 100644 --- a/app/Containers/AppSection/Authorization/Data/Repositories/RoleRepository.php +++ b/app/Containers/AppSection/Authorization/Data/Repositories/RoleRepository.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\Data\Repositories; -use App\Ship\Parents\Repositories\Repository; +use App\Ship\Parents\Repositories\Repository as ParentRepository; -class RoleRepository extends Repository +class RoleRepository extends ParentRepository { protected $fieldSearchable = [ 'name' => '=', diff --git a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php index a480dc4a8..539bfde7d 100644 --- a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php +++ b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationDefaultUsersSeeder_4.php @@ -4,10 +4,10 @@ use App\Containers\AppSection\User\Actions\CreateAdminAction; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Seeders\Seeder; +use App\Ship\Parents\Seeders\Seeder as ParentSeeder; use Throwable; -class AuthorizationDefaultUsersSeeder_4 extends Seeder +class AuthorizationDefaultUsersSeeder_4 extends ParentSeeder { /** * @throws CreateResourceFailedException diff --git a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationGivePermissionsToRolesSeeder_3.php b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationGivePermissionsToRolesSeeder_3.php index 996d57167..8792596a7 100644 --- a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationGivePermissionsToRolesSeeder_3.php +++ b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationGivePermissionsToRolesSeeder_3.php @@ -2,15 +2,21 @@ namespace App\Containers\AppSection\Authorization\Data\Seeders; -use App\Ship\Parents\Seeders\Seeder; -use Artisan; +use App\Containers\AppSection\Authorization\Tasks\GetAllPermissionsTask; +use App\Ship\Parents\Seeders\Seeder as ParentSeeder; +use Spatie\Permission\Models\Role; -class AuthorizationGivePermissionsToRolesSeeder_3 extends Seeder +class AuthorizationGivePermissionsToRolesSeeder_3 extends ParentSeeder { public function run(): void { - // Give all permissions to 'admin role ---------------------------------------------------------------- - Artisan::call('apiato:permissions:toRole admin'); + // Give all permissions to 'admin' role on all Guards ---------------------------------------------------------------- + $adminRoleName = config('appSection-authorization.admin_role'); + foreach (array_keys(config('auth.guards')) as $guardName) { + $allPermissions = app(GetAllPermissionsTask::class)->whereGuard($guardName)->run(true); + $adminRole = Role::findByName($adminRoleName, $guardName); + $adminRole->givePermissionTo($allPermissions); + } // Give permissions to roles ---------------------------------------------------------------- // diff --git a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationPermissionsSeeder_1.php b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationPermissionsSeeder_1.php index 373e09530..f91672a5b 100644 --- a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationPermissionsSeeder_1.php +++ b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationPermissionsSeeder_1.php @@ -4,21 +4,23 @@ use App\Containers\AppSection\Authorization\Tasks\CreatePermissionTask; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Seeders\Seeder; +use App\Ship\Parents\Seeders\Seeder as ParentSeeder; -class AuthorizationPermissionsSeeder_1 extends Seeder +class AuthorizationPermissionsSeeder_1 extends ParentSeeder { /** * @throws CreateResourceFailedException */ public function run(): void { - // Default Permissions ---------------------------------------------------------- + // Default Permissions for every Guard ---------------------------------------------------------- $createPermissionTask = app(CreatePermissionTask::class); - $createPermissionTask->run('manage-roles', 'Create, Update, Delete, Get All, Attach/detach permissions to Roles and Get All Permissions.'); - $createPermissionTask->run('create-admins', 'Create new Users (Admins) from the dashboard.'); - $createPermissionTask->run('manage-admins-access', 'Assign users to Roles.'); - $createPermissionTask->run('access-dashboard', 'Access the admins dashboard.'); - $createPermissionTask->run('access-private-docs', 'Access the private docs.'); + foreach (array_keys(config('auth.guards')) as $guardName) { + $createPermissionTask->run('manage-roles', 'Create, Update, Delete, Get All, Attach/detach permissions to Roles and Get All Permissions.', guardName: $guardName); + $createPermissionTask->run('create-admins', 'Create new Users (Admins) from the dashboard.', guardName: $guardName); + $createPermissionTask->run('manage-admins-access', 'Assign users to Roles.', guardName: $guardName); + $createPermissionTask->run('access-dashboard', 'Access the admins dashboard.', guardName: $guardName); + $createPermissionTask->run('access-private-docs', 'Access the private docs.', guardName: $guardName); + } } } diff --git a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationRolesSeeder_2.php b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationRolesSeeder_2.php index 9f4ded733..b7368b1d9 100644 --- a/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationRolesSeeder_2.php +++ b/app/Containers/AppSection/Authorization/Data/Seeders/AuthorizationRolesSeeder_2.php @@ -4,16 +4,18 @@ use App\Containers\AppSection\Authorization\Tasks\CreateRoleTask; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Seeders\Seeder; +use App\Ship\Parents\Seeders\Seeder as ParentSeeder; -class AuthorizationRolesSeeder_2 extends Seeder +class AuthorizationRolesSeeder_2 extends ParentSeeder { /** * @throws CreateResourceFailedException */ public function run(): void { - // Default Roles ---------------------------------------------------------------- - app(CreateRoleTask::class)->run(config('appSection-authorization.admin_role'), 'Administrator', 'Administrator Role'); + // Default Roles for every Guard ---------------------------------------------------------------- + foreach (array_keys(config('auth.guards')) as $guardName) { + app(CreateRoleTask::class)->run(config('appSection-authorization.admin_role'), 'Administrator', 'Administrator Role', $guardName); + } } } diff --git a/app/Containers/AppSection/Authorization/Models/Permission.php b/app/Containers/AppSection/Authorization/Models/Permission.php index 11ae20440..0108697ba 100644 --- a/app/Containers/AppSection/Authorization/Models/Permission.php +++ b/app/Containers/AppSection/Authorization/Models/Permission.php @@ -16,7 +16,7 @@ class Permission extends SpatiePermission FactoryLocatorTrait::newFactory insteadof HasFactory; } - protected string $guard_name = 'web'; + protected string $guard_name = 'api'; protected $fillable = [ 'name', diff --git a/app/Containers/AppSection/Authorization/Models/Role.php b/app/Containers/AppSection/Authorization/Models/Role.php index 59ffd56f5..c633df798 100644 --- a/app/Containers/AppSection/Authorization/Models/Role.php +++ b/app/Containers/AppSection/Authorization/Models/Role.php @@ -16,7 +16,7 @@ class Role extends SpatieRole FactoryLocatorTrait::newFactory insteadof HasFactory; } - protected string $guard_name = 'web'; + protected string $guard_name = 'api'; protected $fillable = [ 'name', diff --git a/app/Containers/AppSection/Authorization/Tasks/AssignRolesToUserTask.php b/app/Containers/AppSection/Authorization/Tasks/AssignRolesToUserTask.php index 65adfed0a..6aa1d27b9 100644 --- a/app/Containers/AppSection/Authorization/Tasks/AssignRolesToUserTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/AssignRolesToUserTask.php @@ -4,10 +4,10 @@ use App\Containers\AppSection\Authorization\Models\Role; use App\Containers\AppSection\User\Models\User; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Illuminate\Contracts\Auth\Authenticatable; -class AssignRolesToUserTask extends Task +class AssignRolesToUserTask extends ParentTask { /** * @param User $user diff --git a/app/Containers/AppSection/Authorization/Tasks/CreatePermissionTask.php b/app/Containers/AppSection/Authorization/Tasks/CreatePermissionTask.php index 1e14298bc..828854857 100644 --- a/app/Containers/AppSection/Authorization/Tasks/CreatePermissionTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/CreatePermissionTask.php @@ -5,10 +5,10 @@ use App\Containers\AppSection\Authorization\Data\Repositories\PermissionRepository; use App\Containers\AppSection\Authorization\Models\Permission; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Exception; -class CreatePermissionTask extends Task +class CreatePermissionTask extends ParentTask { public function __construct( protected PermissionRepository $repository @@ -16,21 +16,24 @@ public function __construct( } /** + * @param string $name + * @param string|null $description + * @param string|null $displayName + * @param string $guardName + * @return Permission * @throws CreateResourceFailedException */ - public function run(string $name, string $description = null, string $displayName = null): Permission + public function run(string $name, string $description = null, string $displayName = null, string $guardName = 'api'): Permission { - app()['cache']->forget('spatie.permission.cache'); - try { $permission = $this->repository->create([ 'name' => strtolower($name), 'description' => $description, 'display_name' => $displayName, - 'guard_name' => 'web', + 'guard_name' => $guardName, ]); - } catch (Exception) { - throw new CreateResourceFailedException(); + } catch (Exception $exception) { + throw new CreateResourceFailedException($exception->getMessage()); } return $permission; diff --git a/app/Containers/AppSection/Authorization/Tasks/CreateRoleTask.php b/app/Containers/AppSection/Authorization/Tasks/CreateRoleTask.php index 3e50c2fd0..4535ebd3e 100644 --- a/app/Containers/AppSection/Authorization/Tasks/CreateRoleTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/CreateRoleTask.php @@ -5,10 +5,10 @@ use App\Containers\AppSection\Authorization\Data\Repositories\RoleRepository; use App\Containers\AppSection\Authorization\Models\Role; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Exception; -class CreateRoleTask extends Task +class CreateRoleTask extends ParentTask { public function __construct( protected RoleRepository $repository @@ -16,18 +16,21 @@ public function __construct( } /** + * @param string $name + * @param string|null $description + * @param string|null $displayName + * @param string $guardName + * @return Role * @throws CreateResourceFailedException */ - public function run(string $name, string $description = null, string $displayName = null): Role + public function run(string $name, string $description = null, string $displayName = null, string $guardName = 'api'): Role { - app()['cache']->forget('spatie.permission.cache'); - try { $role = $this->repository->create([ 'name' => strtolower($name), 'description' => $description, 'display_name' => $displayName, - 'guard_name' => 'web', + 'guard_name' => $guardName, ]); } catch (Exception) { throw new CreateResourceFailedException(); diff --git a/app/Containers/AppSection/Authorization/Tasks/DeleteRoleTask.php b/app/Containers/AppSection/Authorization/Tasks/DeleteRoleTask.php index 1108efd8e..0e5895ac0 100644 --- a/app/Containers/AppSection/Authorization/Tasks/DeleteRoleTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/DeleteRoleTask.php @@ -5,11 +5,11 @@ use App\Containers\AppSection\Authorization\Data\Repositories\RoleRepository; use App\Ship\Exceptions\DeleteResourceFailedException; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Exception; use Illuminate\Database\Eloquent\ModelNotFoundException; -class DeleteRoleTask extends Task +class DeleteRoleTask extends ParentTask { public function __construct( protected RoleRepository $repository @@ -17,7 +17,10 @@ public function __construct( } /** - * @throws DeleteResourceFailedException|NotFoundException + * @param $id + * @return int + * @throws DeleteResourceFailedException + * @throws NotFoundException */ public function run($id): int { diff --git a/app/Containers/AppSection/Authorization/Tasks/DetachPermissionsFromRoleTask.php b/app/Containers/AppSection/Authorization/Tasks/DetachPermissionsFromRoleTask.php index 134ee95c3..a6774284a 100644 --- a/app/Containers/AppSection/Authorization/Tasks/DetachPermissionsFromRoleTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/DetachPermissionsFromRoleTask.php @@ -4,9 +4,9 @@ use App\Containers\AppSection\Authorization\Models\Permission; use App\Containers\AppSection\Authorization\Models\Role; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; -class DetachPermissionsFromRoleTask extends Task +class DetachPermissionsFromRoleTask extends ParentTask { /** * @param Role $role diff --git a/app/Containers/AppSection/Authorization/Tasks/FindPermissionTask.php b/app/Containers/AppSection/Authorization/Tasks/FindPermissionTask.php index fcca3e3f9..19baf5e53 100644 --- a/app/Containers/AppSection/Authorization/Tasks/FindPermissionTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/FindPermissionTask.php @@ -5,10 +5,10 @@ use App\Containers\AppSection\Authorization\Data\Repositories\PermissionRepository; use App\Containers\AppSection\Authorization\Models\Permission; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Illuminate\Support\Str; -class FindPermissionTask extends Task +class FindPermissionTask extends ParentTask { public function __construct( protected PermissionRepository $repository @@ -16,13 +16,34 @@ public function __construct( } /** + * @param string|int $permissionNameOrId + * @param string $guardName + * @return Permission * @throws NotFoundException */ - public function run($permissionNameOrId): Permission + public function run(string|int $permissionNameOrId, string $guardName = 'api'): Permission { - $query = (is_numeric($permissionNameOrId) || Str::isUuid($permissionNameOrId)) ? ['id' => $permissionNameOrId] : ['name' => $permissionNameOrId]; + $query = [ + 'guard_name' => $guardName, + ]; + + if ($this->isID($permissionNameOrId)) { + $query['id'] = $permissionNameOrId; + } else { + $query['name'] = $permissionNameOrId; + } + $permission = $this->repository->findWhere($query)->first(); return $permission ?? throw new NotFoundException(); } + + /** + * @param int|string $permissionNameOrId + * @return bool + */ + private function isID(int|string $permissionNameOrId): bool + { + return (is_numeric($permissionNameOrId) || Str::isUuid($permissionNameOrId)); + } } diff --git a/app/Containers/AppSection/Authorization/Tasks/FindRoleTask.php b/app/Containers/AppSection/Authorization/Tasks/FindRoleTask.php index 3748e0b0b..c085ec7dd 100644 --- a/app/Containers/AppSection/Authorization/Tasks/FindRoleTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/FindRoleTask.php @@ -5,10 +5,10 @@ use App\Containers\AppSection\Authorization\Data\Repositories\RoleRepository; use App\Containers\AppSection\Authorization\Models\Role; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Illuminate\Support\Str; -class FindRoleTask extends Task +class FindRoleTask extends ParentTask { public function __construct( protected RoleRepository $repository @@ -16,13 +16,34 @@ public function __construct( } /** + * @param string|int $roleNameOrId + * @param string $guardName + * @return Role * @throws NotFoundException */ - public function run($roleNameOrId): Role + public function run(string|int $roleNameOrId, string $guardName = 'api'): Role { - $query = (is_numeric($roleNameOrId) || Str::isUuid($roleNameOrId)) ? ['id' => $roleNameOrId] : ['name' => $roleNameOrId]; + $query = [ + 'guard_name' => $guardName, + ]; + + if ($this->isID($roleNameOrId)) { + $query['id'] = $roleNameOrId; + } else { + $query['name'] = $roleNameOrId; + } + $role = $this->repository->findWhere($query)->first(); return $role ?? throw new NotFoundException(); } + + /** + * @param int|string $roleNameOrId + * @return bool + */ + private function isID(int|string $roleNameOrId): bool + { + return (is_numeric($roleNameOrId) || Str::isUuid($roleNameOrId)); + } } diff --git a/app/Containers/AppSection/Authorization/Tasks/GetAllPermissionsTask.php b/app/Containers/AppSection/Authorization/Tasks/GetAllPermissionsTask.php index 8abb70900..1cf5a961f 100644 --- a/app/Containers/AppSection/Authorization/Tasks/GetAllPermissionsTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/GetAllPermissionsTask.php @@ -4,10 +4,11 @@ use Apiato\Core\Exceptions\CoreInternalErrorException; use App\Containers\AppSection\Authorization\Data\Repositories\PermissionRepository; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Criterias\ThisLikeThatCriteria; +use App\Ship\Parents\Tasks\Task as ParentTask; use Prettus\Repository\Exceptions\RepositoryException; -class GetAllPermissionsTask extends Task +class GetAllPermissionsTask extends ParentTask { public function __construct( protected PermissionRepository $repository @@ -15,6 +16,8 @@ public function __construct( } /** + * @param bool $skipPagination + * @return mixed * @throws CoreInternalErrorException * @throws RepositoryException */ @@ -24,4 +27,14 @@ public function run(bool $skipPagination = false): mixed return $skipPagination ? $repository->all() : $repository->paginate(); } + + /** + * @throws RepositoryException + */ + public function whereGuard(string $guardName): static + { + $this->repository->pushCriteria(new ThisLikeThatCriteria('guard_name', $guardName)); + + return $this; + } } diff --git a/app/Containers/AppSection/Authorization/Tasks/GetAllRolesTask.php b/app/Containers/AppSection/Authorization/Tasks/GetAllRolesTask.php index cb540d128..306cda0e2 100644 --- a/app/Containers/AppSection/Authorization/Tasks/GetAllRolesTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/GetAllRolesTask.php @@ -4,10 +4,11 @@ use Apiato\Core\Exceptions\CoreInternalErrorException; use App\Containers\AppSection\Authorization\Data\Repositories\RoleRepository; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Criterias\ThisLikeThatCriteria; +use App\Ship\Parents\Tasks\Task as ParentTask; use Prettus\Repository\Exceptions\RepositoryException; -class GetAllRolesTask extends Task +class GetAllRolesTask extends ParentTask { public function __construct( protected RoleRepository $repository @@ -15,11 +16,25 @@ public function __construct( } /** + * @param bool $skipPagination + * @return mixed * @throws CoreInternalErrorException * @throws RepositoryException */ - public function run() + public function run(bool $skipPagination = false): mixed { - return $this->addRequestCriteria()->repository->paginate(); + $repository = $this->addRequestCriteria()->repository; + + return $skipPagination ? $repository->all() : $repository->paginate(); + } + + /** + * @throws RepositoryException + */ + public function whereGuard(string $guardName): static + { + $this->repository->pushCriteria(new ThisLikeThatCriteria('guard_name', $guardName)); + + return $this; } } diff --git a/app/Containers/AppSection/Authorization/Tasks/RevokeRoleFromUserTask.php b/app/Containers/AppSection/Authorization/Tasks/RevokeRoleFromUserTask.php index 8a3133d6b..4e2e03857 100644 --- a/app/Containers/AppSection/Authorization/Tasks/RevokeRoleFromUserTask.php +++ b/app/Containers/AppSection/Authorization/Tasks/RevokeRoleFromUserTask.php @@ -4,11 +4,16 @@ use App\Containers\AppSection\Authorization\Models\Role; use App\Containers\AppSection\User\Models\User; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Illuminate\Contracts\Auth\Authenticatable; -class RevokeRoleFromUserTask extends Task +class RevokeRoleFromUserTask extends ParentTask { + /** + * @param User $user + * @param string|int|Role $role + * @return Authenticatable + */ public function run(User $user, string|int|Role $role): Authenticatable { return $user->removeRole($role); diff --git a/app/Containers/AppSection/Authorization/Tests/Unit/CreatePermissionTaskTest.php b/app/Containers/AppSection/Authorization/Tests/Unit/CreatePermissionTaskTest.php index 181e9a8db..e317e4241 100644 --- a/app/Containers/AppSection/Authorization/Tests/Unit/CreatePermissionTaskTest.php +++ b/app/Containers/AppSection/Authorization/Tests/Unit/CreatePermissionTaskTest.php @@ -24,6 +24,6 @@ public function testCreatePermission(): void $this->assertEquals(strtolower($name), $permission->name); $this->assertEquals($description, $permission->description); $this->assertEquals($display_name, $permission->display_name); - $this->assertEquals('web', $permission->guard_name); + $this->assertEquals('api', $permission->guard_name); } } diff --git a/app/Containers/AppSection/Authorization/Tests/Unit/CreateRoleTaskTest.php b/app/Containers/AppSection/Authorization/Tests/Unit/CreateRoleTaskTest.php index e493a2a82..1ee83f5cb 100644 --- a/app/Containers/AppSection/Authorization/Tests/Unit/CreateRoleTaskTest.php +++ b/app/Containers/AppSection/Authorization/Tests/Unit/CreateRoleTaskTest.php @@ -24,6 +24,6 @@ public function testCreateRole(): void $this->assertEquals(strtolower($name), $role->name); $this->assertEquals($description, $role->description); $this->assertEquals($display_name, $role->display_name); - $this->assertEquals('web', $role->guard_name); + $this->assertEquals('api', $role->guard_name); } } diff --git a/app/Containers/AppSection/Authorization/Tests/Unit/GiveAllPermissionsToRoleActionTest.php b/app/Containers/AppSection/Authorization/Tests/Unit/GiveAllPermissionsToRoleActionTest.php deleted file mode 100644 index 44cc5a910..000000000 --- a/app/Containers/AppSection/Authorization/Tests/Unit/GiveAllPermissionsToRoleActionTest.php +++ /dev/null @@ -1,24 +0,0 @@ -create(); - $allPermissionsNames = app(GiveAllPermissionsToRoleAction::class)->run($role->name); - - $this->assertTrue($role->hasAllPermissions($allPermissionsNames)); - } -} diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/AssignRolesToUserController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/AssignRolesToUserController.php index 783f173e6..603532db5 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/AssignRolesToUserController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/AssignRolesToUserController.php @@ -12,7 +12,10 @@ class AssignRolesToUserController extends ApiController { /** - * @throws InvalidTransformerException|NotFoundException + * @param AssignRolesToUserRequest $request + * @return array + * @throws InvalidTransformerException + * @throws NotFoundException */ public function assignRolesToUser(AssignRolesToUserRequest $request): array { diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/AttachPermissionsToRoleController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/AttachPermissionsToRoleController.php index 137433bd9..899baeb1b 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/AttachPermissionsToRoleController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/AttachPermissionsToRoleController.php @@ -12,7 +12,10 @@ class AttachPermissionsToRoleController extends ApiController { /** - * @throws InvalidTransformerException|NotFoundException + * @param AttachPermissionsToRoleRequest $request + * @return array + * @throws InvalidTransformerException + * @throws NotFoundException */ public function attachPermissionsToRole(AttachPermissionsToRoleRequest $request): array { diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/CreateRoleController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/CreateRoleController.php index de7287fd3..892f878c7 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/CreateRoleController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/CreateRoleController.php @@ -13,8 +13,10 @@ class CreateRoleController extends ApiController { /** - * @throws InvalidTransformerException + * @param CreateRoleRequest $request + * @return JsonResponse * @throws CreateResourceFailedException + * @throws InvalidTransformerException */ public function createRole(CreateRoleRequest $request): JsonResponse { diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/DetachPermissionsFromRoleController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/DetachPermissionsFromRoleController.php index bae824b4a..e2f666b8f 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/DetachPermissionsFromRoleController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/DetachPermissionsFromRoleController.php @@ -12,7 +12,10 @@ class DetachPermissionsFromRoleController extends ApiController { /** - * @throws InvalidTransformerException|NotFoundException + * @param DetachPermissionsFromRoleRequest $request + * @return array + * @throws InvalidTransformerException + * @throws NotFoundException */ public function detachPermissionFromRole(DetachPermissionsFromRoleRequest $request): array { diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/FindPermissionController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/FindPermissionController.php index 901d43443..d62843e27 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/FindPermissionController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/FindPermissionController.php @@ -12,6 +12,8 @@ class FindPermissionController extends ApiController { /** + * @param FindPermissionRequest $request + * @return array * @throws InvalidTransformerException * @throws NotFoundException */ diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/FindRoleController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/FindRoleController.php index 6445f1456..9607a5bea 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/FindRoleController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/FindRoleController.php @@ -12,6 +12,8 @@ class FindRoleController extends ApiController { /** + * @param FindRoleRequest $request + * @return array * @throws InvalidTransformerException * @throws NotFoundException */ diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllPermissionsController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllPermissionsController.php index 4722a8479..e17a51bb6 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllPermissionsController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllPermissionsController.php @@ -13,13 +13,15 @@ class GetAllPermissionsController extends ApiController { /** - * @throws InvalidTransformerException + * @param GetAllPermissionsRequest $request + * @return array * @throws CoreInternalErrorException + * @throws InvalidTransformerException * @throws RepositoryException */ public function getAllPermissions(GetAllPermissionsRequest $request): array { - $permissions = app(GetAllPermissionsAction::class)->run($request); + $permissions = app(GetAllPermissionsAction::class)->run(); return $this->transform($permissions, PermissionTransformer::class); } diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllRolesController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllRolesController.php index 2c24e8c54..24e52c7fa 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllRolesController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/GetAllRolesController.php @@ -13,13 +13,15 @@ class GetAllRolesController extends ApiController { /** - * @throws InvalidTransformerException + * @param GetAllRolesRequest $request + * @return array * @throws CoreInternalErrorException + * @throws InvalidTransformerException * @throws RepositoryException */ public function getAllRoles(GetAllRolesRequest $request): array { - $roles = app(GetAllRolesAction::class)->run($request); + $roles = app(GetAllRolesAction::class)->run(); return $this->transform($roles, RoleTransformer::class); } diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/RevokeRolesFromUserController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/RevokeRolesFromUserController.php index 190db9f46..0b6cdeeea 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/RevokeRolesFromUserController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/RevokeRolesFromUserController.php @@ -12,6 +12,8 @@ class RevokeRolesFromUserController extends ApiController { /** + * @param RevokeRolesFromUserRequest $request + * @return array * @throws InvalidTransformerException * @throws NotFoundException */ diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncPermissionOnRoleController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncPermissionOnRoleController.php index 7cdd17dbf..b7ce87b7e 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncPermissionOnRoleController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncPermissionOnRoleController.php @@ -12,6 +12,8 @@ class SyncPermissionOnRoleController extends ApiController { /** + * @param SyncPermissionsOnRoleRequest $request + * @return array * @throws InvalidTransformerException * @throws NotFoundException */ diff --git a/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncUserRolesController.php b/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncUserRolesController.php index 6034fcd24..78bcd366d 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncUserRolesController.php +++ b/app/Containers/AppSection/Authorization/UI/API/Controllers/SyncUserRolesController.php @@ -12,8 +12,10 @@ class SyncUserRolesController extends ApiController { /** - * @throws NotFoundException + * @param SyncUserRolesRequest $request + * @return array * @throws InvalidTransformerException + * @throws NotFoundException */ public function syncUserRoles(SyncUserRolesRequest $request): array { diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php index 13903e77d..f0f392bb9 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/AssignRolesToUserRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class AssignRolesToUserRequest extends Request +class AssignRolesToUserRequest extends ParentRequest { /* * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php index 08fdc4575..842fa1ddd 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/AttachPermissionsToRoleRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class AttachPermissionsToRoleRequest extends Request +class AttachPermissionsToRoleRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php index bd5621f1d..de6b4c047 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/CreateRoleRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class CreateRoleRequest extends Request +class CreateRoleRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php index 978b20bb5..61ee7b866 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/DeleteRoleRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class DeleteRoleRequest extends Request +class DeleteRoleRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php index 61af87520..3b4ee1c28 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/DetachPermissionsFromRoleRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class DetachPermissionsFromRoleRequest extends Request +class DetachPermissionsFromRoleRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php index c46de64ff..b9c3200da 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/FindPermissionRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class FindPermissionRequest extends Request +class FindPermissionRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php index 87676aa57..ff5f04ea9 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/FindRoleRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class FindRoleRequest extends Request +class FindRoleRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php index 0229d15e9..620bbf5e5 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllPermissionsRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class GetAllPermissionsRequest extends Request +class GetAllPermissionsRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php index d2e76030b..4f03b061f 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/GetAllRolesRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class GetAllRolesRequest extends Request +class GetAllRolesRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php index 24354f025..7d930fa36 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/RevokeRolesFromUserRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class RevokeRolesFromUserRequest extends Request +class RevokeRolesFromUserRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php index 2ca825599..d2706c1f4 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/SyncPermissionsOnRoleRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class SyncPermissionsOnRoleRequest extends Request +class SyncPermissionsOnRoleRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php b/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php index 3d21553ac..c7ea7c171 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Requests/SyncUserRolesRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class SyncUserRolesRequest extends Request +class SyncUserRolesRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AssignRolesToUserTest.php b/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AssignRolesToUserTest.php index f38908a4e..65e605cf8 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AssignRolesToUserTest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/AssignRolesToUserTest.php @@ -5,7 +5,6 @@ use App\Containers\AppSection\Authorization\Models\Role; use App\Containers\AppSection\Authorization\UI\API\Tests\ApiTestCase; use App\Containers\AppSection\User\Models\User; -use Illuminate\Support\Arr; use Illuminate\Testing\Fluent\AssertableJson; /** @@ -36,12 +35,11 @@ public function testAssignRoleToUser(): void $response->assertStatus(200); $response->assertJson( - fn (AssertableJson $json) => - $json->has('data') - ->has('data.roles.data', 1) - ->where('data.id', $data['user_id']) - ->where('data.roles.data.0.id', $data['roles_ids'][0]) - ->etc() + fn (AssertableJson $json) => $json->has('data') + ->has('data.roles.data', 1) + ->where('data.id', $data['user_id']) + ->where('data.roles.data.0.id', $data['roles_ids'][0]) + ->etc() ); } @@ -62,13 +60,12 @@ public function testAssignManyRolesToUser(): void $response->assertStatus(200); $response->assertJson( - fn (AssertableJson $json) => - $json->has('data') - ->has('data.roles.data', 2) - ->where('data.id', $data['user_id']) - ->where('data.roles.data.0.id', $data['roles_ids'][0]) - ->where('data.roles.data.1.id', $data['roles_ids'][1]) - ->etc() + fn (AssertableJson $json) => $json->has('data') + ->has('data.roles.data', 2) + ->where('data.id', $data['user_id']) + ->where('data.roles.data.0.id', $data['roles_ids'][0]) + ->where('data.roles.data.1.id', $data['roles_ids'][1]) + ->etc() ); } } diff --git a/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DeleteRoleTest.php b/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DeleteRoleTest.php index 06c15c85b..fd9a12761 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DeleteRoleTest.php +++ b/app/Containers/AppSection/Authorization/UI/API/Tests/Functional/DeleteRoleTest.php @@ -10,8 +10,6 @@ * * @group authorization * @group api - * - * @author Mahmoud Zalt */ class DeleteRoleTest extends ApiTestCase { diff --git a/app/Containers/AppSection/Authorization/UI/API/Transformers/PermissionTransformer.php b/app/Containers/AppSection/Authorization/UI/API/Transformers/PermissionTransformer.php index b13a255df..67efec37d 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Transformers/PermissionTransformer.php +++ b/app/Containers/AppSection/Authorization/UI/API/Transformers/PermissionTransformer.php @@ -3,9 +3,9 @@ namespace App\Containers\AppSection\Authorization\UI\API\Transformers; use App\Containers\AppSection\Authorization\Models\Permission; -use App\Ship\Parents\Transformers\Transformer; +use App\Ship\Parents\Transformers\Transformer as ParentTransformer; -class PermissionTransformer extends Transformer +class PermissionTransformer extends ParentTransformer { protected array $availableIncludes = [ diff --git a/app/Containers/AppSection/Authorization/UI/API/Transformers/RoleTransformer.php b/app/Containers/AppSection/Authorization/UI/API/Transformers/RoleTransformer.php index 78b598918..fba62ab95 100644 --- a/app/Containers/AppSection/Authorization/UI/API/Transformers/RoleTransformer.php +++ b/app/Containers/AppSection/Authorization/UI/API/Transformers/RoleTransformer.php @@ -3,10 +3,10 @@ namespace App\Containers\AppSection\Authorization\UI\API\Transformers; use App\Containers\AppSection\Authorization\Models\Role; -use App\Ship\Parents\Transformers\Transformer; +use App\Ship\Parents\Transformers\Transformer as ParentTransformer; use League\Fractal\Resource\Collection; -class RoleTransformer extends Transformer +class RoleTransformer extends ParentTransformer { protected array $availableIncludes = [ diff --git a/app/Containers/AppSection/Authorization/UI/CLI/Commands/GiveAllPermissionsToRoleCommand.php b/app/Containers/AppSection/Authorization/UI/CLI/Commands/GiveAllPermissionsToRoleCommand.php deleted file mode 100644 index 9c34e1fc4..000000000 --- a/app/Containers/AppSection/Authorization/UI/CLI/Commands/GiveAllPermissionsToRoleCommand.php +++ /dev/null @@ -1,29 +0,0 @@ -argument('role'); - - $allPermissionsNames = app(GiveAllPermissionsToRoleAction::class)->run($roleName); - - $this->info('Gave the Role (' . $roleName . ') the following Permissions: ' . implode( - ' - ', - $allPermissionsNames - ) . '.'); - } -} diff --git a/app/Containers/AppSection/Authorization/UI/CLI/Tests/CliTestCase.php b/app/Containers/AppSection/Authorization/UI/CLI/Tests/CliTestCase.php deleted file mode 100644 index 016b876c2..000000000 --- a/app/Containers/AppSection/Authorization/UI/CLI/Tests/CliTestCase.php +++ /dev/null @@ -1,15 +0,0 @@ -create()->name; - $allPermissionsNames = app(GetAllPermissionsTask::class)->run(true)->pluck('name')->toArray(); - - $this->artisan("apiato:permissions:toRole ${roleName}") - ->expectsOutput("Gave the Role (${roleName}) the following Permissions: " . implode( - ' - ', - $allPermissionsNames - ) . '.') - ->assertExitCode(0); - } -} diff --git a/app/Containers/AppSection/Authorization/UI/WEB/Controllers/UnauthorizedController.php b/app/Containers/AppSection/Authorization/UI/WEB/Controllers/UnauthorizedController.php new file mode 100644 index 000000000..4e4395776 --- /dev/null +++ b/app/Containers/AppSection/Authorization/UI/WEB/Controllers/UnauthorizedController.php @@ -0,0 +1,19 @@ + [], + 'roles' => [], + ]; + + /** + * Id's that needs decoding before applying the validation rules. + */ + protected array $decode = [ + + ]; + + /** + * Defining the URL parameters (`/stores/999/items`) allows applying + * validation rules on them and allows accessing them like request data. + */ + protected array $urlParameters = [ + + ]; + + /** + * Get the validation rules that apply to the request. + */ + public function rules(): array + { + return []; + } + + /** + * Determine if the user is authorized to make this request. + */ + public function authorize(): bool + { + return $this->check([ + 'hasAccess', + ]); + } +} diff --git a/app/Containers/AppSection/Authorization/UI/WEB/Routes/GetUnauthorized.php b/app/Containers/AppSection/Authorization/UI/WEB/Routes/GetUnauthorized.php new file mode 100644 index 000000000..a3f7596d1 --- /dev/null +++ b/app/Containers/AppSection/Authorization/UI/WEB/Routes/GetUnauthorized.php @@ -0,0 +1,7 @@ +name('unauthorized'); diff --git a/app/Containers/AppSection/Authorization/UI/WEB/Views/unauthorized.blade.php b/app/Containers/AppSection/Authorization/UI/WEB/Views/unauthorized.blade.php new file mode 100644 index 000000000..ef33e2bc8 --- /dev/null +++ b/app/Containers/AppSection/Authorization/UI/WEB/Views/unauthorized.blade.php @@ -0,0 +1,43 @@ + + + + Apiato + + + + +

+

Access Denied

+

You are not authorized to access this page.

+ +
+ + + diff --git a/app/Containers/AppSection/Authorization/composer.json b/app/Containers/AppSection/Authorization/composer.json index aad89f826..f122e9c03 100644 --- a/app/Containers/AppSection/Authorization/composer.json +++ b/app/Containers/AppSection/Authorization/composer.json @@ -3,7 +3,7 @@ "description": "apiato Container.", "type": "apiato-container", "require": { - "spatie/laravel-permission": "^4.4.1" + "spatie/laravel-permission": "^5.5.2" }, "require-dev": { "roave/security-advisories": "dev-latest" diff --git a/app/Containers/AppSection/User/Actions/CreateAdminAction.php b/app/Containers/AppSection/User/Actions/CreateAdminAction.php index e39d7b96d..c39ffa06a 100644 --- a/app/Containers/AppSection/User/Actions/CreateAdminAction.php +++ b/app/Containers/AppSection/User/Actions/CreateAdminAction.php @@ -4,36 +4,36 @@ use App\Containers\AppSection\Authentication\Tasks\CreateUserByCredentialsTask; use App\Containers\AppSection\Authorization\Tasks\AssignRolesToUserTask; +use App\Containers\AppSection\Authorization\Tasks\FindRoleTask; use App\Containers\AppSection\User\Models\User; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Actions\Action; -use Exception; +use App\Ship\Exceptions\NotFoundException; +use App\Ship\Parents\Actions\Action as ParentAction; use Illuminate\Support\Facades\DB; use Throwable; -class CreateAdminAction extends Action +class CreateAdminAction extends ParentAction { /** + * @param array $data + * @return User * @throws CreateResourceFailedException * @throws Throwable + * @throws NotFoundException */ public function run(array $data): User { - try { - DB::beginTransaction(); + return DB::transaction(function () use ($data) { + $user = app(CreateUserByCredentialsTask::class)->run($data); + $adminRoleName = config('appSection-authorization.admin_role'); + foreach (array_keys(config('auth.guards')) as $guardName) { + $adminRole = app(FindRoleTask::class)->run($adminRoleName, $guardName); + app(AssignRolesToUserTask::class)->run($user, $adminRole); + } + $user->email_verified_at = now(); + $user->save(); - $admin = app(CreateUserByCredentialsTask::class)->run($data); - app(AssignRolesToUserTask::class)->run($admin, [config('appSection-authorization.admin_role')]); - $admin->email_verified_at = now(); - $admin->save(); - - DB::commit(); - - return $admin; - } catch (Exception $exception) { - DB::rollBack(); - - throw $exception; - } + return $user; + }); } } diff --git a/app/Containers/AppSection/User/Actions/DeleteUserAction.php b/app/Containers/AppSection/User/Actions/DeleteUserAction.php index f4d8d8745..057fc8119 100644 --- a/app/Containers/AppSection/User/Actions/DeleteUserAction.php +++ b/app/Containers/AppSection/User/Actions/DeleteUserAction.php @@ -6,9 +6,9 @@ use App\Containers\AppSection\User\UI\API\Requests\DeleteUserRequest; use App\Ship\Exceptions\DeleteResourceFailedException; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class DeleteUserAction extends Action +class DeleteUserAction extends ParentAction { /** * @param DeleteUserRequest $request diff --git a/app/Containers/AppSection/User/Actions/FindUserByIdAction.php b/app/Containers/AppSection/User/Actions/FindUserByIdAction.php index bd57fe510..f45ca19a1 100644 --- a/app/Containers/AppSection/User/Actions/FindUserByIdAction.php +++ b/app/Containers/AppSection/User/Actions/FindUserByIdAction.php @@ -6,11 +6,13 @@ use App\Containers\AppSection\User\Tasks\FindUserByIdTask; use App\Containers\AppSection\User\UI\API\Requests\FindUserByIdRequest; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class FindUserByIdAction extends Action +class FindUserByIdAction extends ParentAction { /** + * @param FindUserByIdRequest $request + * @return User * @throws NotFoundException */ public function run(FindUserByIdRequest $request): User diff --git a/app/Containers/AppSection/User/Actions/GetAllUsersAction.php b/app/Containers/AppSection/User/Actions/GetAllUsersAction.php index b47d2e490..e82c77216 100644 --- a/app/Containers/AppSection/User/Actions/GetAllUsersAction.php +++ b/app/Containers/AppSection/User/Actions/GetAllUsersAction.php @@ -4,16 +4,17 @@ use Apiato\Core\Exceptions\CoreInternalErrorException; use App\Containers\AppSection\User\Tasks\GetAllUsersTask; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; use Prettus\Repository\Exceptions\RepositoryException; -class GetAllUsersAction extends Action +class GetAllUsersAction extends ParentAction { /** + * @return mixed * @throws CoreInternalErrorException * @throws RepositoryException */ - public function run() + public function run(): mixed { return app(GetAllUsersTask::class)->run(); } diff --git a/app/Containers/AppSection/User/Actions/UpdateUserAction.php b/app/Containers/AppSection/User/Actions/UpdateUserAction.php index 0544554cb..3b8df7f87 100644 --- a/app/Containers/AppSection/User/Actions/UpdateUserAction.php +++ b/app/Containers/AppSection/User/Actions/UpdateUserAction.php @@ -8,9 +8,9 @@ use App\Containers\AppSection\User\UI\API\Requests\UpdateUserRequest; use App\Ship\Exceptions\NotFoundException; use App\Ship\Exceptions\UpdateResourceFailedException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class UpdateUserAction extends Action +class UpdateUserAction extends ParentAction { /** * @param UpdateUserRequest $request diff --git a/app/Containers/AppSection/User/Actions/UpdateUserPasswordAction.php b/app/Containers/AppSection/User/Actions/UpdateUserPasswordAction.php index fd640bcba..dd339ce8c 100644 --- a/app/Containers/AppSection/User/Actions/UpdateUserPasswordAction.php +++ b/app/Containers/AppSection/User/Actions/UpdateUserPasswordAction.php @@ -9,9 +9,9 @@ use App\Containers\AppSection\User\UI\API\Requests\UpdateUserPasswordRequest; use App\Ship\Exceptions\NotFoundException; use App\Ship\Exceptions\UpdateResourceFailedException; -use App\Ship\Parents\Actions\Action; +use App\Ship\Parents\Actions\Action as ParentAction; -class UpdateUserPasswordAction extends Action +class UpdateUserPasswordAction extends ParentAction { /** * @param UpdateUserPasswordRequest $request diff --git a/app/Containers/AppSection/User/Data/Factories/UserFactory.php b/app/Containers/AppSection/User/Data/Factories/UserFactory.php index 1a5ff7205..07396e59d 100644 --- a/app/Containers/AppSection/User/Data/Factories/UserFactory.php +++ b/app/Containers/AppSection/User/Data/Factories/UserFactory.php @@ -3,11 +3,11 @@ namespace App\Containers\AppSection\User\Data\Factories; use App\Containers\AppSection\User\Models\User; -use App\Ship\Parents\Factories\Factory; +use App\Ship\Parents\Factories\Factory as ParentFactory; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Str; -class UserFactory extends Factory +class UserFactory extends ParentFactory { protected $model = User::class; @@ -26,16 +26,16 @@ public function definition(): array ]; } - public function admin(): UserFactory + public function admin(): static { return $this->afterCreating(function (User $user) { $user->assignRole(config('appSection-authorization.admin_role')); }); } - public function unverified(): UserFactory + public function unverified(): static { - return $this->state(function () { + return $this->state(function (array $attributes) { return [ 'email_verified_at' => null, ]; diff --git a/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000001_create_users_table.php b/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000001_create_users_table.php index ceeb1c267..b96fb6876 100644 --- a/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000001_create_users_table.php +++ b/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000001_create_users_table.php @@ -2,8 +2,9 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; -class CreateUsersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -14,8 +15,8 @@ public function up(): void $table->id(); $table->string('name')->nullable(); $table->string('email')->unique()->nullable(); - $table->string('password')->nullable(); $table->timestamp('email_verified_at')->nullable(); + $table->string('password')->nullable(); $table->string('gender')->nullable(); $table->date('birth')->nullable(); $table->rememberToken(); @@ -28,6 +29,6 @@ public function up(): void */ public function down(): void { - Schema::drop('users'); + Schema::dropIfExists('users'); } -} +}; diff --git a/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000002_create_password_resets_table.php b/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000002_create_password_resets_table.php index a5860c658..4f42fe690 100644 --- a/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000002_create_password_resets_table.php +++ b/app/Containers/AppSection/User/Data/Migrations/2000_01_01_000002_create_password_resets_table.php @@ -2,8 +2,9 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\Schema; -class CreatePasswordResetsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -12,7 +13,7 @@ public function up(): void { Schema::create('password_resets', function (Blueprint $table) { $table->string('email')->index(); - $table->string('token')->index(); + $table->string('token'); $table->timestamp('created_at')->nullable(); }); } @@ -22,6 +23,6 @@ public function up(): void */ public function down(): void { - Schema::drop('password_resets'); + Schema::dropIfExists('password_resets'); } -} +}; diff --git a/app/Containers/AppSection/User/Data/Repositories/UserRepository.php b/app/Containers/AppSection/User/Data/Repositories/UserRepository.php index 1ee6d8847..d56c9859e 100644 --- a/app/Containers/AppSection/User/Data/Repositories/UserRepository.php +++ b/app/Containers/AppSection/User/Data/Repositories/UserRepository.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\User\Data\Repositories; -use App\Ship\Parents\Repositories\Repository; +use App\Ship\Parents\Repositories\Repository as ParentRepository; -class UserRepository extends Repository +class UserRepository extends ParentRepository { protected $fieldSearchable = [ 'name' => 'like', diff --git a/app/Containers/AppSection/User/Data/Seeders/UserPermissionsSeeder_1.php b/app/Containers/AppSection/User/Data/Seeders/UserPermissionsSeeder_1.php index 29d0ebd40..cdfc2386a 100644 --- a/app/Containers/AppSection/User/Data/Seeders/UserPermissionsSeeder_1.php +++ b/app/Containers/AppSection/User/Data/Seeders/UserPermissionsSeeder_1.php @@ -4,21 +4,23 @@ use App\Containers\AppSection\Authorization\Tasks\CreatePermissionTask; use App\Ship\Exceptions\CreateResourceFailedException; -use App\Ship\Parents\Seeders\Seeder; +use App\Ship\Parents\Seeders\Seeder as ParentSeeder; -class UserPermissionsSeeder_1 extends Seeder +class UserPermissionsSeeder_1 extends ParentSeeder { /** * @throws CreateResourceFailedException */ public function run(): void { - // Default Permissions ---------------------------------------------------------- + // Default Permissions for every Guard ---------------------------------------------------------- $createPermissionTask = app(CreatePermissionTask::class); - $createPermissionTask->run('search-users', 'Find a User in the DB.'); - $createPermissionTask->run('list-users', 'Get All Users.'); - $createPermissionTask->run('update-users', 'Update a User.'); - $createPermissionTask->run('delete-users', 'Delete a User.'); - $createPermissionTask->run('refresh-users', 'Refresh User data.'); + foreach (array_keys(config('auth.guards')) as $guardName) { + $createPermissionTask->run('search-users', 'Find a User in the DB.', guardName: $guardName); + $createPermissionTask->run('list-users', 'Get All Users.', guardName: $guardName); + $createPermissionTask->run('update-users', 'Update a User.', guardName: $guardName); + $createPermissionTask->run('delete-users', 'Delete a User.', guardName: $guardName); + $createPermissionTask->run('refresh-users', 'Refresh User data.', guardName: $guardName); + } } } diff --git a/app/Containers/AppSection/User/Models/User.php b/app/Containers/AppSection/User/Models/User.php index f7c2e72a6..1f0a5c833 100644 --- a/app/Containers/AppSection/User/Models/User.php +++ b/app/Containers/AppSection/User/Models/User.php @@ -6,12 +6,12 @@ use App\Containers\AppSection\Authentication\Traits\AuthenticationTrait; use App\Containers\AppSection\Authorization\Traits\AuthorizationTrait; use App\Ship\Contracts\MustVerifyEmail; -use App\Ship\Parents\Models\UserModel; +use App\Ship\Parents\Models\UserModel as ParentUserModel; use Illuminate\Database\Eloquent\Casts\Attribute; use Illuminate\Notifications\Notifiable; use Illuminate\Validation\Rules\Password; -class User extends UserModel implements MustVerifyEmail +class User extends ParentUserModel implements MustVerifyEmail { use AuthorizationTrait; use AuthenticationTrait; diff --git a/app/Containers/AppSection/User/Notifications/PasswordUpdatedNotification.php b/app/Containers/AppSection/User/Notifications/PasswordUpdatedNotification.php index 8a4812e53..4bc73f821 100644 --- a/app/Containers/AppSection/User/Notifications/PasswordUpdatedNotification.php +++ b/app/Containers/AppSection/User/Notifications/PasswordUpdatedNotification.php @@ -3,12 +3,12 @@ namespace App\Containers\AppSection\User\Notifications; use App\Ship\Parents\Models\UserModel; -use App\Ship\Parents\Notifications\Notification; +use App\Ship\Parents\Notifications\Notification as ParentNotification; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; -class PasswordUpdatedNotification extends Notification implements ShouldQueue +class PasswordUpdatedNotification extends ParentNotification implements ShouldQueue { use Queueable; diff --git a/app/Containers/AppSection/User/Tasks/DeleteUserTask.php b/app/Containers/AppSection/User/Tasks/DeleteUserTask.php index a7f9ab7cf..bc0b2fa60 100644 --- a/app/Containers/AppSection/User/Tasks/DeleteUserTask.php +++ b/app/Containers/AppSection/User/Tasks/DeleteUserTask.php @@ -5,11 +5,11 @@ use App\Containers\AppSection\User\Data\Repositories\UserRepository; use App\Ship\Exceptions\DeleteResourceFailedException; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Exception; use Illuminate\Database\Eloquent\ModelNotFoundException; -class DeleteUserTask extends Task +class DeleteUserTask extends ParentTask { public function __construct( protected UserRepository $repository @@ -17,7 +17,10 @@ public function __construct( } /** - * @throws DeleteResourceFailedException|NotFoundException + * @param $id + * @return int + * @throws DeleteResourceFailedException + * @throws NotFoundException */ public function run($id): int { diff --git a/app/Containers/AppSection/User/Tasks/FindUserByEmailTask.php b/app/Containers/AppSection/User/Tasks/FindUserByEmailTask.php index d43d9c2fc..673b04742 100644 --- a/app/Containers/AppSection/User/Tasks/FindUserByEmailTask.php +++ b/app/Containers/AppSection/User/Tasks/FindUserByEmailTask.php @@ -5,9 +5,9 @@ use App\Containers\AppSection\User\Data\Repositories\UserRepository; use App\Containers\AppSection\User\Models\User; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; -class FindUserByEmailTask extends Task +class FindUserByEmailTask extends ParentTask { public function __construct( protected UserRepository $repository @@ -15,6 +15,8 @@ public function __construct( } /** + * @param string $email + * @return User * @throws NotFoundException */ public function run(string $email): User diff --git a/app/Containers/AppSection/User/Tasks/FindUserByIdTask.php b/app/Containers/AppSection/User/Tasks/FindUserByIdTask.php index 2f156c5c9..151c8c4b0 100644 --- a/app/Containers/AppSection/User/Tasks/FindUserByIdTask.php +++ b/app/Containers/AppSection/User/Tasks/FindUserByIdTask.php @@ -5,10 +5,10 @@ use App\Containers\AppSection\User\Data\Repositories\UserRepository; use App\Containers\AppSection\User\Models\User; use App\Ship\Exceptions\NotFoundException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Exception; -class FindUserByIdTask extends Task +class FindUserByIdTask extends ParentTask { public function __construct( protected UserRepository $repository @@ -16,6 +16,8 @@ public function __construct( } /** + * @param $userId + * @return User * @throws NotFoundException */ public function run($userId): User diff --git a/app/Containers/AppSection/User/Tasks/GetAllUsersTask.php b/app/Containers/AppSection/User/Tasks/GetAllUsersTask.php index 6a3db9ffb..4f1fd172e 100644 --- a/app/Containers/AppSection/User/Tasks/GetAllUsersTask.php +++ b/app/Containers/AppSection/User/Tasks/GetAllUsersTask.php @@ -4,10 +4,10 @@ use Apiato\Core\Exceptions\CoreInternalErrorException; use App\Containers\AppSection\User\Data\Repositories\UserRepository; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Prettus\Repository\Exceptions\RepositoryException; -class GetAllUsersTask extends Task +class GetAllUsersTask extends ParentTask { public function __construct( protected UserRepository $repository @@ -15,10 +15,11 @@ public function __construct( } /** + * @return mixed * @throws CoreInternalErrorException * @throws RepositoryException */ - public function run() + public function run(): mixed { return $this->addRequestCriteria()->repository->paginate(); } diff --git a/app/Containers/AppSection/User/Tasks/UpdateUserTask.php b/app/Containers/AppSection/User/Tasks/UpdateUserTask.php index 463d83a8d..bbd5e8160 100644 --- a/app/Containers/AppSection/User/Tasks/UpdateUserTask.php +++ b/app/Containers/AppSection/User/Tasks/UpdateUserTask.php @@ -6,12 +6,12 @@ use App\Containers\AppSection\User\Models\User; use App\Ship\Exceptions\NotFoundException; use App\Ship\Exceptions\UpdateResourceFailedException; -use App\Ship\Parents\Tasks\Task; +use App\Ship\Parents\Tasks\Task as ParentTask; use Exception; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Support\Facades\Hash; -class UpdateUserTask extends Task +class UpdateUserTask extends ParentTask { public function __construct( protected UserRepository $repository @@ -19,7 +19,11 @@ public function __construct( } /** - * @throws UpdateResourceFailedException|NotFoundException + * @param array $userData + * @param $userId + * @return User + * @throws NotFoundException + * @throws UpdateResourceFailedException */ public function run(array $userData, $userId): User { diff --git a/app/Containers/AppSection/User/UI/API/Controllers/DeleteUserController.php b/app/Containers/AppSection/User/UI/API/Controllers/DeleteUserController.php index 4ad3e2d2c..3dcbe1f82 100644 --- a/app/Containers/AppSection/User/UI/API/Controllers/DeleteUserController.php +++ b/app/Containers/AppSection/User/UI/API/Controllers/DeleteUserController.php @@ -12,6 +12,8 @@ class DeleteUserController extends ApiController { /** + * @param DeleteUserRequest $request + * @return JsonResponse * @throws DeleteResourceFailedException * @throws NotFoundException */ diff --git a/app/Containers/AppSection/User/UI/API/Controllers/FindUserByIdController.php b/app/Containers/AppSection/User/UI/API/Controllers/FindUserByIdController.php index 8c9b0c8a0..5c8792fe9 100644 --- a/app/Containers/AppSection/User/UI/API/Controllers/FindUserByIdController.php +++ b/app/Containers/AppSection/User/UI/API/Controllers/FindUserByIdController.php @@ -12,6 +12,8 @@ class FindUserByIdController extends ApiController { /** + * @param FindUserByIdRequest $request + * @return array * @throws InvalidTransformerException * @throws NotFoundException */ diff --git a/app/Containers/AppSection/User/UI/API/Controllers/GetAllUsersController.php b/app/Containers/AppSection/User/UI/API/Controllers/GetAllUsersController.php index 89767922c..a25e1f648 100644 --- a/app/Containers/AppSection/User/UI/API/Controllers/GetAllUsersController.php +++ b/app/Containers/AppSection/User/UI/API/Controllers/GetAllUsersController.php @@ -13,9 +13,11 @@ class GetAllUsersController extends ApiController { /** + * @param GetAllUsersRequest $request + * @return array + * @throws CoreInternalErrorException * @throws InvalidTransformerException * @throws RepositoryException - * @throws CoreInternalErrorException */ public function getAllUsers(GetAllUsersRequest $request): array { diff --git a/app/Containers/AppSection/User/UI/API/Requests/DeleteUserRequest.php b/app/Containers/AppSection/User/UI/API/Requests/DeleteUserRequest.php index 5dc000b8a..ba85f9ef6 100644 --- a/app/Containers/AppSection/User/UI/API/Requests/DeleteUserRequest.php +++ b/app/Containers/AppSection/User/UI/API/Requests/DeleteUserRequest.php @@ -2,10 +2,10 @@ namespace App\Containers\AppSection\User\UI\API\Requests; -use App\Ship\Parents\Requests\Request; use App\Containers\AppSection\Authorization\Traits\IsResourceOwnerTrait; +use App\Ship\Parents\Requests\Request as ParentRequest; -class DeleteUserRequest extends Request +class DeleteUserRequest extends ParentRequest { use IsResourceOwnerTrait; diff --git a/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php b/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php index 7d31ea01f..709187be2 100644 --- a/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php +++ b/app/Containers/AppSection/User/UI/API/Requests/FindUserByIdRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\User\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class FindUserByIdRequest extends Request +class FindUserByIdRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/User/UI/API/Requests/GetAllUsersRequest.php b/app/Containers/AppSection/User/UI/API/Requests/GetAllUsersRequest.php index b41fbc273..464c4600d 100644 --- a/app/Containers/AppSection/User/UI/API/Requests/GetAllUsersRequest.php +++ b/app/Containers/AppSection/User/UI/API/Requests/GetAllUsersRequest.php @@ -2,9 +2,9 @@ namespace App\Containers\AppSection\User\UI\API\Requests; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class GetAllUsersRequest extends Request +class GetAllUsersRequest extends ParentRequest { /** * Define which Roles and/or Permissions has access to this request. diff --git a/app/Containers/AppSection/User/UI/API/Requests/UpdateUserPasswordRequest.php b/app/Containers/AppSection/User/UI/API/Requests/UpdateUserPasswordRequest.php index 3d4e9e1ee..48d551283 100644 --- a/app/Containers/AppSection/User/UI/API/Requests/UpdateUserPasswordRequest.php +++ b/app/Containers/AppSection/User/UI/API/Requests/UpdateUserPasswordRequest.php @@ -4,10 +4,10 @@ use App\Containers\AppSection\Authorization\Traits\IsResourceOwnerTrait; use App\Containers\AppSection\User\Models\User; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; use Illuminate\Validation\Rule; -class UpdateUserPasswordRequest extends Request +class UpdateUserPasswordRequest extends ParentRequest { use IsResourceOwnerTrait; diff --git a/app/Containers/AppSection/User/UI/API/Requests/UpdateUserRequest.php b/app/Containers/AppSection/User/UI/API/Requests/UpdateUserRequest.php index 8913a1088..0e5ba7b99 100644 --- a/app/Containers/AppSection/User/UI/API/Requests/UpdateUserRequest.php +++ b/app/Containers/AppSection/User/UI/API/Requests/UpdateUserRequest.php @@ -3,9 +3,9 @@ namespace App\Containers\AppSection\User\UI\API\Requests; use App\Containers\AppSection\Authorization\Traits\IsResourceOwnerTrait; -use App\Ship\Parents\Requests\Request; +use App\Ship\Parents\Requests\Request as ParentRequest; -class UpdateUserRequest extends Request +class UpdateUserRequest extends ParentRequest { use IsResourceOwnerTrait; diff --git a/app/Containers/AppSection/User/UI/API/Transformers/UserTransformer.php b/app/Containers/AppSection/User/UI/API/Transformers/UserTransformer.php index d764514f2..5b7cee1d2 100644 --- a/app/Containers/AppSection/User/UI/API/Transformers/UserTransformer.php +++ b/app/Containers/AppSection/User/UI/API/Transformers/UserTransformer.php @@ -4,10 +4,10 @@ use App\Containers\AppSection\Authorization\UI\API\Transformers\RoleTransformer; use App\Containers\AppSection\User\Models\User; -use App\Ship\Parents\Transformers\Transformer; +use App\Ship\Parents\Transformers\Transformer as ParentTransformer; use League\Fractal\Resource\Collection; -class UserTransformer extends Transformer +class UserTransformer extends ParentTransformer { protected array $availableIncludes = [ 'roles', diff --git a/app/Containers/AppSection/User/UI/CLI/Commands/CreateAdminCommand.php b/app/Containers/AppSection/User/UI/CLI/Commands/CreateAdminCommand.php index c78fd70a6..3791a20c7 100644 --- a/app/Containers/AppSection/User/UI/CLI/Commands/CreateAdminCommand.php +++ b/app/Containers/AppSection/User/UI/CLI/Commands/CreateAdminCommand.php @@ -3,9 +3,9 @@ namespace App\Containers\AppSection\User\UI\CLI\Commands; use App\Containers\AppSection\User\Actions\CreateAdminAction; -use App\Ship\Parents\Commands\ConsoleCommand; +use App\Ship\Parents\Commands\ConsoleCommand as ParentConsoleCommand; -class CreateAdminCommand extends ConsoleCommand +class CreateAdminCommand extends ParentConsoleCommand { protected $signature = 'apiato:create:admin'; diff --git a/app/Ship/Commands/closures.php b/app/Ship/Commands/closures.php index 7813c802f..e05f4c9a1 100644 --- a/app/Ship/Commands/closures.php +++ b/app/Ship/Commands/closures.php @@ -14,6 +14,6 @@ | */ -//Artisan::command('inspire', function () { -// $this->comment(Inspiring::quote()); -//})->purpose('Display an inspiring quote'); +Artisan::command('inspire', function () { + $this->comment(Inspiring::quote()); +})->purpose('Display an inspiring quote'); diff --git a/app/Ship/Configs/apiato.php b/app/Ship/Configs/apiato.php index 38bd4849d..e6886f138 100644 --- a/app/Ship/Configs/apiato.php +++ b/app/Ship/Configs/apiato.php @@ -75,13 +75,13 @@ |-------------------------------------------------------------------------- | | Attempts per minutes. - | `attempts` the number of attempts per `expires` in minutes. + | `attempts` is the number of attempts per `expires` in minutes. | */ 'throttle' => [ - 'enabled' => env('API_RATE_LIMIT_ENABLED', true), - 'attempts' => env('API_RATE_LIMIT_ATTEMPTS', '30'), - 'expires' => env('API_RATE_LIMIT_EXPIRES', '1'), + 'enabled' => env('GLOBAL_API_RATE_LIMIT_ENABLED', true), + 'attempts' => env('GLOBAL_API_RATE_LIMIT_ATTEMPTS_PER_MIN', '30'), + 'expires' => env('GLOBAL_API_RATE_LIMIT_EXPIRES_IN_MIN', '1'), ], ], diff --git a/app/Ship/Exceptions/Handlers/ExceptionsHandler.php b/app/Ship/Exceptions/Handlers/ExceptionsHandler.php index e45393012..9a98d5698 100644 --- a/app/Ship/Exceptions/Handlers/ExceptionsHandler.php +++ b/app/Ship/Exceptions/Handlers/ExceptionsHandler.php @@ -7,8 +7,10 @@ use Apiato\Core\Exceptions\Handlers\ExceptionsHandler as CoreExceptionsHandler; use App\Ship\Exceptions\NotAuthorizedResourceException; use App\Ship\Exceptions\NotFoundException; +use App\Ship\Providers\RouteServiceProvider; use Illuminate\Auth\AuthenticationException as LaravelAuthenticationException; use Illuminate\Http\JsonResponse; +use Psr\Log\LogLevel; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -21,10 +23,19 @@ */ class ExceptionsHandler extends CoreExceptionsHandler { + /** + * A list of exception types with their corresponding custom log levels. + * + * @var array, LogLevel::*> + */ + protected $levels = [ + // + ]; + /** * A list of the exception types that are not reported. * - * @var array + * @var array> */ protected $dontReport = [ // @@ -33,7 +44,7 @@ class ExceptionsHandler extends CoreExceptionsHandler /** * A list of the inputs that are never flashed for validation exceptions. * - * @var array + * @var array */ protected $dontFlash = [ 'current_password', @@ -59,8 +70,10 @@ public function register(): void return $this->buildResponse(new NotFoundException()); }); - $this->renderable(function (AccessDeniedHttpException $e) { - return $this->buildResponse(new NotAuthorizedResourceException()); + $this->renderable(function (AccessDeniedHttpException $e, $request) { + return $this->shouldReturnJson($request, $e) + ? $this->buildResponse(new NotAuthorizedResourceException()) + : redirect()->guest(route(RouteServiceProvider::UNAUTHORIZED)); }); } @@ -85,8 +98,10 @@ private function buildResponse(CoreException $e): JsonResponse return response()->json($response, (int)$e->getCode()); } - protected function unauthenticated($request, LaravelAuthenticationException $exception): JsonResponse|Response + protected function unauthenticated($request, LaravelAuthenticationException $e): JsonResponse|Response { - return $this->buildResponse(new CoreAuthenticationException()); + return $this->shouldReturnJson($request, $e) + ? $this->buildResponse(new CoreAuthenticationException()) + : redirect()->guest(route(RouteServiceProvider::LOGIN)); } } diff --git a/app/Ship/Kernels/HttpKernel.php b/app/Ship/Kernels/HttpKernel.php index 01e88ca59..e0fb9bf00 100644 --- a/app/Ship/Kernels/HttpKernel.php +++ b/app/Ship/Kernels/HttpKernel.php @@ -11,7 +11,6 @@ use App\Ship\Middlewares\TrimStrings; use App\Ship\Middlewares\TrustProxies; use App\Ship\Middlewares\VerifyCsrfToken; -use Fruitcake\Cors\HandleCors; use Illuminate\Auth\Middleware\Authorize; use Illuminate\Auth\Middleware\EnsureEmailIsVerified; use Illuminate\Auth\Middleware\RequirePassword; @@ -19,6 +18,7 @@ use Illuminate\Foundation\Http\Kernel as LaravelHttpKernel; use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull; use Illuminate\Foundation\Http\Middleware\ValidatePostSize; +use Illuminate\Http\Middleware\HandleCors; use Illuminate\Http\Middleware\SetCacheHeaders; use Illuminate\Routing\Middleware\SubstituteBindings; use Illuminate\Routing\Middleware\ThrottleRequests; @@ -32,9 +32,9 @@ class HttpKernel extends LaravelHttpKernel /** * The application's global HTTP middleware stack. * - * These middlewares are run during every request to your application. + * These middleware are run during every request to your application. * - * @var array + * @var array */ protected $middleware = [ // Laravel middlewares @@ -50,14 +50,13 @@ class HttpKernel extends LaravelHttpKernel /** * The application's route middleware groups. * - * @var array + * @var array> */ protected $middlewareGroups = [ 'web' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, - AuthenticateSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, SubstituteBindings::class, @@ -65,6 +64,7 @@ class HttpKernel extends LaravelHttpKernel 'api' => [ // Note: The "throttle" Middleware is registered by the RoutesLoaderTrait in the Core + // 'throttle:api', SubstituteBindings::class, ValidateJsonContent::class, ProcessETagHeadersMiddleware::class, @@ -75,13 +75,14 @@ class HttpKernel extends LaravelHttpKernel /** * The application's route middleware. * - * These middlewares may be assigned to groups or used individually. + * These middleware may be assigned to groups or used individually. * - * @var array + * @var array */ protected $routeMiddleware = [ 'auth' => Authenticate::class, // 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth.session' => AuthenticateSession::class, 'cache.headers' => SetCacheHeaders::class, 'can' => Authorize::class, // Note: The "guest" middleware is registered by MiddlewareServiceProvider in Authentication Container diff --git a/app/Ship/Middlewares/EncryptCookies.php b/app/Ship/Middlewares/EncryptCookies.php index 65894af75..d7dfa2d57 100644 --- a/app/Ship/Middlewares/EncryptCookies.php +++ b/app/Ship/Middlewares/EncryptCookies.php @@ -9,7 +9,7 @@ class EncryptCookies extends Middleware /** * The names of the cookies that should not be encrypted. * - * @var array + * @var array */ protected $except = [ // diff --git a/app/Ship/Middlewares/PreventRequestsDuringMaintenance.php b/app/Ship/Middlewares/PreventRequestsDuringMaintenance.php index 792acebd7..7c53d920e 100644 --- a/app/Ship/Middlewares/PreventRequestsDuringMaintenance.php +++ b/app/Ship/Middlewares/PreventRequestsDuringMaintenance.php @@ -9,7 +9,7 @@ class PreventRequestsDuringMaintenance extends Middleware /** * The URIs that should be reachable while maintenance mode is enabled. * - * @var array + * @var array */ protected $except = [ // diff --git a/app/Ship/Middlewares/TrimStrings.php b/app/Ship/Middlewares/TrimStrings.php index c298fa18c..237ac1f14 100644 --- a/app/Ship/Middlewares/TrimStrings.php +++ b/app/Ship/Middlewares/TrimStrings.php @@ -9,7 +9,7 @@ class TrimStrings extends Middleware /** * The names of the attributes that should not be trimmed. * - * @var array + * @var array */ protected $except = [ 'current_password', diff --git a/app/Ship/Middlewares/TrustHosts.php b/app/Ship/Middlewares/TrustHosts.php index 3abccca52..6e62a2d7e 100644 --- a/app/Ship/Middlewares/TrustHosts.php +++ b/app/Ship/Middlewares/TrustHosts.php @@ -9,9 +9,9 @@ class TrustHosts extends Middleware /** * Get the host patterns that should be trusted. * - * @return array + * @return array */ - public function hosts(): array + public function hosts() { return [ $this->allSubdomainsOfApplicationUrl(), diff --git a/app/Ship/Middlewares/TrustProxies.php b/app/Ship/Middlewares/TrustProxies.php index bbaab5dda..1901c2efc 100644 --- a/app/Ship/Middlewares/TrustProxies.php +++ b/app/Ship/Middlewares/TrustProxies.php @@ -10,7 +10,7 @@ class TrustProxies extends Middleware /** * The trusted proxies for this application. * - * @var array|string|null + * @var array|string|null */ protected $proxies; diff --git a/app/Ship/Middlewares/VerifyCsrfToken.php b/app/Ship/Middlewares/VerifyCsrfToken.php index 9894f4fb6..1c671e6ab 100644 --- a/app/Ship/Middlewares/VerifyCsrfToken.php +++ b/app/Ship/Middlewares/VerifyCsrfToken.php @@ -9,7 +9,7 @@ class VerifyCsrfToken extends Middleware /** * The URIs that should be excluded from CSRF verification. * - * @var array + * @var array */ protected $except = [ // diff --git a/app/Ship/Migrations/2017_09_12_174826_create_notifications_table.php b/app/Ship/Migrations/2017_09_12_174826_create_notifications_table.php index 9aeefa9d8..6d7e70333 100644 --- a/app/Ship/Migrations/2017_09_12_174826_create_notifications_table.php +++ b/app/Ship/Migrations/2017_09_12_174826_create_notifications_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateNotificationsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -32,4 +32,4 @@ public function down(): void { Schema::dropIfExists('notifications'); } -} +}; diff --git a/app/Ship/Migrations/2019_08_19_000000_create_failed_jobs_table.php b/app/Ship/Migrations/2019_08_19_000000_create_failed_jobs_table.php index 6aa6d743e..17191986b 100644 --- a/app/Ship/Migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/app/Ship/Migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateFailedJobsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +33,4 @@ public function down() { Schema::dropIfExists('failed_jobs'); } -} +}; diff --git a/app/Ship/Migrations/2021_03_01_150940_create_jobs_table.php b/app/Ship/Migrations/2021_03_01_150940_create_jobs_table.php index c3460f974..104eee0c6 100644 --- a/app/Ship/Migrations/2021_03_01_150940_create_jobs_table.php +++ b/app/Ship/Migrations/2021_03_01_150940_create_jobs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateJobsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -22,9 +22,7 @@ public function up(): void $table->unsignedInteger('reserved_at')->nullable(); $table->unsignedInteger('available_at'); $table->unsignedInteger('created_at'); - $table->index(['queue', 'reserved_at']); - }); } } @@ -38,4 +36,4 @@ public function down(): void { Schema::dropIfExists('jobs'); } -} +}; diff --git a/app/Ship/Parents/Jobs/Job.php b/app/Ship/Parents/Jobs/Job.php index cd84aede2..aeed3ea24 100644 --- a/app/Ship/Parents/Jobs/Job.php +++ b/app/Ship/Parents/Jobs/Job.php @@ -9,8 +9,6 @@ * Class Job * * A.K.A. (app/Jobs/Job.php) - * - * @author Mahmoud Zalt */ abstract class Job extends AbstractJob implements ShouldQueue { diff --git a/app/Ship/Parents/Providers/EventServiceProvider.php b/app/Ship/Parents/Providers/EventServiceProvider.php index 926769116..990c0726f 100644 --- a/app/Ship/Parents/Providers/EventServiceProvider.php +++ b/app/Ship/Parents/Providers/EventServiceProvider.php @@ -14,7 +14,27 @@ abstract class EventServiceProvider extends AbstractEventServiceProvider /** * The event listener mappings for the application. * - * @var array + * @var array> */ protected $listen = []; + + /** + * Register any events for your application. + * + * @return void + */ + public function boot() + { + // + } + + /** + * Determine if events and listeners should be automatically discovered. + * + * @return bool + */ + public function shouldDiscoverEvents() + { + return false; + } } diff --git a/app/Ship/Parents/Providers/RouteServiceProvider.php b/app/Ship/Parents/Providers/RouteServiceProvider.php index 143fbea54..addab5b82 100644 --- a/app/Ship/Parents/Providers/RouteServiceProvider.php +++ b/app/Ship/Parents/Providers/RouteServiceProvider.php @@ -6,5 +6,19 @@ abstract class RouteServiceProvider extends AbstractRouteServiceProvider { + public function boot(): void + { + $this->configureRateLimiting(); + parent::boot(); + } + + /** + * Configure the rate limiters for the application. + * + * @return void + */ + protected function configureRateLimiting(): void + { + } } diff --git a/app/Ship/Providers/RouteServiceProvider.php b/app/Ship/Providers/RouteServiceProvider.php index c5eaeaaba..04acfeaf0 100644 --- a/app/Ship/Providers/RouteServiceProvider.php +++ b/app/Ship/Providers/RouteServiceProvider.php @@ -23,4 +23,13 @@ class RouteServiceProvider extends ParentRouteServiceProvider * @var string */ public const LOGIN = 'login'; + + /** + * The name of the web "unauthorized" route for your application. + * + * This is used by Apiato authentication to redirect users if unauthorized. + * + * @var string + */ + public const UNAUTHORIZED = 'unauthorized'; } diff --git a/app/Ship/composer.json b/app/Ship/composer.json index 920244a01..db0afbf72 100644 --- a/app/Ship/composer.json +++ b/app/Ship/composer.json @@ -2,14 +2,14 @@ "name": "apiato/ship", "description": "Apiato Ship folder where shared functionality resides", "require": { - "apiato/core": "dev-master", - "apiato/documentation-generator-container": "^2.0.4", - "apiato/welcome-container": "^1.0.0" + "apiato/core": "^7.0.0", + "apiato/documentation-generator-container": "^2.7.0", + "apiato/welcome-container": "^2.0.1" }, "require-dev": { "roave/security-advisories": "dev-latest", - "barryvdh/laravel-ide-helper": "^2.9.0", - "barryvdh/laravel-debugbar": "^3.6.2" + "barryvdh/laravel-ide-helper": "^2.12.3", + "barryvdh/laravel-debugbar": "^3.6.7" }, "scripts": { "post-update-cmd": [ diff --git a/artisan b/artisan index 5c23e2e24..67a3329b1 100644 --- a/artisan +++ b/artisan @@ -11,7 +11,7 @@ define('LARAVEL_START', microtime(true)); | Composer provides a convenient, automatically generated class loader | for our application. We just need to utilize it! We'll require it | into the script here so that we do not have to worry about the -| loading of any our classes "manually". Feels great to relax. +| loading of any of our classes manually. It's great to relax. | */ diff --git a/composer.json b/composer.json index 0e64b59f7..a764c5c20 100644 --- a/composer.json +++ b/composer.json @@ -1,17 +1,7 @@ { "name": "apiato/apiato", + "type": "project", "description": "A flawless framework for building scalable and testable API-Centric Apps with PHP and Laravel.", - "homepage": "http://apiato.io/", - "support": { - "issues": "https://github.com/apiato/apiato/issues", - "source": "https://github.com/apiato/apiato" - }, - "authors": [ - { - "name": "Mahmoud Zalt", - "email": "mahmoud@zalt.me" - } - ], "keywords": [ "Apiato", "API", @@ -26,33 +16,44 @@ "Porto SAP" ], "license": "MIT", - "type": "project", + "homepage": "http://apiato.io/", + "support": { + "issues": "https://github.com/apiato/apiato/issues", + "source": "https://github.com/apiato/apiato" + }, + "authors": [ + { + "name": "Mahmoud Zalt", + "email": "mahmoud@zalt.me" + } + ], "require": { - "php": "^8.0", + "php": "^8.0.2", "ext-curl": "*", + "ext-gettext": "*", "ext-mbstring": "*", "ext-openssl": "*", "ext-pdo": "*", "ext-sodium": "*", "ext-tokenizer": "*", - "ext-gettext": "*", - "fruitcake/laravel-cors": "^2.0.4", - "guzzlehttp/guzzle": "^7.3.0", - "laravel/framework": "^8.61.0", - "laravel/tinker": "^2.6.1", + "guzzlehttp/guzzle": "^7.2", + "laravel/framework": "^9.2", + "laravel/tinker": "^2.7", + "lcobucci/clock": "2.1.0", "wikimedia/composer-merge-plugin": "^2.0.1" }, "require-dev": { "ext-intl": "*", "ext-json": "*", - "facade/ignition": "^2.13.1", - "fakerphp/faker": "^1.16.0", - "friendsofphp/php-cs-fixer": "^3.1.0", - "mockery/mockery": "^1.4.4", - "nunomaduro/collision": "^5.9.0", - "phpunit/phpunit": "^9.5.9", + "friendsofphp/php-cs-fixer": "^3.8.0", "roave/security-advisories": "dev-latest", - "vimeo/psalm": "^4.10" + "fakerphp/faker": "^1.19.1", + "laravel/sail": "^1.13.10", + "mockery/mockery": "^1.4.4", + "nunomaduro/collision": "^6.1", + "phpunit/phpunit": "^9.5.10", + "spatie/laravel-ignition": "^1.0", + "vimeo/psalm": "^4.22.0" }, "autoload": { "psr-4": { @@ -64,6 +65,21 @@ "autoload-dev": { "psr-4": {} }, + "scripts": { + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover --ansi" + ], + "post-update-cmd": [ + "@php artisan vendor:publish --tag=laravel-assets --ansi --force" + ], + "post-root-package-install": [ + "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "@php artisan key:generate --ansi" + ] + }, "extra": { "laravel": { "dont-discover": [] @@ -81,18 +97,6 @@ "merge-scripts": true } }, - "scripts": { - "post-autoload-dump": [ - "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", - "@php artisan package:discover --ansi" - ], - "post-root-package-install": [ - "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" - ], - "post-create-project-cmd": [ - "@php artisan key:generate --ansi" - ] - }, "config": { "optimize-autoloader": true, "preferred-install": "dist", diff --git a/composer.lock b/composer.lock index 5757824bc..3066d94c6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "78b0568e887ce23cb0c3f6eee876c3b8", + "content-hash": "a884f92c34a4f344c7d5bb9e2fee1347", "packages": [ { "name": "apiato/container-installer", @@ -45,35 +45,35 @@ }, { "name": "apiato/core", - "version": "dev-master", + "version": "v7.0.1", "source": { "type": "git", "url": "https://github.com/apiato/core.git", - "reference": "8a4d59339b18f738e2b7e7dd2d6e76c1cbc93a6c" + "reference": "5ea0621f26b2a61aa152a24d6add7fc6b471373e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/apiato/core/zipball/8a4d59339b18f738e2b7e7dd2d6e76c1cbc93a6c", - "reference": "8a4d59339b18f738e2b7e7dd2d6e76c1cbc93a6c", + "url": "https://api.github.com/repos/apiato/core/zipball/5ea0621f26b2a61aa152a24d6add7fc6b471373e", + "reference": "5ea0621f26b2a61aa152a24d6add7fc6b471373e", "shasum": "" }, "require": { "apiato/container-installer": "^2.0.8", "ext-gettext": "*", "ext-json": "*", - "guzzlehttp/guzzle": "^7.4.1", - "laravel/framework": "^8.77.0", - "laravel/passport": "^10.2.2", - "php": "^8.0", - "prettus/l5-repository": "^2.7.9", - "spatie/laravel-fractal": "^5.8.1", - "vinkla/hashids": "^9.1.0" + "guzzlehttp/guzzle": "^7.2", + "laravel/framework": "^9.0", + "laravel/passport": "^10.3.0", + "php": "^8.0.2", + "prettus/l5-repository": "^2.8.0", + "spatie/laravel-fractal": "^6.0", + "vinkla/hashids": "^10.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.4.0", - "mockery/mockery": "^1.4.2", + "friendsofphp/php-cs-fixer": "^3.8.0", + "mockery/mockery": "^1.4.4", "roave/security-advisories": "dev-latest", - "vimeo/psalm": "^4.15.0" + "vimeo/psalm": "^4.22.0" }, "type": "library", "extra": { @@ -122,25 +122,24 @@ "issues": "https://github.com/apiato/core/issues", "source": "https://github.com/apiato/core" }, - "time": "2022-04-21T11:59:19+00:00" + "time": "2022-04-27T17:14:14+00:00" }, { "name": "apiato/documentation-generator-container", - "version": "v2.3.0", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/apiato/documentation-generator-container.git", - "reference": "f2c18c7badfa032218ab084093ae1b69dd021b1e" + "reference": "0cb0371f86002b549e36f2ccf1b243d36d85d740" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/apiato/documentation-generator-container/zipball/f2c18c7badfa032218ab084093ae1b69dd021b1e", - "reference": "f2c18c7badfa032218ab084093ae1b69dd021b1e", + "url": "https://api.github.com/repos/apiato/documentation-generator-container/zipball/0cb0371f86002b549e36f2ccf1b243d36d85d740", + "reference": "0cb0371f86002b549e36f2ccf1b243d36d85d740", "shasum": "" }, "require-dev": { - "apiato/core": "dev-master", - "orchestra/testbench": "^6.21" + "apiato/core": "^v7.0.0" }, "type": "apiato-container", "extra": { @@ -162,22 +161,22 @@ "description": "An Apiato container which can creates a documentation from API annotations in your source code.", "support": { "issues": "https://github.com/apiato/documentation-generator-container/issues", - "source": "https://github.com/apiato/documentation-generator-container/tree/v2.3.0" + "source": "https://github.com/apiato/documentation-generator-container/tree/v2.7.0" }, - "time": "2022-01-21T17:23:52+00:00" + "time": "2022-04-27T16:19:46+00:00" }, { "name": "apiato/welcome-container", - "version": "v1.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/apiato/welcome-container.git", - "reference": "ca7b1d265f137700840b75a18020093cee5d2ff1" + "reference": "68a73c7a8603db49ee81856233fb8d12f8ebb86d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/apiato/welcome-container/zipball/ca7b1d265f137700840b75a18020093cee5d2ff1", - "reference": "ca7b1d265f137700840b75a18020093cee5d2ff1", + "url": "https://api.github.com/repos/apiato/welcome-container/zipball/68a73c7a8603db49ee81856233fb8d12f8ebb86d", + "reference": "68a73c7a8603db49ee81856233fb8d12f8ebb86d", "shasum": "" }, "type": "apiato-container", @@ -195,65 +194,9 @@ "description": "An Apiato container which welcomes the user in different languages! And it is also an example of a container extracted using container installer!", "support": { "issues": "https://github.com/apiato/welcome-container/issues", - "source": "https://github.com/apiato/welcome-container/tree/v1.0.0" - }, - "time": "2021-04-25T14:28:36+00:00" - }, - { - "name": "asm89/stack-cors", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/asm89/stack-cors.git", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0", - "symfony/http-foundation": "^4|^5|^6", - "symfony/http-kernel": "^4|^5|^6" - }, - "require-dev": { - "phpunit/phpunit": "^7|^9", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "psr-4": { - "Asm89\\Stack\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Alexander", - "email": "iam.asm89@gmail.com" - } - ], - "description": "Cross-origin resource sharing library and stack middleware", - "homepage": "https://github.com/asm89/stack-cors", - "keywords": [ - "cors", - "stack" - ], - "support": { - "issues": "https://github.com/asm89/stack-cors/issues", - "source": "https://github.com/asm89/stack-cors/tree/v2.1.1" + "source": "https://github.com/apiato/welcome-container/tree/v2.0.1" }, - "time": "2022-01-18T09:12:03+00:00" + "time": "2022-04-22T17:14:03+00:00" }, { "name": "brick/math", @@ -686,27 +629,27 @@ }, { "name": "egulias/email-validator", - "version": "2.1.25", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" + "reference": "ee0db30118f661fb166bcffbf5d82032df484697" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", - "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", + "reference": "ee0db30118f661fb166bcffbf5d82032df484697", "shasum": "" }, "require": { - "doctrine/lexer": "^1.0.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.10" + "doctrine/lexer": "^1.2", + "php": ">=7.2", + "symfony/polyfill-intl-idn": "^1.15" }, "require-dev": { - "dominicsayers/isemail": "^3.0.7", - "phpunit/phpunit": "^4.8.36|^7.5.15", - "satooshi/php-coveralls": "^1.0.1" + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -714,7 +657,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -742,7 +685,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/2.1.25" + "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" }, "funding": [ { @@ -750,20 +693,20 @@ "type": "github" } ], - "time": "2020-12-29T14:50:06+00:00" + "time": "2021-10-11T09:18:27+00:00" }, { "name": "firebase/php-jwt", - "version": "v6.1.1", + "version": "v6.1.2", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "e67638d067a537731e3f9c03e097c7c1b1f31fe8" + "reference": "c297139da7c6873dbd67cbd1093f09ec0bbd0c50" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/e67638d067a537731e3f9c03e097c7c1b1f31fe8", - "reference": "e67638d067a537731e3f9c03e097c7c1b1f31fe8", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/c297139da7c6873dbd67cbd1093f09ec0bbd0c50", + "reference": "c297139da7c6873dbd67cbd1093f09ec0bbd0c50", "shasum": "" }, "require": { @@ -805,45 +748,37 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.1.1" + "source": "https://github.com/firebase/php-jwt/tree/v6.1.2" }, - "time": "2022-04-13T23:27:14+00:00" + "time": "2022-04-21T14:37:18+00:00" }, { - "name": "fruitcake/laravel-cors", - "version": "v2.2.0", + "name": "fruitcake/php-cors", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/fruitcake/laravel-cors.git", - "reference": "783a74f5e3431d7b9805be8afb60fd0a8f743534" + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/783a74f5e3431d7b9805be8afb60fd0a8f743534", - "reference": "783a74f5e3431d7b9805be8afb60fd0a8f743534", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", "shasum": "" }, "require": { - "asm89/stack-cors": "^2.0.1", - "illuminate/contracts": "^6|^7|^8|^9", - "illuminate/support": "^6|^7|^8|^9", - "php": ">=7.2" + "php": "^7.4|^8.0", + "symfony/http-foundation": "^4.4|^5.4|^6" }, "require-dev": { - "laravel/framework": "^6|^7.24|^8", - "orchestra/testbench-dusk": "^4|^5|^6|^7", - "phpunit/phpunit": "^6|^7|^8|^9", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" - }, - "laravel": { - "providers": [ - "Fruitcake\\Cors\\CorsServiceProvider" - ] + "dev-main": "1.1-dev" } }, "autoload": { @@ -861,20 +796,20 @@ "homepage": "https://fruitcake.nl" }, { - "name": "Barry vd. Heuvel", + "name": "Barryvdh", "email": "barryvdh@gmail.com" } ], - "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application", + "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", + "homepage": "https://github.com/fruitcake/php-cors", "keywords": [ - "api", "cors", - "crossdomain", - "laravel" + "laravel", + "symfony" ], "support": { - "issues": "https://github.com/fruitcake/laravel-cors/issues", - "source": "https://github.com/fruitcake/laravel-cors/tree/v2.2.0" + "issues": "https://github.com/fruitcake/php-cors/issues", + "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" }, "funding": [ { @@ -886,7 +821,7 @@ "type": "github" } ], - "time": "2022-02-23T14:25:13+00:00" + "time": "2022-02-20T15:07:15+00:00" }, { "name": "graham-campbell/manager", @@ -1415,56 +1350,55 @@ }, { "name": "laravel/framework", - "version": "v8.83.9", + "version": "v9.10.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ac6e16bb56510eda2e373c6365d5c92da3fd559d" + "reference": "ef2a61ad1e6f1b7ce613675217e25a51c821f826" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/ac6e16bb56510eda2e373c6365d5c92da3fd559d", - "reference": "ac6e16bb56510eda2e373c6365d5c92da3fd559d", + "url": "https://api.github.com/repos/laravel/framework/zipball/ef2a61ad1e6f1b7ce613675217e25a51c821f826", + "reference": "ef2a61ad1e6f1b7ce613675217e25a51c821f826", "shasum": "" }, "require": { - "doctrine/inflector": "^1.4|^2.0", - "dragonmantank/cron-expression": "^3.0.2", - "egulias/email-validator": "^2.1.10", - "ext-json": "*", + "doctrine/inflector": "^2.0", + "dragonmantank/cron-expression": "^3.1", + "egulias/email-validator": "^3.1", "ext-mbstring": "*", "ext-openssl": "*", + "fruitcake/php-cors": "^1.2", "laravel/serializable-closure": "^1.0", - "league/commonmark": "^1.3|^2.0.2", - "league/flysystem": "^1.1", + "league/commonmark": "^2.2", + "league/flysystem": "^3.0", "monolog/monolog": "^2.0", "nesbot/carbon": "^2.53.1", - "opis/closure": "^3.6", - "php": "^7.3|^8.0", - "psr/container": "^1.0", - "psr/log": "^1.0|^2.0", - "psr/simple-cache": "^1.0", + "php": "^8.0.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.2.2", - "swiftmailer/swiftmailer": "^6.3", - "symfony/console": "^5.4", - "symfony/error-handler": "^5.4", - "symfony/finder": "^5.4", - "symfony/http-foundation": "^5.4", - "symfony/http-kernel": "^5.4", - "symfony/mime": "^5.4", - "symfony/process": "^5.4", - "symfony/routing": "^5.4", - "symfony/var-dumper": "^5.4", + "symfony/console": "^6.0", + "symfony/error-handler": "^6.0", + "symfony/finder": "^6.0", + "symfony/http-foundation": "^6.0", + "symfony/http-kernel": "^6.0", + "symfony/mailer": "^6.0", + "symfony/mime": "^6.0", + "symfony/process": "^6.0", + "symfony/routing": "^6.0", + "symfony/var-dumper": "^6.0", "tijsverkoyen/css-to-inline-styles": "^2.2.2", "vlucas/phpdotenv": "^5.4.1", - "voku/portable-ascii": "^1.6.1" + "voku/portable-ascii": "^2.0" }, "conflict": { "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.0", - "psr/simple-cache-implementation": "1.0" + "psr/container-implementation": "1.1|2.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" }, "replace": { "illuminate/auth": "self.version", @@ -1472,6 +1406,7 @@ "illuminate/bus": "self.version", "illuminate/cache": "self.version", "illuminate/collections": "self.version", + "illuminate/conditionable": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", @@ -1502,19 +1437,22 @@ "require-dev": { "aws/aws-sdk-php": "^3.198.1", "doctrine/dbal": "^2.13.3|^3.1.4", - "filp/whoops": "^2.14.3", - "guzzlehttp/guzzle": "^6.5.5|^7.0.1", - "league/flysystem-cached-adapter": "^1.0", + "fakerphp/faker": "^1.9.2", + "guzzlehttp/guzzle": "^7.2", + "league/flysystem-aws-s3-v3": "^3.0", + "league/flysystem-ftp": "^3.0", + "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.4.4", - "orchestra/testbench-core": "^6.27", + "orchestra/testbench-core": "^7.1", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.5.19|^9.5.8", + "phpstan/phpstan": "^1.4.7", + "phpunit/phpunit": "^9.5.8", "predis/predis": "^1.1.9", - "symfony/cache": "^5.4" + "symfony/cache": "^6.0" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.198.1).", "brianium/paratest": "Required to run tests in parallel (^6.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", "ext-bcmath": "Required to use the multiple_of validation rule.", @@ -1526,27 +1464,29 @@ "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", - "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", + "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.2).", "laravel/tinker": "Required to use the tinker console command (^2.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", - "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.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-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", + "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", "predis/predis": "Required to use the predis connector (^1.1.9).", "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 (^4.0|^5.0|^6.0|^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.4).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", - "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^6.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" } }, "autoload": { @@ -1560,7 +1500,8 @@ "Illuminate\\": "src/Illuminate/", "Illuminate\\Support\\": [ "src/Illuminate/Macroable/", - "src/Illuminate/Collections/" + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/" ] } }, @@ -1584,7 +1525,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-04-19T15:01:38+00:00" + "time": "2022-04-27T14:07:25+00:00" }, { "name": "laravel/passport", @@ -1792,24 +1733,23 @@ }, { "name": "lcobucci/clock", - "version": "2.2.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/lcobucci/clock.git", - "reference": "fb533e093fd61321bfcbac08b131ce805fe183d3" + "reference": "903513d28e85376a33385ebc601afd2ee69e5653" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/clock/zipball/fb533e093fd61321bfcbac08b131ce805fe183d3", - "reference": "fb533e093fd61321bfcbac08b131ce805fe183d3", + "url": "https://api.github.com/repos/lcobucci/clock/zipball/903513d28e85376a33385ebc601afd2ee69e5653", + "reference": "903513d28e85376a33385ebc601afd2ee69e5653", "shasum": "" }, "require": { - "php": "^8.0", - "stella-maris/clock": "^0.1.4" + "php": "^8.0" }, "require-dev": { - "infection/infection": "^0.26", + "infection/infection": "^0.25", "lcobucci/coding-standard": "^8.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^0.12", @@ -1837,7 +1777,7 @@ "description": "Yet another clock abstraction", "support": { "issues": "https://github.com/lcobucci/clock/issues", - "source": "https://github.com/lcobucci/clock/tree/2.2.0" + "source": "https://github.com/lcobucci/clock/tree/2.1.0" }, "funding": [ { @@ -1849,7 +1789,7 @@ "type": "patreon" } ], - "time": "2022-04-19T19:34:17+00:00" + "time": "2021-10-31T21:32:07+00:00" }, { "name": "lcobucci/jwt", @@ -2169,54 +2109,48 @@ }, { "name": "league/flysystem", - "version": "1.1.9", + "version": "3.0.18", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + "reference": "c8e137e594948240b03372e012344b07c61b9193" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/c8e137e594948240b03372e012344b07c61b9193", + "reference": "c8e137e594948240b03372e012344b07c61b9193", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "league/mime-type-detection": "^1.3", - "php": "^7.2.5 || ^8.0" + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" }, "conflict": { - "league/flysystem-sftp": "<1.0.6" + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "symfony/http-client": "<5.2" }, "require-dev": { - "phpspec/prophecy": "^1.11.1", - "phpunit/phpunit": "^8.5.8" - }, - "suggest": { - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + "async-aws/s3": "^1.5", + "async-aws/simple-s3": "^1.0", + "aws/aws-sdk-php": "^3.198.1", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "microsoft/azure-storage-blob": "^1.1", + "phpseclib/phpseclib": "^2.0", + "phpstan/phpstan": "^0.12.26", + "phpunit/phpunit": "^9.5.11", + "sabre/dav": "^4.3.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { - "League\\Flysystem\\": "src/" + "League\\Flysystem\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2226,40 +2160,42 @@ "authors": [ { "name": "Frank de Jonge", - "email": "info@frenky.net" + "email": "info@frankdejonge.nl" } ], - "description": "Filesystem abstraction: Many filesystems, one API.", + "description": "File storage abstraction for PHP", "keywords": [ - "Cloud Files", "WebDAV", - "abstraction", "aws", "cloud", - "copy.com", - "dropbox", - "file systems", + "file", "files", "filesystem", "filesystems", "ftp", - "rackspace", - "remote", "s3", "sftp", "storage" ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.9" + "source": "https://github.com/thephpleague/flysystem/tree/3.0.18" }, "funding": [ { "url": "https://offset.earth/frankdejonge", - "type": "other" + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" } ], - "time": "2021-12-09T09:40:50+00:00" + "time": "2022-04-25T18:55:04+00:00" }, { "name": "league/fractal", @@ -3117,71 +3053,6 @@ ], "time": "2022-02-02T18:37:57+00:00" }, - { - "name": "opis/closure", - "version": "3.6.3", - "source": { - "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad", - "shasum": "" - }, - "require": { - "php": "^5.4 || ^7.0 || ^8.0" - }, - "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6.x-dev" - } - }, - "autoload": { - "files": [ - "functions.php" - ], - "psr-4": { - "Opis\\Closure\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" - } - ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", - "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" - ], - "support": { - "issues": "https://github.com/opis/closure/issues", - "source": "https://github.com/opis/closure/tree/3.6.3" - }, - "time": "2022-01-27T09:35:39+00:00" - }, { "name": "paragonie/constant_time_encoding", "version": "v2.5.0", @@ -3658,22 +3529,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -3700,9 +3576,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -3916,16 +3792,16 @@ }, { "name": "psr/log", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/ef29f6d262798707a9edd554e2b82517ef3a9376", - "reference": "ef29f6d262798707a9edd554e2b82517ef3a9376", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { @@ -3934,7 +3810,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { @@ -3960,31 +3836,31 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/2.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-07-14T16:41:46+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "psr/simple-cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -3999,7 +3875,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -4011,9 +3887,9 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, - "time": "2017-10-23T01:57:42+00:00" + "time": "2021-10-29T13:26:27+00:00" }, { "name": "psy/psysh", @@ -4373,27 +4249,28 @@ }, { "name": "spatie/laravel-fractal", - "version": "5.8.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-fractal.git", - "reference": "be3ccd54e26742cd05b3637fb732fd9addfa28df" + "reference": "1e6b8114389fe8e55eec3a841db02c404458f869" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-fractal/zipball/be3ccd54e26742cd05b3637fb732fd9addfa28df", - "reference": "be3ccd54e26742cd05b3637fb732fd9addfa28df", + "url": "https://api.github.com/repos/spatie/laravel-fractal/zipball/1e6b8114389fe8e55eec3a841db02c404458f869", + "reference": "1e6b8114389fe8e55eec3a841db02c404458f869", "shasum": "" }, "require": { - "illuminate/contracts": "^7.0|^8.0", - "illuminate/support": "^7.0|^8.0", - "php": "^7.2|^8.0", - "spatie/fractalistic": "^2.5" + "illuminate/contracts": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^8.0", + "spatie/fractalistic": "^2.5", + "spatie/laravel-package-tools": "^1.11" }, "require-dev": { "ext-json": "*", - "orchestra/testbench": "^5.0|^6.0" + "orchestra/testbench": "^7.0" }, "type": "library", "extra": { @@ -4402,7 +4279,7 @@ "Spatie\\Fractal\\FractalServiceProvider" ], "aliases": { - "Fractal": "Spatie\\Fractal\\FractalFacade" + "Fractal": "Spatie\\Fractal\\Facades\\Fractal" } } }, @@ -4439,7 +4316,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-fractal/issues", - "source": "https://github.com/spatie/laravel-fractal/tree/5.8.1" + "source": "https://github.com/spatie/laravel-fractal/tree/6.0.2" }, "funding": [ { @@ -4447,48 +4324,36 @@ "type": "custom" } ], - "time": "2020-11-12T18:46:53+00:00" + "time": "2022-04-04T07:53:13+00:00" }, { - "name": "spatie/laravel-permission", - "version": "4.4.3", + "name": "spatie/laravel-package-tools", + "version": "1.11.3", "source": { "type": "git", - "url": "https://github.com/spatie/laravel-permission.git", - "reference": "779797a47689d0bc1666e26f566cca44603e56fa" + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "baeb3df0ebb3a541394fdaf8cbe6115bf4034a59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/779797a47689d0bc1666e26f566cca44603e56fa", - "reference": "779797a47689d0bc1666e26f566cca44603e56fa", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/baeb3df0ebb3a541394fdaf8cbe6115bf4034a59", + "reference": "baeb3df0ebb3a541394fdaf8cbe6115bf4034a59", "shasum": "" }, "require": { - "illuminate/auth": "^6.0|^7.0|^8.0", - "illuminate/container": "^6.0|^7.0|^8.0", - "illuminate/contracts": "^6.0|^7.0|^8.0", - "illuminate/database": "^6.0|^7.0|^8.0", - "php": "^7.2.5|^8.0" + "illuminate/contracts": "^7.0|^8.0|^9.0", + "php": "^7.4|^8.0" }, "require-dev": { - "orchestra/testbench": "^4.0|^5.0|^6.0", - "phpunit/phpunit": "^8.0|^9.0", - "predis/predis": "^1.1" + "mockery/mockery": "^1.4", + "orchestra/testbench": "^5.0|^6.23|^7.0", + "phpunit/phpunit": "^9.4", + "spatie/test-time": "^1.2" }, "type": "library", - "extra": { - "laravel": { - "providers": [ - "Spatie\\Permission\\PermissionServiceProvider" - ] - } - }, "autoload": { - "files": [ - "src/helpers.php" - ], "psr-4": { - "Spatie\\Permission\\": "src" + "Spatie\\LaravelPackageTools\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4499,25 +4364,18 @@ { "name": "Freek Van der Herten", "email": "freek@spatie.be", - "homepage": "https://spatie.be", "role": "Developer" } ], - "description": "Permission handling for Laravel 6.0 and up", - "homepage": "https://github.com/spatie/laravel-permission", + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", "keywords": [ - "acl", - "laravel", - "permission", - "permissions", - "rbac", - "roles", - "security", + "laravel-package-tools", "spatie" ], "support": { - "issues": "https://github.com/spatie/laravel-permission/issues", - "source": "https://github.com/spatie/laravel-permission/tree/4.4.3" + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.11.3" }, "funding": [ { @@ -4525,93 +4383,53 @@ "type": "github" } ], - "time": "2021-10-28T07:33:49+00:00" - }, - { - "name": "stella-maris/clock", - "version": "0.1.4", - "source": { - "type": "git", - "url": "https://gitlab.com/stella-maris/clock.git", - "reference": "8a0a967896df4c63417385dc69328a0aec84d9cf" - }, - "dist": { - "type": "zip", - "url": "https://gitlab.com/api/v4/projects/stella-maris%2Fclock/repository/archive.zip?sha=8a0a967896df4c63417385dc69328a0aec84d9cf", - "reference": "8a0a967896df4c63417385dc69328a0aec84d9cf", - "shasum": "" - }, - "require": { - "php": "^7.0|^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "StellaMaris\\Clock\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Heigl", - "role": "Maintainer" - } - ], - "description": "A pre-release of the proposed PSR-20 Clock-Interface", - "homepage": "https://gitlab.com/stella-maris/clock", - "keywords": [ - "clock", - "datetime", - "point in time", - "psr20" - ], - "support": { - "issues": "https://gitlab.com/stella-maris/clock/-/issues", - "source": "https://gitlab.com/stella-maris/clock/-/tree/0.1.4" - }, - "time": "2022-04-17T14:12:26+00:00" + "time": "2022-03-15T20:01:36+00:00" }, { - "name": "swiftmailer/swiftmailer", - "version": "v6.3.0", + "name": "spatie/laravel-permission", + "version": "5.5.2", "source": { "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" + "url": "https://github.com/spatie/laravel-permission.git", + "reference": "eb838cd2c539d1c97f8c997e67479cb68c2d0e36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", + "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/eb838cd2c539d1c97f8c997e67479cb68c2d0e36", + "reference": "eb838cd2c539d1c97f8c997e67479cb68c2d0e36", "shasum": "" }, "require": { - "egulias/email-validator": "^2.0|^3.1", - "php": ">=7.0.0", - "symfony/polyfill-iconv": "^1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "illuminate/auth": "^7.0|^8.0|^9.0", + "illuminate/container": "^7.0|^8.0|^9.0", + "illuminate/contracts": "^7.0|^8.0|^9.0", + "illuminate/database": "^7.0|^8.0|^9.0", + "php": "^7.3|^8.0|^8.1" }, "require-dev": { - "mockery/mockery": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.4" - }, - "suggest": { - "ext-intl": "Needed to support internationalized email addresses" + "orchestra/testbench": "^5.0|^6.0|^7.0", + "phpunit/phpunit": "^9.4", + "predis/predis": "^1.1" }, "type": "library", "extra": { + "laravel": { + "providers": [ + "Spatie\\Permission\\PermissionServiceProvider" + ] + }, "branch-alias": { - "dev-master": "6.2-dev" + "dev-main": "5.x-dev", + "dev-master": "5.x-dev" } }, "autoload": { "files": [ - "lib/swift_required.php" - ] + "src/helpers.php" + ], + "psr-4": { + "Spatie\\Permission\\": "src" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4619,79 +4437,74 @@ ], "authors": [ { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" } ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", + "description": "Permission handling for Laravel 6.0 and up", + "homepage": "https://github.com/spatie/laravel-permission", "keywords": [ - "email", - "mail", - "mailer" + "acl", + "laravel", + "permission", + "permissions", + "rbac", + "roles", + "security", + "spatie" ], "support": { - "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" + "issues": "https://github.com/spatie/laravel-permission/issues", + "source": "https://github.com/spatie/laravel-permission/tree/5.5.2" }, "funding": [ { - "url": "https://github.com/fabpot", + "url": "https://github.com/spatie", "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", - "type": "tidelift" } ], - "abandoned": "symfony/mailer", - "time": "2021-10-18T15:26:12+00:00" + "time": "2022-03-09T10:21:20+00:00" }, { "name": "symfony/console", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6" + "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/900275254f0a1a2afff1ab0e11abd5587a10e1d6", - "reference": "900275254f0a1a2afff1ab0e11abd5587a10e1d6", + "url": "https://api.github.com/repos/symfony/console/zipball/70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", + "reference": "70dcf7b2ca2ea08ad6ebcc475f104a024fb5632e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -4731,7 +4544,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.7" + "source": "https://github.com/symfony/console/tree/v6.0.7" }, "funding": [ { @@ -4747,7 +4560,7 @@ "type": "tidelift" } ], - "time": "2022-03-31T17:09:19+00:00" + "time": "2022-03-31T17:18:25+00:00" }, { "name": "symfony/css-selector", @@ -4883,27 +4696,27 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "060bc01856a1846e3e4385261bc9ed11a1dd7b6a" + "reference": "e600c54e5b30555eecea3ffe4314e58f832e78ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/060bc01856a1846e3e4385261bc9ed11a1dd7b6a", - "reference": "060bc01856a1846e3e4385261bc9ed11a1dd7b6a", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/e600c54e5b30555eecea3ffe4314e58f832e78ee", + "reference": "e600c54e5b30555eecea3ffe4314e58f832e78ee", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "symfony/var-dumper": "^5.4|^6.0" }, "require-dev": { "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -4934,7 +4747,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/v5.4.7" + "source": "https://github.com/symfony/error-handler/tree/v6.0.7" }, "funding": [ { @@ -4950,7 +4763,7 @@ "type": "tidelift" } ], - "time": "2022-03-18T16:21:29+00:00" + "time": "2022-03-18T16:21:55+00:00" }, { "name": "symfony/event-dispatcher", @@ -5116,22 +4929,20 @@ }, { "name": "symfony/finder", - "version": "v5.4.3", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d" + "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/231313534dded84c7ecaa79d14bc5da4ccb69b7d", - "reference": "231313534dded84c7ecaa79d14bc5da4ccb69b7d", + "url": "https://api.github.com/repos/symfony/finder/zipball/8661b74dbabc23223f38c9b99d3f8ade71170430", + "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -5159,7 +4970,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.3" + "source": "https://github.com/symfony/finder/tree/v6.0.3" }, "funding": [ { @@ -5175,33 +4986,32 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:34:36+00:00" + "time": "2022-01-26T17:23:29+00:00" }, { "name": "symfony/http-foundation", - "version": "v5.4.6", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465" + "reference": "c816b26f03b6902dba79b352c84a17f53d815f0d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/34e89bc147633c0f9dd6caaaf56da3b806a21465", - "reference": "34e89bc147633c0f9dd6caaaf56da3b806a21465", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/c816b26f03b6902dba79b352c84a17f53d815f0d", + "reference": "c816b26f03b6902dba79b352c84a17f53d815f0d", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.1" }, "require-dev": { "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "symfony/cache": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0" }, "suggest": { "symfony/mime": "To use the file extension guesser" @@ -5232,7 +5042,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.6" + "source": "https://github.com/symfony/http-foundation/tree/v6.0.7" }, "funding": [ { @@ -5248,67 +5058,64 @@ "type": "tidelift" } ], - "time": "2022-03-05T21:03:43+00:00" + "time": "2022-03-24T14:13:59+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "509243b9b3656db966284c45dffce9316c1ecc5c" + "reference": "9c03dab07a6aa336ffaadc15352b1d14f4ce01f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/509243b9b3656db966284c45dffce9316c1ecc5c", - "reference": "509243b9b3656db966284c45dffce9316c1ecc5c", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9c03dab07a6aa336ffaadc15352b1d14f4ce01f5", + "reference": "9c03dab07a6aa336ffaadc15352b1d14f4ce01f5", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "psr/log": "^1|^2|^3", + "symfony/error-handler": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/form": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", + "symfony/cache": "<5.4", + "symfony/config": "<5.4", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/doctrine-bridge": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<5.4", + "symfony/translation": "<5.4", + "symfony/twig-bridge": "<5.4", + "symfony/validator": "<5.4", "twig/twig": "<2.13" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/dom-crawler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", "symfony/translation-contracts": "^1.1|^2|^3", "twig/twig": "^2.13|^3.0.4" }, @@ -5344,7 +5151,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/v5.4.7" + "source": "https://github.com/symfony/http-kernel/tree/v6.0.7" }, "funding": [ { @@ -5360,47 +5167,42 @@ "type": "tidelift" } ], - "time": "2022-04-02T06:04:20+00:00" + "time": "2022-04-02T06:35:11+00:00" }, { - "name": "symfony/mime", - "version": "v5.4.7", + "name": "symfony/mailer", + "version": "v6.0.7", "source": { "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "92d27a34dea2e199fa9b687e3fff3a7d169b7b1c" + "url": "https://github.com/symfony/mailer.git", + "reference": "f7343f94e7afecca2ad840b078f9d80200e1bd27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/92d27a34dea2e199fa9b687e3fff3a7d169b7b1c", - "reference": "92d27a34dea2e199fa9b687e3fff3a7d169b7b1c", + "url": "https://api.github.com/repos/symfony/mailer/zipball/f7343f94e7afecca2ad840b078f9d80200e1bd27", + "reference": "f7343f94e7afecca2ad840b078f9d80200e1bd27", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16" + "egulias/email-validator": "^2.1.10|^3", + "php": ">=8.0.2", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3" }, "conflict": { - "egulias/email-validator": "~3.0.0", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" + "symfony/http-kernel": "<5.4" }, "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/property-access": "^4.4|^5.1|^6.0", - "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.2|^6.0" + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/messenger": "^5.4|^6.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Mime\\": "" + "Symfony\\Component\\Mailer\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -5420,14 +5222,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Allows manipulating MIME messages", + "description": "Helps sending emails", "homepage": "https://symfony.com", - "keywords": [ - "mime", - "mime-type" - ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.7" + "source": "https://github.com/symfony/mailer/tree/v6.0.7" }, "funding": [ { @@ -5443,48 +5241,49 @@ "type": "tidelift" } ], - "time": "2022-03-11T16:08:05+00:00" + "time": "2022-03-18T16:06:28+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "name": "symfony/mime", + "version": "v6.0.7", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "url": "https://github.com/symfony/mime.git", + "reference": "74266e396f812a2301536397a6360b6e6913c0d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/mime/zipball/74266e396f812a2301536397a6360b6e6913c0d8", + "reference": "74266e396f812a2301536397a6360b6e6913c0d8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" }, - "provide": { - "ext-ctype": "*" + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/mailer": "<5.4" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5492,24 +5291,22 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Allows manipulating MIME messages", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" + "mime", + "mime-type" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/mime/tree/v6.0.7" }, "funding": [ { @@ -5525,30 +5322,30 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-03-13T20:10:05+00:00" }, { - "name": "symfony/polyfill-iconv", + "name": "symfony/polyfill-ctype", "version": "v1.25.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "30885182c981ab175d4d034db0f6f469898070ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/f1aed619e28cb077fc83fac8c4c0383578356e40", - "reference": "f1aed619e28cb077fc83fac8c4c0383578356e40", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", + "reference": "30885182c981ab175d4d034db0f6f469898070ab", "shasum": "" }, "require": { "php": ">=7.1" }, "provide": { - "ext-iconv": "*" + "ext-ctype": "*" }, "suggest": { - "ext-iconv": "For best performance" + "ext-ctype": "For best performance" }, "type": "library", "extra": { @@ -5565,7 +5362,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Iconv\\": "" + "Symfony\\Polyfill\\Ctype\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -5574,25 +5371,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Iconv extension", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "iconv", + "ctype", "polyfill", - "portable", - "shim" + "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" }, "funding": [ { @@ -5608,7 +5404,7 @@ "type": "tidelift" } ], - "time": "2022-01-04T09:04:05+00:00" + "time": "2021-10-20T20:35:02+00:00" }, { "name": "symfony/polyfill-intl-grapheme", @@ -6021,85 +5817,6 @@ ], "time": "2021-05-27T09:17:38+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5", - "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "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.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.25.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": "2021-06-05T21:20:04+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.25.0", @@ -6264,21 +5981,20 @@ }, { "name": "symfony/process", - "version": "v5.4.7", + "version": "v6.0.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb" + "reference": "e13f6757e267d687e20ec5b26ccfcbbe511cd8f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/38a44b2517b470a436e1c944bf9b9ba3961137fb", - "reference": "38a44b2517b470a436e1c944bf9b9ba3961137fb", + "url": "https://api.github.com/repos/symfony/process/zipball/e13f6757e267d687e20ec5b26ccfcbbe511cd8f4", + "reference": "e13f6757e267d687e20ec5b26ccfcbbe511cd8f4", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -6306,7 +6022,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.7" + "source": "https://github.com/symfony/process/tree/v6.0.7" }, "funding": [ { @@ -6322,7 +6038,7 @@ "type": "tidelift" } ], - "time": "2022-03-18T16:18:52+00:00" + "time": "2022-03-18T16:21:55+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -6414,37 +6130,35 @@ }, { "name": "symfony/routing", - "version": "v5.4.3", + "version": "v6.0.5", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "44b29c7a94e867ccde1da604792f11a469958981" + "reference": "a738b152426ac7fcb94bdab8188264652238bef1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/44b29c7a94e867ccde1da604792f11a469958981", - "reference": "44b29c7a94e867ccde1da604792f11a469958981", + "url": "https://api.github.com/repos/symfony/routing/zipball/a738b152426ac7fcb94bdab8188264652238bef1", + "reference": "a738b152426ac7fcb94bdab8188264652238bef1", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "conflict": { "doctrine/annotations": "<1.12", - "symfony/config": "<5.3", - "symfony/dependency-injection": "<4.4", - "symfony/yaml": "<4.4" + "symfony/config": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" }, "require-dev": { "doctrine/annotations": "^1.12", "psr/log": "^1|^2|^3", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "symfony/config": "For using the all-in-one router or any loader", @@ -6484,7 +6198,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.3" + "source": "https://github.com/symfony/routing/tree/v6.0.5" }, "funding": [ { @@ -6500,26 +6214,25 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-31T19:46:53+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.1", + "version": "v3.0.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c" + "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/24d9dc654b83e91aa59f9d167b131bc3b5bea24c", - "reference": "24d9dc654b83e91aa59f9d167b131bc3b5bea24c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e517458f278c2131ca9f262f8fbaf01410f2c65c", + "reference": "e517458f278c2131ca9f262f8fbaf01410f2c65c", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.0.2", + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -6530,7 +6243,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -6567,7 +6280,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.1" }, "funding": [ { @@ -6583,7 +6296,7 @@ "type": "tidelift" } ], - "time": "2022-03-13T20:07:29+00:00" + "time": "2022-03-13T20:10:05+00:00" }, { "name": "symfony/string", @@ -6845,32 +6558,31 @@ }, { "name": "symfony/var-dumper", - "version": "v5.4.6", + "version": "v6.0.6", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0" + "reference": "38358405ae948963c50a3aae3dfea598223ba15e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/294e9da6e2e0dd404e983daa5aa74253d92c05d0", - "reference": "294e9da6e2e0dd404e983daa5aa74253d92c05d0", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/38358405ae948963c50a3aae3dfea598223ba15e", + "reference": "38358405ae948963c50a3aae3dfea598223ba15e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" + "symfony/console": "<5.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -6914,7 +6626,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.6" + "source": "https://github.com/symfony/var-dumper/tree/v6.0.6" }, "funding": [ { @@ -6930,7 +6642,7 @@ "type": "tidelift" } ], - "time": "2022-03-02T12:42:23+00:00" + "time": "2022-03-02T12:58:14+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -6987,28 +6699,28 @@ }, { "name": "vinkla/hashids", - "version": "9.1.0", + "version": "10.0.1", "source": { "type": "git", "url": "https://github.com/vinkla/laravel-hashids.git", - "reference": "cb0086db96cdb49816465adc97e3a024c8ee9767" + "reference": "9dbcfc1b20ecc25e73bba6e8c724d1648fa15fdd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vinkla/laravel-hashids/zipball/cb0086db96cdb49816465adc97e3a024c8ee9767", - "reference": "cb0086db96cdb49816465adc97e3a024c8ee9767", + "url": "https://api.github.com/repos/vinkla/laravel-hashids/zipball/9dbcfc1b20ecc25e73bba6e8c724d1648fa15fdd", + "reference": "9dbcfc1b20ecc25e73bba6e8c724d1648fa15fdd", "shasum": "" }, "require": { - "graham-campbell/manager": "^4.4", + "graham-campbell/manager": "^4.7", "hashids/hashids": "^4.1", - "illuminate/contracts": "^8.0", - "illuminate/support": "^8.0", - "php": "^7.3 || ^8.0" + "illuminate/contracts": "^9.0", + "illuminate/support": "^9.0", + "php": "^8.0" }, "require-dev": { "graham-campbell/analyzer": "^3.0", - "graham-campbell/testbench": "^5.4", + "graham-campbell/testbench": "^5.7", "mockery/mockery": "^1.3", "phpunit/phpunit": "^9.3", "squizlabs/php_codesniffer": "^3.5" @@ -7016,15 +6728,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.1-dev" + "dev-master": "10.0-dev" }, "laravel": { - "providers": [ - "Vinkla\\Hashids\\HashidsServiceProvider" - ], "aliases": { "Hashids": "Vinkla\\Hashids\\Facades\\Hashids" - } + }, + "providers": [ + "Vinkla\\Hashids\\HashidsServiceProvider" + ] } }, "autoload": { @@ -7049,9 +6761,9 @@ ], "support": { "issues": "https://github.com/vinkla/laravel-hashids/issues", - "source": "https://github.com/vinkla/laravel-hashids/tree/9.1.0" + "source": "https://github.com/vinkla/laravel-hashids/tree/10.0.1" }, - "time": "2020-11-26T19:38:22+00:00" + "time": "2022-04-10T18:38:38+00:00" }, { "name": "vlucas/phpdotenv", @@ -7135,16 +6847,16 @@ }, { "name": "voku/portable-ascii", - "version": "1.6.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a" + "reference": "b56450eed252f6801410d810c8e1727224ae0743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/87337c91b9dfacee02452244ee14ab3c43bc485a", - "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", + "reference": "b56450eed252f6801410d810c8e1727224ae0743", "shasum": "" }, "require": { @@ -7181,7 +6893,7 @@ ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/1.6.1" + "source": "https://github.com/voku/portable-ascii/tree/2.0.1" }, "funding": [ { @@ -7205,7 +6917,7 @@ "type": "tidelift" } ], - "time": "2022-01-24T18:55:24+00:00" + "time": "2022-03-08T17:03:00+00:00" }, { "name": "webmozart/assert", @@ -8535,181 +8247,38 @@ "time": "2022-03-03T08:28:38+00:00" }, { - "name": "facade/flare-client-php", - "version": "1.9.1", + "name": "facade/ignition-contracts", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/facade/flare-client-php.git", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" + "url": "https://github.com/facade/ignition-contracts.git", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", "shasum": "" }, "require": { - "facade/ignition-contracts": "~1.0", - "illuminate/pipeline": "^5.5|^6.0|^7.0|^8.0", - "php": "^7.1|^8.0", - "symfony/http-foundation": "^3.3|^4.1|^5.0", - "symfony/mime": "^3.4|^4.0|^5.1", - "symfony/var-dumper": "^3.4|^4.0|^5.0" + "php": "^7.3|^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5.16", - "spatie/phpunit-snapshot-assertions": "^2.0" + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { - "files": [ - "src/helpers.php" - ], "psr-4": { - "Facade\\FlareClient\\": "src" + "Facade\\IgnitionContracts\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Send PHP errors to Flare", - "homepage": "https://github.com/facade/flare-client-php", - "keywords": [ - "exception", - "facade", - "flare", - "reporting" - ], - "support": { - "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.9.1" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2021-09-13T12:16:46+00:00" - }, - { - "name": "facade/ignition", - "version": "2.17.5", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition.git", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/1d71996f83c9a5a7807331b8986ac890352b7a0c", - "reference": "1d71996f83c9a5a7807331b8986ac890352b7a0c", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "facade/flare-client-php": "^1.9.1", - "facade/ignition-contracts": "^1.0.2", - "illuminate/support": "^7.0|^8.0", - "monolog/monolog": "^2.0", - "php": "^7.2.5|^8.0", - "symfony/console": "^5.0", - "symfony/var-dumper": "^5.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "livewire/livewire": "^2.4", - "mockery/mockery": "^1.3", - "orchestra/testbench": "^5.0|^6.0", - "psalm/plugin-laravel": "^1.2" - }, - "suggest": { - "laravel/telescope": "^3.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - }, - "laravel": { - "providers": [ - "Facade\\Ignition\\IgnitionServiceProvider" - ], - "aliases": { - "Flare": "Facade\\Ignition\\Facades\\Flare" - } - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Facade\\Ignition\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A beautiful error page for Laravel applications.", - "homepage": "https://github.com/facade/ignition", - "keywords": [ - "error", - "flare", - "laravel", - "page" - ], - "support": { - "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", - "forum": "https://twitter.com/flareappio", - "issues": "https://github.com/facade/ignition/issues", - "source": "https://github.com/facade/ignition" - }, - "time": "2022-02-23T18:31:24+00:00" - }, - { - "name": "facade/ignition-contracts", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition-contracts.git", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v2.15.8", - "phpunit/phpunit": "^9.3.11", - "vimeo/psalm": "^3.17.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Facade\\IgnitionContracts\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "authors": [ { "name": "Freek Van der Herten", "email": "freek@spatie.be", @@ -8732,16 +8301,16 @@ }, { "name": "fakerphp/faker", - "version": "v1.19.0", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75" + "reference": "1895571db1b76474503785f723c762ff8b01c6f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/d7f08a622b3346766325488aa32ddc93ccdecc75", - "reference": "d7f08a622b3346766325488aa32ddc93ccdecc75", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/1895571db1b76474503785f723c762ff8b01c6f8", + "reference": "1895571db1b76474503785f723c762ff8b01c6f8", "shasum": "" }, "require": { @@ -8765,10 +8334,11 @@ "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", "ext-mbstring": "Required for multibyte Unicode string functionality." }, + "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.19-dev" + "dev-main": "v1.20-dev" } }, "autoload": { @@ -8793,9 +8363,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.19.0" + "source": "https://github.com/FakerPHP/Faker/tree/main" }, - "time": "2022-02-02T17:38:57+00:00" + "time": "2022-04-13T18:10:13+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -9109,6 +8679,66 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "laravel/sail", + "version": "v1.14.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/sail.git", + "reference": "453c66fde4109eb49e12299ffe3bf0d667983447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/sail/zipball/453c66fde4109eb49e12299ffe3bf0d667983447", + "reference": "453c66fde4109eb49e12299ffe3bf0d667983447", + "shasum": "" + }, + "require": { + "illuminate/console": "^8.0|^9.0", + "illuminate/contracts": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^7.3|^8.0" + }, + "bin": [ + "bin/sail" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Sail\\SailServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Sail\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Docker files for running a basic Laravel application.", + "keywords": [ + "docker", + "laravel" + ], + "support": { + "issues": "https://github.com/laravel/sail/issues", + "source": "https://github.com/laravel/sail" + }, + "time": "2022-04-27T13:10:22+00:00" + }, { "name": "maximebf/debugbar", "version": "v1.18.0", @@ -9359,37 +8989,37 @@ }, { "name": "nunomaduro/collision", - "version": "v5.11.0", + "version": "v6.2.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" + "reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/c379636dc50e829edb3a8bcb944a01aa1aed8f25", + "reference": "c379636dc50e829edb3a8bcb944a01aa1aed8f25", "shasum": "" }, "require": { - "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.14.3", - "php": "^7.3 || ^8.0", - "symfony/console": "^5.0" + "facade/ignition-contracts": "^1.0.2", + "filp/whoops": "^2.14.5", + "php": "^8.0.0", + "symfony/console": "^6.0.2" }, "require-dev": { - "brianium/paratest": "^6.1", - "fideloper/proxy": "^4.4.1", - "fruitcake/laravel-cors": "^2.0.3", - "laravel/framework": "8.x-dev", - "nunomaduro/larastan": "^0.6.2", - "nunomaduro/mock-final-classes": "^1.0", - "orchestra/testbench": "^6.0", - "phpstan/phpstan": "^0.12.64", - "phpunit/phpunit": "^9.5.0" + "brianium/paratest": "^6.4.1", + "laravel/framework": "^9.7", + "nunomaduro/larastan": "^1.0.2", + "nunomaduro/mock-final-classes": "^1.1.0", + "orchestra/testbench": "^7.3.0", + "phpunit/phpunit": "^9.5.11" }, "type": "library", "extra": { + "branch-alias": { + "dev-develop": "6.x-dev" + }, "laravel": { "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" @@ -9442,7 +9072,7 @@ "type": "patreon" } ], - "time": "2022-01-10T16:22:52+00:00" + "time": "2022-04-05T15:31:38+00:00" }, { "name": "openlss/lib-array2xml", @@ -9497,161 +9127,6 @@ }, "time": "2019-03-29T20:06:56+00:00" }, - { - "name": "orchestra/testbench", - "version": "v6.24.1", - "source": { - "type": "git", - "url": "https://github.com/orchestral/testbench.git", - "reference": "7b6a225851f6c148a80e241af5cbd833c83e572c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/7b6a225851f6c148a80e241af5cbd833c83e572c", - "reference": "7b6a225851f6c148a80e241af5cbd833c83e572c", - "shasum": "" - }, - "require": { - "laravel/framework": "^8.75", - "mockery/mockery": "^1.4.4", - "orchestra/testbench-core": "^6.28.1", - "php": "^7.3 || ^8.0", - "phpunit/phpunit": "^8.5.21 || ^9.5.10", - "spatie/laravel-ray": "^1.26.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mior Muhammad Zaki", - "email": "crynobone@gmail.com", - "homepage": "https://github.com/crynobone" - } - ], - "description": "Laravel Testing Helper for Packages Development", - "homepage": "https://packages.tools/testbench/", - "keywords": [ - "BDD", - "TDD", - "laravel", - "orchestra-platform", - "orchestral", - "testing" - ], - "support": { - "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v6.24.1" - }, - "funding": [ - { - "url": "https://paypal.me/crynobone", - "type": "custom" - }, - { - "url": "https://liberapay.com/crynobone", - "type": "liberapay" - } - ], - "time": "2022-02-08T12:57:17+00:00" - }, - { - "name": "orchestra/testbench-core", - "version": "v6.28.1", - "source": { - "type": "git", - "url": "https://github.com/orchestral/testbench-core.git", - "reference": "e66074e825e21b40b3433703dc3f76f2bfebebe0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/e66074e825e21b40b3433703dc3f76f2bfebebe0", - "reference": "e66074e825e21b40b3433703dc3f76f2bfebebe0", - "shasum": "" - }, - "require": { - "fakerphp/faker": "^1.9.1", - "php": "^7.3 || ^8.0", - "symfony/yaml": "^5.0", - "vlucas/phpdotenv": "^5.1" - }, - "require-dev": { - "laravel/framework": "^8.75", - "laravel/laravel": "8.x-dev", - "mockery/mockery": "^1.4.4", - "orchestra/canvas": "^6.1", - "phpunit/phpunit": "^8.5.21 || ^9.5.10 || ^10.0", - "spatie/laravel-ray": "^1.7.1", - "symfony/process": "^5.0" - }, - "suggest": { - "laravel/framework": "Required for testing (^8.75).", - "mockery/mockery": "Allow using Mockery for testing (^1.4.4).", - "orchestra/testbench-browser-kit": "Allow using legacy Laravel BrowserKit for testing (^6.0).", - "orchestra/testbench-dusk": "Allow using Laravel Dusk for testing (^6.0).", - "phpunit/phpunit": "Allow using PHPUnit for testing (^8.5.21|^9.5.10|^10.0)." - }, - "bin": [ - "testbench" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.0-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Orchestra\\Testbench\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mior Muhammad Zaki", - "email": "crynobone@gmail.com", - "homepage": "https://github.com/crynobone" - } - ], - "description": "Testing Helper for Laravel Development", - "homepage": "https://packages.tools/testbench", - "keywords": [ - "BDD", - "TDD", - "laravel", - "orchestra-platform", - "orchestral", - "testing" - ], - "support": { - "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench-core" - }, - "funding": [ - { - "url": "https://paypal.me/crynobone", - "type": "custom" - }, - { - "url": "https://liberapay.com/crynobone", - "type": "liberapay" - } - ], - "time": "2022-02-08T12:50:35+00:00" - }, { "name": "phar-io/manifest", "version": "2.0.3", @@ -10464,35 +9939,31 @@ "time": "2022-04-01T12:37:26+00:00" }, { - "name": "pimple/pimple", - "version": "v3.5.0", + "name": "psr/cache", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed" + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1 || ^2.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^5.4@dev" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "Pimple": "src/" + "psr-4": { + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -10501,60 +9972,11 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", - "keywords": [ - "container", - "dependency injection" - ], - "support": { - "source": "https://github.com/silexphp/Pimple/tree/v3.5.0" - }, - "time": "2021-10-28T11:13:42+00:00" - }, - { - "name": "psr/cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", + "description": "Common interface for caching libraries", "keywords": [ "cache", "psr", @@ -10571,12 +9993,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "dad1e44d86f958c5be9c5f355c9554ce22f1b1a7" + "reference": "f9837ae1f1830a09d71f5132112dcc9ed3ef9c65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/dad1e44d86f958c5be9c5f355c9554ce22f1b1a7", - "reference": "dad1e44d86f958c5be9c5f355c9554ce22f1b1a7", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/f9837ae1f1830a09d71f5132112dcc9ed3ef9c65", + "reference": "f9837ae1f1830a09d71f5132112dcc9ed3ef9c65", "shasum": "" }, "conflict": { @@ -10606,7 +10028,7 @@ "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bmarshall511/wordpress_zero_spam": "<5.2.13", "bolt/bolt": "<3.7.2", - "bolt/core": "<4.1.13", + "bolt/core": "<=4.2", "bottelet/flarepoint": "<2.2.1", "brightlocal/phpwhois": "<=4.2.5", "buddypress/buddypress": "<7.2.1", @@ -10624,7 +10046,7 @@ "codeigniter/framework": "<=3.0.6", "codeigniter4/framework": "<4.1.9", "codiad/codiad": "<=2.8.4", - "composer/composer": "<1.10.23|>=2-alpha.1,<2.1.9", + "composer/composer": "<1.10.26|>=2-alpha.1,<2.2.12|>=2.3,<2.3.5", "concrete5/concrete5": "<9", "concrete5/core": "<8.5.7", "contao-components/mediaelement": ">=2.14.2,<2.21.1", @@ -10635,6 +10057,7 @@ "craftcms/cms": "<3.7.29", "croogo/croogo": "<3.0.7", "cuyz/valinor": ">=0.5,<0.7", + "czproject/git-php": "<4.0.3", "datadog/dd-trace": ">=0.30,<0.30.2", "david-garcia/phpwhois": "<=4.3.1", "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", @@ -10694,6 +10117,7 @@ "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", + "froxlor/froxlor": "<=0.10.22", "fuel/core": "<1.8.1", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", @@ -10825,7 +10249,7 @@ "pimcore/data-hub": "<1.2.4", "pimcore/pimcore": "<10.4", "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": "<4.2.4", + "pocketmine/pocketmine-mp": "<4.2.9", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/contactform": ">1.0.1,<4.3", @@ -10853,8 +10277,8 @@ "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "shopware/core": "<=6.4.8.1", - "shopware/platform": "<=6.4.8.1", + "shopware/core": "<=6.4.9", + "shopware/platform": "<=6.4.9", "shopware/production": "<=6.3.5.2", "shopware/shopware": "<5.7.7", "shopware/storefront": "<=6.4.8.1", @@ -11045,7 +10469,7 @@ "type": "tidelift" } ], - "time": "2022-04-14T16:08:49+00:00" + "time": "2022-04-27T15:08:54+00:00" }, { "name": "sebastian/cli-parser", @@ -12074,113 +11498,104 @@ "time": "2021-11-09T10:57:15+00:00" }, { - "name": "spatie/laravel-ray", - "version": "1.29.6", + "name": "spatie/flare-client-php", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/spatie/laravel-ray.git", - "reference": "d9ec9d8550dfab362167c866fbd24d4b0d4d1e02" + "url": "https://github.com/spatie/flare-client-php.git", + "reference": "ceab058852a1278d9f57a7b95f1c348e4956d866" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/d9ec9d8550dfab362167c866fbd24d4b0d4d1e02", - "reference": "d9ec9d8550dfab362167c866fbd24d4b0d4d1e02", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/ceab058852a1278d9f57a7b95f1c348e4956d866", + "reference": "ceab058852a1278d9f57a7b95f1c348e4956d866", "shasum": "" }, "require": { - "ext-json": "*", - "illuminate/contracts": "^7.20|^8.19|^9.0", - "illuminate/database": "^7.20|^8.19|^9.0", - "illuminate/queue": "^7.20|^8.19|^9.0", - "illuminate/support": "^7.20|^8.19|^9.0", - "php": "^7.3|^8.0", - "spatie/backtrace": "^1.0", - "spatie/ray": "^1.33", - "symfony/stopwatch": "4.2|^5.1|^6.0", - "zbateson/mail-mime-parser": "^1.3.1|^2.0" + "illuminate/pipeline": "^8.0|^9.0", + "php": "^8.0", + "spatie/backtrace": "^1.2", + "symfony/http-foundation": "^5.0|^6.0", + "symfony/mime": "^5.2|^6.0", + "symfony/process": "^5.2|^6.0", + "symfony/var-dumper": "^5.2|^6.0" }, "require-dev": { - "guzzlehttp/guzzle": "^7.3", - "laravel/framework": "^7.20|^8.19|^9.0", - "orchestra/testbench-core": "^5.0|^6.0|^7.0", - "phpstan/phpstan": "^0.12.93", - "phpunit/phpunit": "^9.3", - "spatie/phpunit-snapshot-assertions": "^4.2" + "dms/phpunit-arraysubset-asserts": "^0.3.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/phpunit-snapshot-assertions": "^4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.29.x-dev" - }, - "laravel": { - "providers": [ - "Spatie\\LaravelRay\\RayServiceProvider" - ] - } - }, "autoload": { + "files": [ + "src/helpers.php" + ], "psr-4": { - "Spatie\\LaravelRay\\": "src" + "Spatie\\FlareClient\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", - "role": "Developer" - } - ], - "description": "Easily debug Laravel apps", - "homepage": "https://github.com/spatie/laravel-ray", + "description": "Send PHP errors to Flare", + "homepage": "https://github.com/spatie/flare-client-php", "keywords": [ - "laravel-ray", + "exception", + "flare", + "reporting", "spatie" ], "support": { - "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.29.6" + "issues": "https://github.com/spatie/flare-client-php/issues", + "source": "https://github.com/spatie/flare-client-php/tree/1.1.0" }, "funding": [ { - "url": "https://github.com/sponsors/spatie", + "url": "https://github.com/spatie", "type": "github" - }, - { - "url": "https://spatie.be/open-source/support-us", - "type": "other" } ], - "time": "2022-04-15T07:18:37+00:00" + "time": "2022-03-11T13:21:28+00:00" }, { - "name": "spatie/macroable", - "version": "2.0.0", + "name": "spatie/ignition", + "version": "1.2.9", "source": { "type": "git", - "url": "https://github.com/spatie/macroable.git", - "reference": "ec2c320f932e730607aff8052c44183cf3ecb072" + "url": "https://github.com/spatie/ignition.git", + "reference": "db25202fab2d5c14613b8914a1bb374998bbf870" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/macroable/zipball/ec2c320f932e730607aff8052c44183cf3ecb072", - "reference": "ec2c320f932e730607aff8052c44183cf3ecb072", + "url": "https://api.github.com/repos/spatie/ignition/zipball/db25202fab2d5c14613b8914a1bb374998bbf870", + "reference": "db25202fab2d5c14613b8914a1bb374998bbf870", "shasum": "" }, "require": { - "php": "^8.0" + "ext-json": "*", + "ext-mbstring": "*", + "monolog/monolog": "^2.0", + "php": "^8.0", + "spatie/flare-client-php": "^1.1", + "symfony/console": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "require-dev": { - "phpunit/phpunit": "^8.0|^9.3" + "mockery/mockery": "^1.4", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "symfony/process": "^5.4|^6.0" }, "type": "library", "autoload": { "psr-4": { - "Spatie\\Macroable\\": "src" + "Spatie\\Ignition\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -12189,63 +11604,88 @@ ], "authors": [ { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", + "name": "Spatie", + "email": "info@spatie.be", "role": "Developer" } ], - "description": "A trait to dynamically add methods to a class", - "homepage": "https://github.com/spatie/macroable", + "description": "A beautiful error page for PHP applications.", + "homepage": "https://flareapp.io/ignition", "keywords": [ - "macroable", - "spatie" + "error", + "flare", + "laravel", + "page" ], "support": { - "issues": "https://github.com/spatie/macroable/issues", - "source": "https://github.com/spatie/macroable/tree/2.0.0" + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/ignition/issues", + "source": "https://github.com/spatie/ignition" }, - "time": "2021-03-26T22:39:02+00:00" + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-04-23T20:37:21+00:00" }, { - "name": "spatie/ray", - "version": "1.34.2", + "name": "spatie/laravel-ignition", + "version": "1.2.2", "source": { "type": "git", - "url": "https://github.com/spatie/ray.git", - "reference": "ef5836b44f7bc4a0162f1a590cbaf33e8ab655dd" + "url": "https://github.com/spatie/laravel-ignition.git", + "reference": "924d1ae878874ad0bb49f63b69a9af759a34ee78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ray/zipball/ef5836b44f7bc4a0162f1a590cbaf33e8ab655dd", - "reference": "ef5836b44f7bc4a0162f1a590cbaf33e8ab655dd", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/924d1ae878874ad0bb49f63b69a9af759a34ee78", + "reference": "924d1ae878874ad0bb49f63b69a9af759a34ee78", "shasum": "" }, "require": { "ext-curl": "*", "ext-json": "*", - "php": "^7.3|^8.0", - "ramsey/uuid": "^3.0|^4.1", - "spatie/backtrace": "^1.1", - "spatie/macroable": "^1.0|^2.0", - "symfony/stopwatch": "^4.0|^5.1|^6.0", - "symfony/var-dumper": "^4.2|^5.1|^6.0" + "ext-mbstring": "*", + "illuminate/support": "^8.77|^9.0", + "monolog/monolog": "^2.3", + "php": "^8.0", + "spatie/flare-client-php": "^1.0.1", + "spatie/ignition": "^1.2.4", + "symfony/console": "^5.0|^6.0", + "symfony/var-dumper": "^5.0|^6.0" }, "require-dev": { - "illuminate/support": "6.x|^8.18|^9.0", - "nesbot/carbon": "^2.43", - "phpstan/phpstan": "^0.12.92", - "phpunit/phpunit": "^9.5", - "spatie/phpunit-snapshot-assertions": "^4.2", - "spatie/test-time": "^1.2" + "filp/whoops": "^2.14", + "livewire/livewire": "^2.8|dev-develop", + "mockery/mockery": "^1.4", + "nunomaduro/larastan": "^1.0", + "orchestra/testbench": "^6.23|^7.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/laravel-ray": "^1.27" }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelIgnition\\IgnitionServiceProvider" + ], + "aliases": { + "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" + } + } + }, "autoload": { "files": [ "src/helpers.php" ], "psr-4": { - "Spatie\\Ray\\": "src" + "Spatie\\LaravelIgnition\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -12254,46 +11694,45 @@ ], "authors": [ { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://spatie.be", + "name": "Spatie", + "email": "info@spatie.be", "role": "Developer" } ], - "description": "Debug with Ray to fix problems faster", - "homepage": "https://github.com/spatie/ray", + "description": "A beautiful error page for Laravel applications.", + "homepage": "https://flareapp.io/ignition", "keywords": [ - "ray", - "spatie" + "error", + "flare", + "laravel", + "page" ], "support": { - "issues": "https://github.com/spatie/ray/issues", - "source": "https://github.com/spatie/ray/tree/1.34.2" + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/laravel-ignition/issues", + "source": "https://github.com/spatie/laravel-ignition" }, "funding": [ { - "url": "https://github.com/sponsors/spatie", + "url": "https://github.com/spatie", "type": "github" - }, - { - "url": "https://spatie.be/open-source/support-us", - "type": "other" } ], - "time": "2022-04-08T13:41:27+00:00" + "time": "2022-04-14T18:04:51+00:00" }, { "name": "symfony/debug", - "version": "v4.4.37", + "version": "v4.4.41", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "5de6c6e7f52b364840e53851c126be4d71e60470" + "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/5de6c6e7f52b364840e53851c126be4d71e60470", - "reference": "5de6c6e7f52b364840e53851c126be4d71e60470", + "url": "https://api.github.com/repos/symfony/debug/zipball/6637e62480b60817b9a6984154a533e8e64c6bd5", + "reference": "6637e62480b60817b9a6984154a533e8e64c6bd5", "shasum": "" }, "require": { @@ -12332,7 +11771,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.37" + "source": "https://github.com/symfony/debug/tree/v4.4.41" }, "funding": [ { @@ -12348,7 +11787,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:41:36+00:00" + "time": "2022-04-12T15:19:55+00:00" }, { "name": "symfony/filesystem", @@ -12542,81 +11981,6 @@ ], "time": "2022-02-21T17:15:17+00:00" }, - { - "name": "symfony/yaml", - "version": "v5.4.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.3" - }, - "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": "2022-01-26T16:32:32+00:00" - }, { "name": "theseer/tokenizer", "version": "1.2.1", @@ -12823,226 +12187,24 @@ }, "abandoned": "symfony/filesystem", "time": "2015-12-17T08:42:14+00:00" - }, - { - "name": "zbateson/mail-mime-parser", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/zbateson/mail-mime-parser.git", - "reference": "24955de7ec352b3258c1d4551efd21202cb8710c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zbateson/mail-mime-parser/zipball/24955de7ec352b3258c1d4551efd21202cb8710c", - "reference": "24955de7ec352b3258c1d4551efd21202cb8710c", - "shasum": "" - }, - "require": { - "guzzlehttp/psr7": "^1.7.0|^2.0", - "php": ">=5.4", - "pimple/pimple": "^3.0", - "zbateson/mb-wrapper": "^1.0.1", - "zbateson/stream-decorators": "^1.0.6" - }, - "require-dev": { - "mikey179/vfsstream": "^1.6.0", - "sanmai/phpunit-legacy-adapter": "^6.3 || ^8.2" - }, - "suggest": { - "ext-iconv": "For best support/performance", - "ext-mbstring": "For best support/performance" - }, - "type": "library", - "autoload": { - "psr-4": { - "ZBateson\\MailMimeParser\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Zaahid Bateson" - }, - { - "name": "Contributors", - "homepage": "https://github.com/zbateson/mail-mime-parser/graphs/contributors" - } - ], - "description": "MIME email message parser", - "homepage": "https://mail-mime-parser.org", - "keywords": [ - "MimeMailParser", - "email", - "mail", - "mailparse", - "mime", - "mimeparse", - "parser", - "php-imap" - ], - "support": { - "docs": "https://mail-mime-parser.org/#usage-guide", - "issues": "https://github.com/zbateson/mail-mime-parser/issues", - "source": "https://github.com/zbateson/mail-mime-parser" - }, - "funding": [ - { - "url": "https://github.com/zbateson", - "type": "github" - } - ], - "time": "2022-02-22T21:35:59+00:00" - }, - { - "name": "zbateson/mb-wrapper", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/zbateson/mb-wrapper.git", - "reference": "bfd45fb3e2a8cf4c496b2c3ebd63b5f815721498" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zbateson/mb-wrapper/zipball/bfd45fb3e2a8cf4c496b2c3ebd63b5f815721498", - "reference": "bfd45fb3e2a8cf4c496b2c3ebd63b5f815721498", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "symfony/polyfill-iconv": "^1.9", - "symfony/polyfill-mbstring": "^1.9" - }, - "require-dev": { - "sanmai/phpunit-legacy-adapter": "^6.3 || ^8" - }, - "suggest": { - "ext-iconv": "For best support/performance", - "ext-mbstring": "For best support/performance" - }, - "type": "library", - "autoload": { - "psr-4": { - "ZBateson\\MbWrapper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Zaahid Bateson" - } - ], - "description": "Wrapper for mbstring with fallback to iconv for encoding conversion and string manipulation", - "keywords": [ - "charset", - "encoding", - "http", - "iconv", - "mail", - "mb", - "mb_convert_encoding", - "mbstring", - "mime", - "multibyte", - "string" - ], - "support": { - "issues": "https://github.com/zbateson/mb-wrapper/issues", - "source": "https://github.com/zbateson/mb-wrapper/tree/1.1.1" - }, - "funding": [ - { - "url": "https://github.com/zbateson", - "type": "github" - } - ], - "time": "2021-11-22T21:59:45+00:00" - }, - { - "name": "zbateson/stream-decorators", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/zbateson/stream-decorators.git", - "reference": "3403c4323bd1cd15fe54348b031b26b064c706af" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zbateson/stream-decorators/zipball/3403c4323bd1cd15fe54348b031b26b064c706af", - "reference": "3403c4323bd1cd15fe54348b031b26b064c706af", - "shasum": "" - }, - "require": { - "guzzlehttp/psr7": "^1.7.0|^2.0", - "php": ">=5.4", - "zbateson/mb-wrapper": "^1.0.0" - }, - "require-dev": { - "sanmai/phpunit-legacy-adapter": "^6.3 || ^8" - }, - "type": "library", - "autoload": { - "psr-4": { - "ZBateson\\StreamDecorators\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Zaahid Bateson" - } - ], - "description": "PHP psr7 stream decorators for mime message part streams", - "keywords": [ - "base64", - "charset", - "decorators", - "mail", - "mime", - "psr7", - "quoted-printable", - "stream", - "uuencode" - ], - "support": { - "issues": "https://github.com/zbateson/stream-decorators/issues", - "source": "https://github.com/zbateson/stream-decorators/tree/1.0.6" - }, - "funding": [ - { - "url": "https://github.com/zbateson", - "type": "github" - } - ], - "time": "2021-07-08T19:01:59+00:00" } ], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "roave/security-advisories": 20, - "apiato/core": 20 + "roave/security-advisories": 20 }, "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.0", + "php": "^8.0.2", "ext-curl": "*", + "ext-gettext": "*", "ext-mbstring": "*", "ext-openssl": "*", "ext-pdo": "*", "ext-sodium": "*", - "ext-tokenizer": "*", - "ext-gettext": "*" + "ext-tokenizer": "*" }, "platform-dev": { "ext-intl": "*", diff --git a/config/app.php b/config/app.php index 7ed0635a4..c72cd79fc 100644 --- a/config/app.php +++ b/config/app.php @@ -1,5 +1,7 @@ env('APP_DEBUG', false), + 'debug' => (bool) env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- @@ -54,7 +56,7 @@ 'url' => env('APP_URL', 'http://localhost'), - 'asset_url' => env('ASSET_URL', null), + 'asset_url' => env('ASSET_URL'), /* |-------------------------------------------------------------------------- @@ -123,6 +125,24 @@ 'cipher' => 'AES-256-CBC', + /* + |-------------------------------------------------------------------------- + | Maintenance Mode Driver + |-------------------------------------------------------------------------- + | + | These configuration options determine the driver used to determine and + | manage Laravel's "maintenance mode" status. The "cache" driver will + | allow maintenance mode to be controlled across multiple machines. + | + | Supported drivers: "file", "cache" + | + */ + + 'maintenance' => [ + 'driver' => 'file', + // 'store' => 'redis', + ], + /* |-------------------------------------------------------------------------- | Autoloaded Service Providers @@ -178,46 +198,9 @@ | */ - 'aliases' => [ - - 'App' => Illuminate\Support\Facades\App::class, - 'Arr' => Illuminate\Support\Arr::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, - 'Bus' => Illuminate\Support\Facades\Bus::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'Date' => Illuminate\Support\Facades\Date::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Http' => Illuminate\Support\Facades\Http::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, - 'Notification' => Illuminate\Support\Facades\Notification::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, - 'Redis' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'Str' => Illuminate\Support\Str::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, - + 'aliases' => Facade::defaultAliases()->merge([ // NOTE: all packages aliases must be registered inside their containers service providers - ], + // 'ExampleClass' => App\Example\ExampleClass::class, + ])->toArray(), + ]; diff --git a/config/auth.php b/config/auth.php index 0d222de25..1db1c7295 100644 --- a/config/auth.php +++ b/config/auth.php @@ -14,7 +14,7 @@ */ 'defaults' => [ - 'guard' => 'web', + 'guard' => 'api', 'passwords' => 'users', ], @@ -31,7 +31,7 @@ | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | - | Supported: "session", "token" + | Supported: "session" | */ @@ -86,7 +86,7 @@ | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | - | The expire time is the number of minutes that the reset token should be + | The expire time is the number of minutes that each reset token will be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | diff --git a/config/broadcasting.php b/config/broadcasting.php index 2d529820c..67fcbbd6c 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -39,6 +39,9 @@ 'cluster' => env('PUSHER_APP_CLUSTER'), 'useTLS' => true, ], + 'client_options' => [ + // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html + ], ], 'ably' => [ diff --git a/config/cache.php b/config/cache.php index 27a4b142a..33bb29546 100644 --- a/config/cache.php +++ b/config/cache.php @@ -26,6 +26,9 @@ | well as their drivers. You may even define multiple stores for the | same cache driver to group types of items stored in your caches. | + | Supported drivers: "apc", "array", "database", "file", + | "memcached", "redis", "dynamodb", "octane", "null" + | */ 'stores' => [ @@ -85,6 +88,10 @@ 'endpoint' => env('DYNAMODB_ENDPOINT'), ], + 'octane' => [ + 'driver' => 'octane', + ], + ], /* @@ -92,12 +99,12 @@ | Cache Key Prefix |-------------------------------------------------------------------------- | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), ]; diff --git a/config/cors.php b/config/cors.php index b4654de7c..8a39e6daa 100644 --- a/config/cors.php +++ b/config/cors.php @@ -15,38 +15,20 @@ | */ - /* - * You can enable CORS for 1 or multiple paths. - * Example: ['api/*'] - */ - 'paths' => [], + 'paths' => ['api/*', 'sanctum/csrf-cookie'], - /* - * Matches the request method. `[*]` allows all methods. - */ 'allowed_methods' => ['*'], - /* - * Matches the request origin. `[*]` allows all origins. - */ 'allowed_origins' => ['*'], - /* - * Matches the request origin with, similar to `Request::is()` - */ 'allowed_origins_patterns' => [], - /* - * Sets the Access-Control-Allow-Headers response header. `[*]` allows all headers. - */ - 'allowed_headers' => ['*'], # ['Content-Type', 'Authorization', 'Accept'], + 'allowed_headers' => ['*'], - /* - * Sets the Access-Control-Expose-Headers response header. - */ 'exposed_headers' => [], 'max_age' => 0, 'supports_credentials' => false, + ]; diff --git a/config/database.php b/config/database.php index b42d9b30a..137ad18ce 100644 --- a/config/database.php +++ b/config/database.php @@ -74,7 +74,7 @@ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, - 'schema' => 'public', + 'search_path' => 'public', 'sslmode' => 'prefer', ], @@ -89,6 +89,8 @@ 'charset' => 'utf8', 'prefix' => '', 'prefix_indexes' => true, + // 'encrypt' => env('DB_ENCRYPT', 'yes'), + // 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'), ], ], @@ -129,7 +131,8 @@ 'default' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), - 'password' => env('REDIS_PASSWORD', null), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), 'database' => env('REDIS_DB', '0'), ], @@ -137,7 +140,8 @@ 'cache' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST', '127.0.0.1'), - 'password' => env('REDIS_PASSWORD', null), + 'username' => env('REDIS_USERNAME'), + 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT', '6379'), 'database' => env('REDIS_CACHE_DB', '1'), ], diff --git a/config/filesystems.php b/config/filesystems.php index dadabbfc5..e9d9dbdbe 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -13,20 +13,7 @@ | */ - 'default' => env('FILESYSTEM_DRIVER', 'local'), - - /* - |-------------------------------------------------------------------------- - | Default Cloud Filesystem Disk - |-------------------------------------------------------------------------- - | - | Many applications store files both locally and in the cloud. For this - | reason, you may specify a default "cloud" driver here. This driver - | will be bound as the Cloud disk implementation in the container. - | - */ - - 'cloud' => env('FILESYSTEM_CLOUD', 's3'), + 'default' => env('FILESYSTEM_DISK', 'local'), /* |-------------------------------------------------------------------------- @@ -35,7 +22,7 @@ | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. + | been set up for each driver as an example of the required values. | | Supported Drivers: "local", "ftp", "sftp", "s3" | @@ -46,6 +33,7 @@ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), + 'throw' => false, ], 'public' => [ @@ -53,6 +41,7 @@ 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', + 'throw' => false, ], 's3' => [ @@ -63,6 +52,8 @@ 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), 'endpoint' => env('AWS_ENDPOINT'), + 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => false, ], ], @@ -79,7 +70,7 @@ */ 'links' => [ - public_path('storage') => storage_path('app/public'), - ] + public_path('storage') => storage_path('app/public'), + ], ]; diff --git a/config/hashing.php b/config/hashing.php index 842577087..bcd3be4c2 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -44,9 +44,9 @@ */ 'argon' => [ - 'memory' => 1024, - 'threads' => 2, - 'time' => 2, + 'memory' => 65536, + 'threads' => 1, + 'time' => 4, ], ]; diff --git a/config/logging.php b/config/logging.php index e95e96227..fefe0885c 100644 --- a/config/logging.php +++ b/config/logging.php @@ -19,6 +19,19 @@ 'default' => env('LOG_CHANNEL', 'stack'), + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + /* |-------------------------------------------------------------------------- | Log Channels @@ -44,13 +57,13 @@ 'single' => [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), - 'level' => 'debug', + 'level' => env('LOG_LEVEL', 'debug'), ], 'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), - 'level' => 'debug', + 'level' => env('LOG_LEVEL', 'debug'), 'days' => 14, ], @@ -59,16 +72,17 @@ 'url' => env('LOG_SLACK_WEBHOOK_URL'), 'username' => 'Laravel Log', 'emoji' => ':boom:', - 'level' => 'critical', + 'level' => env('LOG_LEVEL', 'critical'), ], 'papertrail' => [ 'driver' => 'monolog', 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => SyslogUdpHandler::class, + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), ], ], diff --git a/config/mail.php b/config/mail.php index 54299aabf..11bfe7e19 100644 --- a/config/mail.php +++ b/config/mail.php @@ -29,7 +29,7 @@ | mailers below. You are free to add additional mailers as required. | | Supported: "smtp", "sendmail", "mailgun", "ses", - | "postmark", "log", "array" + | "postmark", "log", "array", "failover" | */ @@ -42,7 +42,6 @@ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, - 'auth_mode' => null, ], 'ses' => [ @@ -59,7 +58,7 @@ 'sendmail' => [ 'transport' => 'sendmail', - 'path' => '/usr/sbin/sendmail -bs', + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), ], 'log' => [ @@ -70,6 +69,14 @@ 'array' => [ 'transport' => 'array', ], + + 'failover' => [ + 'transport' => 'failover', + 'mailers' => [ + 'smtp', + 'log', + ], + ], ], /* diff --git a/config/services.php b/config/services.php index b851d5e2e..0ace530e8 100644 --- a/config/services.php +++ b/config/services.php @@ -18,6 +18,7 @@ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', ], 'postmark' => [ @@ -29,4 +30,5 @@ 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), ], + ]; diff --git a/config/session.php b/config/session.php index 17bfa061e..8fed97c01 100644 --- a/config/session.php +++ b/config/session.php @@ -72,7 +72,7 @@ | */ - 'connection' => env('SESSION_CONNECTION', null), + 'connection' => env('SESSION_CONNECTION'), /* |-------------------------------------------------------------------------- @@ -100,7 +100,7 @@ | */ - 'store' => env('SESSION_STORE', null), + 'store' => env('SESSION_STORE'), /* |-------------------------------------------------------------------------- @@ -128,7 +128,7 @@ 'cookie' => env( 'SESSION_COOKIE', - Str::slug(env('APP_NAME', 'laravel'), '_') . '_session' + Str::slug(env('APP_NAME', 'laravel'), '_').'_session' ), /* @@ -155,7 +155,7 @@ | */ - 'domain' => env('SESSION_DOMAIN', null), + 'domain' => env('SESSION_DOMAIN'), /* |-------------------------------------------------------------------------- @@ -164,11 +164,11 @@ | | By setting this option to true, session cookies will only be sent back | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you if it can not be done securely. + | the cookie from being sent to you when it can't be done securely. | */ - 'secure' => env('SESSION_SECURE_COOKIE', true), + 'secure' => env('SESSION_SECURE_COOKIE'), /* |-------------------------------------------------------------------------- diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 88ac8bf49..8d307e271 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -1,4 +1,4 @@ */ class DatabaseSeeder extends Seeder { diff --git a/resources/lang/ar/auth.php b/lang/ar/auth.php similarity index 100% rename from resources/lang/ar/auth.php rename to lang/ar/auth.php diff --git a/resources/lang/ar/pagination.php b/lang/ar/pagination.php similarity index 100% rename from resources/lang/ar/pagination.php rename to lang/ar/pagination.php diff --git a/resources/lang/ar/passwords.php b/lang/ar/passwords.php similarity index 100% rename from resources/lang/ar/passwords.php rename to lang/ar/passwords.php diff --git a/resources/lang/ar/validation.php b/lang/ar/validation.php similarity index 100% rename from resources/lang/ar/validation.php rename to lang/ar/validation.php diff --git a/resources/lang/en/auth.php b/lang/en/auth.php similarity index 91% rename from resources/lang/en/auth.php rename to lang/en/auth.php index e5506df29..6598e2c06 100644 --- a/resources/lang/en/auth.php +++ b/lang/en/auth.php @@ -14,6 +14,7 @@ */ 'failed' => 'These credentials do not match our records.', + 'password' => 'The provided password is incorrect.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', ]; diff --git a/resources/lang/en/pagination.php b/lang/en/pagination.php similarity index 100% rename from resources/lang/en/pagination.php rename to lang/en/pagination.php diff --git a/resources/lang/en/passwords.php b/lang/en/passwords.php similarity index 83% rename from resources/lang/en/passwords.php rename to lang/en/passwords.php index 724de4b9d..2345a56b5 100644 --- a/resources/lang/en/passwords.php +++ b/lang/en/passwords.php @@ -14,9 +14,9 @@ */ 'reset' => 'Your password has been reset!', - 'sent' => 'We have e-mailed your password reset link!', + '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 e-mail address.", + 'user' => "We can't find a user with that email address.", ]; diff --git a/resources/lang/en/validation.php b/lang/en/validation.php similarity index 94% rename from resources/lang/en/validation.php rename to lang/en/validation.php index 397f78e2c..8ca5a008f 100644 --- a/resources/lang/en/validation.php +++ b/lang/en/validation.php @@ -100,6 +100,13 @@ 'not_in' => 'The selected :attribute is invalid.', 'not_regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.', + 'password' => [ + 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', + 'letters' => 'The :attribute must contain at least one letter.', + 'symbols' => 'The :attribute must contain at least one symbol.', + 'numbers' => 'The :attribute must contain at least one number.', + '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.', diff --git a/resources/lang/es/auth.php b/lang/es/auth.php similarity index 100% rename from resources/lang/es/auth.php rename to lang/es/auth.php diff --git a/resources/lang/es/pagination.php b/lang/es/pagination.php similarity index 100% rename from resources/lang/es/pagination.php rename to lang/es/pagination.php diff --git a/resources/lang/es/passwords.php b/lang/es/passwords.php similarity index 100% rename from resources/lang/es/passwords.php rename to lang/es/passwords.php diff --git a/resources/lang/es/validation.php b/lang/es/validation.php similarity index 100% rename from resources/lang/es/validation.php rename to lang/es/validation.php diff --git a/resources/lang/fa/auth.php b/lang/fa/auth.php similarity index 100% rename from resources/lang/fa/auth.php rename to lang/fa/auth.php diff --git a/resources/lang/fa/pagination.php b/lang/fa/pagination.php similarity index 100% rename from resources/lang/fa/pagination.php rename to lang/fa/pagination.php diff --git a/resources/lang/fa/passwords.php b/lang/fa/passwords.php similarity index 100% rename from resources/lang/fa/passwords.php rename to lang/fa/passwords.php diff --git a/resources/lang/fa/validation.php b/lang/fa/validation.php similarity index 100% rename from resources/lang/fa/validation.php rename to lang/fa/validation.php diff --git a/resources/lang/fr/auth.php b/lang/fr/auth.php similarity index 100% rename from resources/lang/fr/auth.php rename to lang/fr/auth.php diff --git a/resources/lang/fr/pagination.php b/lang/fr/pagination.php similarity index 100% rename from resources/lang/fr/pagination.php rename to lang/fr/pagination.php diff --git a/resources/lang/fr/passwords.php b/lang/fr/passwords.php similarity index 100% rename from resources/lang/fr/passwords.php rename to lang/fr/passwords.php diff --git a/resources/lang/fr/validation.php b/lang/fr/validation.php similarity index 100% rename from resources/lang/fr/validation.php rename to lang/fr/validation.php diff --git a/package-lock.json b/package-lock.json index f52e2a753..df29dbdf2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1791,52 +1791,6 @@ "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", "dev": true }, - "adjust-sourcemap-loader": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-1.2.0.tgz", - "integrity": "sha512-958oaHHVEXMvsY7v7cC5gEkNIcoaAVIhZ4mBReYVZJOTP9IgKmzLjIOhTtzpLMu+qriXvLsVjJ155EeInp45IQ==", - "dev": true, - "requires": { - "assert": "^1.3.0", - "camelcase": "^1.2.1", - "loader-utils": "^1.1.0", - "lodash.assign": "^4.0.1", - "lodash.defaults": "^3.1.2", - "object-path": "^0.9.2", - "regex-parser": "^2.2.9" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true - }, - "lodash.defaults": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.1.2.tgz", - "integrity": "sha1-xzCLGNv4vJNy1wGnNJPGEZK9Liw=", - "dev": true, - "requires": { - "lodash.assign": "^3.0.0", - "lodash.restparam": "^3.0.0" - }, - "dependencies": { - "lodash.assign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz", - "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=", - "dev": true, - "requires": { - "lodash._baseassign": "^3.0.0", - "lodash._createassigner": "^3.0.0", - "lodash.keys": "^3.0.0" - } - } - } - } - } - }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2043,12 +1997,6 @@ "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==", "dev": true }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, "autoprefixer": { "version": "10.4.4", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.4.tgz", @@ -2064,12 +2012,12 @@ } }, "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", "dev": true, "requires": { - "follow-redirects": "^1.14.0" + "follow-redirects": "^1.14.7" } }, "babel-loader": { @@ -2969,36 +2917,6 @@ "sha.js": "^2.4.8" } }, - "cross-env": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.1.tgz", - "integrity": "sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.5" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "crypt": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", @@ -3030,26 +2948,6 @@ "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", "dev": true }, - "css": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", - "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "source-map": "^0.6.1", - "source-map-resolve": "^0.5.2", - "urix": "^0.1.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "css-declaration-sorter": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz", @@ -3211,12 +3109,6 @@ "ms": "^2.1.1" } }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, "decompress-response": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", @@ -4669,12 +4561,6 @@ "loader-utils": "^1.1.0" } }, - "immutable": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", - "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "dev": true - }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -5212,104 +5098,18 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash._baseassign": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz", - "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=", - "dev": true, - "requires": { - "lodash._basecopy": "^3.0.0", - "lodash.keys": "^3.0.0" - } - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._bindcallback": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz", - "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", - "dev": true - }, - "lodash._createassigner": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz", - "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=", - "dev": true, - "requires": { - "lodash._bindcallback": "^3.0.0", - "lodash._isiterateecall": "^3.0.0", - "lodash.restparam": "^3.0.0" - } - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", - "dev": true - }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, - "lodash.defaults": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", - "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", - "dev": true - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true, - "requires": { - "lodash._getnative": "^3.0.0", - "lodash.isarguments": "^3.0.0", - "lodash.isarray": "^3.0.0" - } - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -5624,12 +5424,6 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "no-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", @@ -5848,12 +5642,6 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "object-path": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.9.2.tgz", - "integrity": "sha1-D9mnT8X60a45aLWGvaXGMr1sBaU=", - "dev": true - }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -6073,12 +5861,6 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, "path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -6116,12 +5898,6 @@ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, "pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -6143,9 +5919,9 @@ }, "dependencies": { "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { "lodash": "^4.17.14" @@ -6758,12 +6534,6 @@ "@babel/runtime": "^7.8.4" } }, - "regex-parser": { - "version": "2.2.10", - "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.10.tgz", - "integrity": "sha512-8t6074A68gHfU8Neftl0Le6KTDwfGAj7IyjPIMSfikI2wJUTHDMaIq42bUsfVnj8mhx0R+45rdUXHGpN164avA==", - "dev": true - }, "regexpu-core": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", @@ -6875,37 +6645,6 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "resolve-url-loader": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-2.3.2.tgz", - "integrity": "sha512-sc/UVgiADdoTc+4cGPB7cUCnlEkzlxD1NXHw4oa9qA0fp30H8mAQ2ePJBP9MQ029DUuhEPouhNdvzT37pBCV0g==", - "dev": true, - "requires": { - "adjust-sourcemap-loader": "^1.1.0", - "camelcase": "^4.1.0", - "convert-source-map": "^1.5.1", - "loader-utils": "^1.1.0", - "lodash.defaults": "^4.0.0", - "rework": "^1.0.1", - "rework-visit": "^1.0.0", - "source-map": "^0.5.7", - "urix": "^0.1.0" - }, - "dependencies": { - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - } - } - }, "responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", @@ -6927,30 +6666,6 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, - "rework": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz", - "integrity": "sha1-MIBqhBNCtUUQqkEQhQzUhTQUSqc=", - "dev": true, - "requires": { - "convert-source-map": "^0.3.3", - "css": "^2.0.0" - }, - "dependencies": { - "convert-source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz", - "integrity": "sha1-8dgClQr33SYxof6+BZZVDIarMZA=", - "dev": true - } - } - }, - "rework-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rework-visit/-/rework-visit-1.0.0.tgz", - "integrity": "sha1-mUWygD8hni96ygCtuLyfZA+ELJo=", - "dev": true - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -6997,30 +6712,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "sass": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.50.1.tgz", - "integrity": "sha512-noTnY41KnlW2A9P8sdwESpDmo+KBNkukI1i8+hOK3footBUcohNHtdOJbckp46XO95nuvcHDDZ+4tmOnpK3hjw==", - "dev": true, - "requires": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - } - }, - "sass-loader": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.3.1.tgz", - "integrity": "sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "loader-utils": "^1.0.1", - "neo-async": "^2.5.0", - "pify": "^4.0.1", - "semver": "^6.3.0" - } - }, "schema-utils": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", @@ -7210,21 +6901,6 @@ "kind-of": "^6.0.2" } }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, "shellwords": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", @@ -7281,19 +6957,6 @@ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -7312,12 +6975,6 @@ } } }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, "spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", @@ -7863,12 +7520,6 @@ "punycode": "^2.1.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", @@ -8261,15 +7912,6 @@ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, "widest-line": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", diff --git a/package.json b/package.json index 9251791a7..8c9c56531 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,9 @@ }, "devDependencies": { "apidoc": "^0.51.1", - "axios": "^0.21.4", - "cross-env": "^5.1", - "laravel-mix": "^6.0.43", + "axios": "^0.25", + "laravel-mix": "^6.0.6", "lodash": "^4.17.19", - "postcss": "^8.4.12", - "resolve-url-loader": "^2.3.1", - "sass": "^1.50.1", - "sass-loader": "^7.1.0" + "postcss": "^8.1.14" } } diff --git a/phpunit.xml b/phpunit.xml index 155876de2..1fe273b05 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,19 @@ - + xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" + bootstrap="vendor/autoload.php" colors="true"> + + + ./app/Containers/*/*/Tests/Unit + + + ./app/Containers/*/*/UI/*/Tests/Functional + + + ./app/Ship/Tests + + + ./app @@ -12,17 +24,6 @@ ./app/Containers/*/Data/Factories - - - ./app/Containers/*/*/Tests/Unit - - - ./app/Containers/*/*/UI/*/Tests/Functional - - - ./app/Ship/Tests - - @@ -32,5 +33,6 @@ +