ellaisys / aws-cognito

AWS Cognito package (with MFA Feature) using the AWS SDK for PHP/Laravel
https://ellaisys.github.io/aws-cognito/
MIT License
110 stars 43 forks source link

Option to disable migrations doesn't work. #109

Open RubinNederlof opened 2 months ago

RubinNederlof commented 2 months ago

Describe the bug When following the documentation to disable the migrations, an error is thrown when using the AwsCognito::ignoreMigrations(); statement.

To Reproduce Steps to reproduce the behaviour:

  1. Go to 'app/Providers/AppServiceProvider.php'
  2. Add the line 'AwsCognito::ignoreMigrations();' according to the documentation and add the use line on the top.
  3. run php artisan migrate:fresh
  4. See error

Expected behavior The migrations run fluently

Additional context `[2024-08-31 19:42:56] local.ERROR: Too few arguments to function Ellaisys\Cognito\AwsCognito::construct(), 0 passed in /var/www/html/vendor/ellaisys/aws-cognito/src/AwsCognito.php on line 104 and exactly 2 expected {"exception":"[object] (ArgumentCountError(code: 0): Too few arguments to function Ellaisys\Cognito\AwsCognito::construct(), 0 passed in /var/www/html/vendor/ellaisys/aws-cognito/src/AwsCognito.php on line 104 and exactly 2 expected at /var/www/html/vendor/ellaisys/aws-cognito/src/AwsCognito.php:88) [stacktrace]

0 /var/www/html/vendor/ellaisys/aws-cognito/src/AwsCognito.php(104): Ellaisys\Cognito\AwsCognito->__construct()

1 /var/www/html/app/Providers/AppServiceProvider.php(23): Ellaisys\Cognito\AwsCognito::ignoreMigrations()

2 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(868): App\Providers\AppServiceProvider->register()

3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php(75): Illuminate\Foundation\Application->register()

4 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(843): Illuminate\Foundation\ProviderRepository->load()

5 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterProviders.php(37): Illuminate\Foundation\Application->registerConfiguredProviders()

6 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(316): Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap()

7 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(473): Illuminate\Foundation\Application->bootstrapWith()

8 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(195): Illuminate\Foundation\Console\Kernel->bootstrap()

9 /var/www/html/artisan(35): Illuminate\Foundation\Console\Kernel->handle()

10 {main}

"} `