-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them
Description
PHP Version
7.4
CodeIgniter4 Version
dev
CodeIgniter4 Installation Method
Git
Which operating systems have you tested for this bug?
Windows
Which server did you use?
cli
Database
No response
What happened?
[Error]
Cannot unpack array with string keys
at SYSTEMPATH\CodeIgniter.php:893
Backtrace:
1 SYSTEMPATH\CodeIgniter.php:467
CodeIgniter\CodeIgniter()->runController()
2 SYSTEMPATH\CodeIgniter.php:346
CodeIgniter\CodeIgniter()->handleRequest()
3 SYSTEMPATH\CLI\Console.php:48
CodeIgniter\CodeIgniter()->run()
4 ROOTPATH\spark:79
CodeIgniter\CLI\Console()->run()
Process finished with exit code 9.
Steps to Reproduce
php.exe spark make:migration a --table
Anything else?
-
Adds options to the list of arguments.
CodeIgniter4/system/HTTP/CLIRequest.php
Line 206 in 7107e78
$this->args[$arg] = $value;
We unpack the array[0 => 'make:migration', 1 => 'a' 'table' => null], which causes an exception.
CodeIgniter4/system/CodeIgniter.php
Lines 892 to 894 in 7107e78
$output = method_exists($class, '_remap') ? $class->_remap($this->method, ...$params) : $class->{$this->method}(...$params); -
The console command tests use the
command()function call, which differs in functionality from calling a command in the console viaspark.
I think that command call tests should be supplemented with a test that simulates calling a command in the console.
Metadata
Metadata
Assignees
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them