From 5e0a72a95b221f1fb30ba2bdaa6624cf70af3d83 Mon Sep 17 00:00:00 2001 From: Miftahurrahmi Date: Fri, 28 Jun 2024 17:03:09 +0700 Subject: [PATCH] update laravel sanctum version in gitpod --- .gitpod/composer.json | 164 +++++++++++++++++++++--------------------- CONTRIBUTING.md | 30 +++----- 2 files changed, 91 insertions(+), 103 deletions(-) diff --git a/.gitpod/composer.json b/.gitpod/composer.json index ec19e502b..d24517480 100644 --- a/.gitpod/composer.json +++ b/.gitpod/composer.json @@ -1,86 +1,84 @@ { - "name": "laravel/laravel", - "type": "project", - "description": "The Laravel Framework.", - "keywords": [ - "framework", - "laravel" + "name": "laravel/laravel", + "type": "project", + "description": "The Laravel Framework.", + "keywords": [ + "framework", + "laravel" + ], + "license": "MIT", + "require": { + "php": "^8.2", + "laravel/framework": "^11.0", + "laravel/tinker": "^2.9", + "laravel-doctrine/orm": "2.1", + "psr/http-message": "1.1", + "arcanedev/log-viewer": "^11.0", + "darkaonline/l5-swagger": "^8.6", + "phpstan/phpstan": "^1.11", + "spatie/laravel-backup": "^8.8", + "unisharp/laravel-filemanager": "^2.9", + "spatie/laravel-activitylog": "^4.8", + "php-open-source-saver/jwt-auth": "^2.3", + "google/apiclient": "^2.16", + "spatie/flysystem-dropbox": "^3.0", + "masbug/flysystem-google-drive-ext": "^2.3", + "laravel/octane": "^2.3", + "laravel/sanctum": "^4.0", + "laravel/ui": "^4.5", + "webpatser/laravel-uuid": "^4.0", + "predis/predis": "^2.2", + "league/flysystem-aws-s3-v3": "^3.28", + "league/flysystem": "^3.28", + "doctrine/dbal": "^3.8" + }, + "require-dev": { + "fakerphp/faker": "^1.23", + "laravel/pint": "^1.13", + "laravel/sail": "^1.26", + "mockery/mockery": "^1.6", + "nunomaduro/collision": "^8.0", + "phpunit/phpunit": "^11.0.1", + "spatie/laravel-ignition": "^2.4" + }, + "autoload": { + "psr-4": { + "App\\": "app/", + "Database\\Factories\\": "database/factories/", + "Database\\Seeders\\": "database/seeders/", + "Uasoft\\Badaso\\": "packages/badaso/core/src/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "scripts": { + "post-autoload-dump": [ + "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", + "@php artisan package:discover --ansi" ], - "license": "MIT", - "require": { - "php": "^7.3|^8.0", - "fruitcake/laravel-cors": "^2.0", - "laravel/framework": "^8.75", - "masbug/flysystem-google-drive-ext": "*", - "google/apiclient": "^2.12", - "arcanedev/log-viewer": "^8.1|^9.0", - "darkaonline/l5-swagger": "^8.0|^8.3", - "doctrine/dbal": "^2.5", - "guzzlehttp/guzzle": "^7.2", - "larapack/doctrine-support": "^0.1.9", - "laravel/octane": "^1.2", - "laravel/sanctum": "^2.14.1", - "laravel/tinker": "^2.7", - "laravel/ui": "^3.4", - "league/flysystem": "~1.1|~2.0|~3.0", - "league/flysystem-aws-s3-v3": "^1.0.28|^3.0", - "php-open-source-saver/jwt-auth": "^1.4", - "phpstan/phpstan": "^1.4", - "predis/predis": "^1.1", - "symfony/var-exporter": "^5.2.0|^6.0", - "spatie/flysystem-dropbox": "^1.2.2|^2.0", - "spatie/laravel-activitylog": "^3.17|^4.4", - "spatie/laravel-backup": "^6.16|^8.1.0", - "unisharp/laravel-filemanager": "^2.4", - "webpatser/laravel-uuid": "^4.0", - "zircote/swagger-php": "^3.2" - }, - "require-dev": { - "facade/ignition": "^2.5", - "fakerphp/faker": "^1.9.1", - "laravel/sail": "^1.0.1", - "mockery/mockery": "^1.4.4", - "nunomaduro/collision": "^5.10", - "phpunit/phpunit": "^9.5.10" - }, - "autoload": { - "psr-4": { - "App\\": "app/", - "Database\\Factories\\": "database/factories/", - "Database\\Seeders\\": "database/seeders/", - "Uasoft\\Badaso\\": "packages/badaso/core/src/" - } - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests/" - } - }, - "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": [] - } - }, - "config": { - "optimize-autoloader": true, - "preferred-install": "dist", - "sort-packages": true - }, - "minimum-stability": "dev", - "prefer-stable": true + "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": [] + } + }, + "config": { + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f335c6df9..2b1b32bf9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ Steps for registering and getting a license on Badaso Dashboard can be found on After getting the license, you can proceed to Badaso installation. -1, Clone badaso into Laravel project. Sample: +1. Clone badaso into Laravel project. Sample: - Root Laravel Project - /packages // new folder - /badaso // new folder @@ -56,26 +56,16 @@ cd into badaso directory, then run git clone https://github.com/uasoft-indonesia/badaso.git ``` -2. Add the following Badaso provider and JWT provider to ```/config/app.php```. +2. Add the following Badaso provider ```/bootstrap/providers.php```. ``` -'providers' => [ +'return' => [ ..., - Uasoft\Badaso\Providers\BadasoServiceProvider::class, - PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider::class, + "Uasoft\\Badaso\\Providers\\BadasoServiceProvider" ] ``` -3. Add the following aliases to ```config/app.php```. -``` -'aliases' => [ - ..., - 'JWTAuth' => PHPOpenSourceSaver\JWTAuth\Facades\JWTAuth::class, - 'JWTFactory' => PHPOpenSourceSaver\JWTAuth\Facades\JWTFactory::class, -] -``` - -4. Add badaso providers to autoload +3. Add badaso providers to autoload ``` "autoload": { @@ -87,21 +77,21 @@ git clone https://github.com/uasoft-indonesia/badaso.git } ``` -5. Copy required library from ```packages/badaso/core/composer.json``` to ```/composer.json``` then ```composer install``` +4. Copy required library from ```packages/badaso/core/composer.json``` to ```/composer.json``` then ```composer install``` -6. Run the following commands to update dependencies in package.json and webpack. +5. Run the following commands to update dependencies in package.json and webpack. ``` php artisan badaso:setup ``` -7. Run the following commands in sequence. +6. Run the following commands in sequence. ``` composer dump-autoload php artisan migrate php artisan db:seed --class=BadasoSeeder ``` -8. Open the ```env``` file then add the following lines. +7. Open the ```env``` file then add the following lines. ``` #Set a key as secret key for generating JWT token JWT_SECRET= @@ -131,7 +121,7 @@ MIX_LOG_VIEWER_ROUTE="log-viewer" MIX_ADMIN_PANEL_ROUTE_PREFIX, MIX_API_ROUTE_PREFIX & MIX_LOG_VIEWER_ROUTE should be different ::: -9. Add the following Badaso guard and auth provider in ```config/auth.php```. Make sure to use Badaso guard as auth default in ```config/auth.php```. +8. Add the following Badaso guard and auth provider in ```config/auth.php```. Make sure to use Badaso guard as auth default in ```config/auth.php```. ```php