laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.48k stars 420 forks source link

Failing database migrations #1240

Closed kiwigod closed 2 years ago

kiwigod commented 2 years ago

Description:

All migration commands result in the following exception

developer@ed445aa882f3:/var/www$ php artisan -vvv migrate

In Component.php line 89:

  [Error]                                                                  
  Call to undefined function Illuminate\Console\View\Components\resolve()  

Exception trace:
  at /var/www/vendor/illuminate/console/View/Components/Component.php:89
 Illuminate\Console\View\Components\Component->mutate() at /var/www/vendor/illuminate/console/View/Components/Line.php:44
 Illuminate\Console\View\Components\Line->render() at /var/www/vendor/illuminate/console/View/Components/Info.php:18
 Illuminate\Console\View\Components\Info->render() at /var/www/vendor/illuminate/console/View/Components/Factory.php:56
 Illuminate\Console\View\Components\Factory->__call() at /var/www/vendor/illuminate/database/Console/Migrations/MigrateCommand.php:116
 Illuminate\Database\Console\Migrations\MigrateCommand->prepareDatabase() at /var/www/vendor/illuminate/database/Console/Migrations/MigrateCommand.php:79
 Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations\{closure}() at /var/www/vendor/illuminate/database/Migrations/Migrator.php:607
 Illuminate\Database\Migrations\Migrator->usingConnection() at /var/www/vendor/illuminate/database/Console/Migrations/MigrateCommand.php:103
 Illuminate\Database\Console\Migrations\MigrateCommand->handle() at /var/www/vendor/illuminate/container/BoundMethod.php:36
 Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() at /var/www/vendor/illuminate/container/Util.php:41
 Illuminate\Container\Util::unwrapIfClosure() at /var/www/vendor/illuminate/container/BoundMethod.php:93
 Illuminate\Container\BoundMethod::callBoundMethod() at /var/www/vendor/illuminate/container/BoundMethod.php:37
 Illuminate\Container\BoundMethod::call() at /var/www/vendor/illuminate/container/Container.php:651
 Illuminate\Container\Container->call() at /var/www/vendor/illuminate/console/Command.php:139
 Illuminate\Console\Command->execute() at /var/www/vendor/symfony/console/Command/Command.php:308
 Symfony\Component\Console\Command\Command->run() at /var/www/vendor/illuminate/console/Command.php:124
 Illuminate\Console\Command->run() at /var/www/vendor/symfony/console/Application.php:998
 Symfony\Component\Console\Application->doRunCommand() at /var/www/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at /var/www/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /var/www/vendor/illuminate/console/Application.php:102
 Illuminate\Console\Application->run() at /var/www/vendor/laravel/lumen-framework/src/Console/Kernel.php:116
 Laravel\Lumen\Console\Kernel->handle() at /var/www/artisan:35

Steps To Reproduce:

Run any command related to migrations (make:migration, migrate, migrate:fresh, etc.)

The exception occurs due to a missing helper function, which is present in Laravel, but not in Lumen. Package laravel/framework contains a set of helper functions which has said function: resolve (see link below). Copying this resolve function to a helpers file and including this in the autoloader in my own project resolves the exception above.

https://github.com/laravel/framework/blob/eee833e46de5301aa533ce1b7f5372d375b00fd8/src/Illuminate/Foundation/helpers.php#L701

driesvints commented 2 years ago

This was fixed in the meantime. Thanks

kiwigod commented 2 years ago

@driesvints Could you tell me when this fix will be released approximately? As it stands v9.0.3 is the latest, and does produce this exception.

Thanks in advance

driesvints commented 2 years ago

@kiwigod the issue was in laravel/framework which already is released.