Describe the bug
A clear and concise description of what the bug is.
Installation was a breeze:
Start installation command:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
c:\laravel-backend> composer require --dev "kitloong/laravel-migrations-generator"
Active code page: 1252
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^6.4 for kitloong/laravel-migrations-generator
./composer.json has been updated
Running composer update kitloong/laravel-migrations-generator
Loading composer repositories with package information
Updating dependencies
Lock file operations: 7 installs, 0 updates, 0 removals
- Locking doctrine/cache (2.2.0)
- Locking doctrine/dbal (3.4.3)
- Locking doctrine/deprecations (v1.0.0)
- Locking doctrine/event-manager (1.1.2)
- Locking kitloong/laravel-migrations-generator (v6.4.0)
- Locking myclabs/php-enum (1.8.4)
- Locking psr/cache (3.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 7 installs, 0 updates, 0 removals
- Downloading myclabs/php-enum (1.8.4)
- Downloading doctrine/dbal (3.4.3)
- Downloading kitloong/laravel-migrations-generator (v6.4.0)
- Installing doctrine/cache (2.2.0): Extracting archive
- Installing doctrine/deprecations (v1.0.0): Extracting archive
- Installing doctrine/event-manager (1.1.2): Extracting archive
- Installing myclabs/php-enum (1.8.4): Extracting archive
- Installing psr/cache (3.0.0): Extracting archive
- Installing doctrine/dbal (3.4.3): Extracting archive
- Installing kitloong/laravel-migrations-generator (v6.4.0): Extracting archive
Generating optimized autoload files
Illuminate\Foundation\ComposerScripts::postAutoloadDump
INFO Discovering packages.
kitloong/laravel-migrations-generator ....................................................................................................... DONE
laravel/sail ................................................................................................................................ DONE
laravel/sanctum ............................................................................................................................. DONE
laravel/tinker .............................................................................................................................. DONE
nesbot/carbon ............................................................................................................................... DONE
nunomaduro/collision ........................................................................................................................ DONE
nunomaduro/termwind ......................................................................................................................... DONE
spatie/laravel-ignition ..................................................................................................................... DONE
84 packages you are using are looking for funding.
Use the composer fund
command to find out more!
@php artisan vendor:publish --tag=laravel-assets --ansi --force
INFO No publishable resources for tag [laravel-assets].
No security vulnerability advisories found
END INSTALLATION ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2, bootstrap/app.php did not have a $app->withFacades(); ro uncomment
3. ADDED: $app->register(\KitLoong\MigrationsGenerator\MigrationsGeneratorServiceProvider::class);
4. ADDED DB CREDENTIALS TO: config/database.php
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3307'), ==>>> **Changed port from 3306**
'database' => env('DB_DATABASE', '**database name added here**'),
'username' => env('DB_USERNAME', '**user name added here**),
'password' => env('DB_PASSWORD', '**password added here**'),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
- Run
php artisan migrate:generate ...
- See error
Fatal error: Uncaught ReflectionException: Class "config" does not exist in C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php:875
Stack trace:
#0 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php(875): ReflectionClass->__construct('config')
#1 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php(756): Illuminate\Container\Container->build('config')
#2 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(857): Illuminate\Container\Container->resolve('config', Array, true)
#3 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php(692): Illuminate\Foundation\Application->resolve('config', Array)
#4 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(842): Illuminate\Container\Container->make('config', Array)
#5 C:\laravel-backend\vendor\kitloong\laravel-migrations-generator\src\MigrationsGeneratorServiceProvider.php(98): Illuminate\Foundation\Application->make('config')
#6 C:\laravel-backend\vendor\kitloong\laravel-migrations-generator\src\MigrationsGeneratorServiceProvider.php(46): KitLoong\MigrationsGenerator\MigrationsGeneratorServiceProvider->registerConfig()
PS C:\laravel-backend> php artisan migrate:generate
Fatal error: Uncaught ReflectionException: Class "config" does not exist in C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php:875
Stack trace:
#0 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php(875): ReflectionClass->__construct('config')
#1 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php(756): Illuminate\Container\Container->build('config')
#2 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(857): Illuminate\Container\Container->resolve('config', Array, true)
#3 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php(692): Illuminate\Foundation\Application->resolve('config', Array)
#4 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(842): Illuminate\Container\Container->make('config', Array)
#5 C:\laravel-backend\vendor\kitloong\laravel-migrations-generator\src\MigrationsGeneratorServiceProvider.php(98): Illuminate\Foundation\Application->make('config')
#6 C:\laravel-backend\vendor\kitloong\laravel-migrations-generator\src\MigrationsGeneratorServiceProvider.php(46): KitLoong\MigrationsGenerator\MigrationsGeneratorServiceProvider->registerConfig()
#7 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(686): KitLoong\MigrationsGenerator\MigrationsGeneratorServiceProvider->register()#8 C:\laravel-backend\bootstrap\app.php(45): Illuminate\Foundation\Application->register(Object(KitLoong\MigrationsGenerator\MigrationsGeneratorServiceProvider))
#9 C:\laravel-backend\artisan(20): require_once('D:\Dev\limber\A...')
#10 {main}
Next Illuminate\Contracts\Container\BindingResolutionException: Target class [config] does not exist. in C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php:877
Stack trace:
#0 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php(756): Illuminate\Container\Container->build('config')
#1 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(857): Illuminate\Container\Container->resolve('config', Array, true)
#2 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php(692): Illuminate\Foundation\Application->resolve('config', Array)
#3 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(842): Illuminate\Container\Container->make('config', Array)
#4 C:\laravel-backend\vendor\kitloong\laravel-migrations-generator\src\MigrationsGeneratorServiceProvider.php(98): Illuminate\Foundation\Application->make('config')
#5 C:\laravel-backend\vendor\kitloong\laravel-migrations-generator\src\MigrationsGeneratorServiceProvider.php(46): KitLoong\MigrationsGenerator\MigrationsGeneratorServiceProvider->registerConfig()
#6 C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(686): KitLoong\MigrationsGenerator\MigrationsGeneratorServiceProvider->register()#7 C:\laravel-backend\bootstrap\app.php(45): Illuminate\Foundation\Application->register(Object(KitLoong\MigrationsGenerator\MigrationsGeneratorServiceProvider))
#8 C:\laravel-backend\artisan(20): require_once('D:\Dev\limber\A...')
#9 {main}
thrown in C:\laravel-backend\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 877
Details (please complete the following information):
- DB: [e.g. MariaDB]
- DB Version: [e.g. 10.6.5]
- Laravel Version: ^9
- PHP Version: 8.0.13
- Migrations Generator Version: UNKNOWN
Additional context
It does not matter which artisan command I run I continue to get the error message as above
e.g. php artisan serve give the error above and so does an artisan command
How to roll back?