Laravel: PHP artisan Command Stopped Working

Jonathan Pitcher
php artisan --version

[Symfony\Component\Debug\Exception\FatalThrowableError]       
Fatal error: Call to a member function getArgument() on null  

Log files...

[2018-02-01 19:26:51] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Fatal error: Call to a member function getArgument() on null in /Library/WebServer/vhosts/mysitename/vendor/laravel/framework/src/Illuminate/Console/Command.php:216
Stack trace:
#0 /Library/WebServer/vhosts/mysitename/app/Console/Commands/ReportMonthlyMembershipAircraftBreakdown.php(69): Illuminate\Console\Command->argument('email')
#1 [internal function]: App\Console\Commands\ReportMonthlyMembershipAircraftBreakdown->__construct()
#2 /Library/WebServer/vhosts/mysitename/vendor/laravel/framework/src/Illuminate/Container/Container.php(783): ReflectionClass->newInstanceArgs(Array)
#3 /Library/WebServer/vhosts/mysitename/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Container\Container->build('App\\Console\\Com...', Array)
#4 /Library/WebServer/vhosts/mysitename/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(697): Illuminate\Container\Container->make('App\\Console\\Com...', Array)
#5 /Library/WebServer/vhosts/mysitename/vendor/laravel/framework/src/Illuminate/Console/Application.php(115): Illuminate\Foundation\Application->make('App\\Console\\Com...')
#6 /Library/WebServer/vhosts/mysitename/vendor/laravel/framework/src/Illuminate/Console/Application.php(129): Illuminate\Console\Application->resolve('App\\Console\\Com...')
#7 /Library/WebServer/vhosts/mysitename/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(237): Illuminate\Console\Application->resolveCommands(Array)
#8 /Library/WebServer/vhosts/mysitename/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Illuminate\Foundation\Console\Kernel->getArtisan()
#9 /Library/WebServer/vhosts/mysitename/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 {main} 

I have deleted my entire vendor folder and tried to reinstate it, and it always gets to here and blows up with the same error.

Generating autoload files
> php artisan clear-compiled
[Symfony\Component\Debug\Exception\FatalThrowableError]       
Fatal error: Call to a member function getArgument() on null  

Here is my version pulled from the file, since I can't run an artisan --version to get it for you.

/**
 * The Laravel framework version.
 *
 * @var string
 */
const VERSION = '5.2.32';

Just looking for any help you can give me. This has happened on both my local copy and the site copy

Jonathan Pitcher

The problem came from having the command

$this->argument in the contructor and not in the handle method.

I just never expected that a console file would stop php artisan --version from stopping to work because of a command file that was not going to be run yet.

Thanks btl for getting me on the right direction.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

php artisan up command not working in laravel?

laravel : php artisan not working

PHP Catchable fatal error : Laravel artisan command not working

Laravel 5.7 - Ckeditor stopped showing after using command 'php artisan make:auth'

Laravel Image Intervention not working in artisan command

Why command "php artisan serve" not working

Php Artisan serve command not serving Laravel 5.8

After update to Laravel 7 php artisan not working

Why symlink not working in php artisan serve in laravel

laravel : php artisan suddenly stop working

php artisan serve not working (laravel 5.6)

php artisan migrate not working in docker and laravel 5

artisan test command is not working, laravel 7.x

laravel artisan command cron job is not working on ubuntu server

Error in Laravel Artisan command

PHP Artisan Tinker not working with Laravel 5.4 and PHP 7.0.1

The command line statement php artisan tinker isn't working

Laravel - Artisan not working

Laravel artisan cron not working

Sass command stopped working

PHP Artisan Custom Command

PHP artisan command no response

Laravel command php artisan serve showing Directory does not exist

Laravel 5.3 - Is it possible to run php artisan command by clicking on a link/button

laravel 5.4 - php artisan migrate command doesn't work

Whats the point of running Laravel with the command 'php artisan serve'?

Laravel php artisan migrate command - no errors and no console output?

Laravel programatically calling artisan command from web.php in production

Laravel | MySQL error when i run php artisan migrate command