Skip to content

Unable to create console command on v1.9 #12

@pierlon

Description

@pierlon

Artisan command now fails to be created due to changes in GeneratorCommand.php.

Error:

PHP Fatal error:  Uncaught Error: Call to undefined function Illuminate\Console\config() in /test/vendor/illuminate/console/GeneratorCommand.php:172
Stack trace:
#0 /test/vendor/illuminate/console/GeneratorCommand.php(158): Illuminate\Console\GeneratorCommand->replaceNamespace('<?php\n\nnamespac...', 'Artisan\\Console...')
#1 /test/vendor/illuminate/console/GeneratorCommand.php(70): Illuminate\Console\GeneratorCommand->buildClass('Artisan\\Console...')
#2 [internal function]: Illuminate\Console\GeneratorCommand->handle()
#3 /test/vendor/illuminate/container/BoundMethod.php(29): call_user_func_array(Array, Array)
#4 /test/vendor/illuminate/container/BoundMethod.php(87): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#5 /test/vendor/illuminate/container/BoundMet in  #/test/vendor/illuminate/console/GeneratorCommand.php on line 172

I think the best way to fix this would be to override the function replaceNamespace or the class itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions