Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix benchmark command option parser error #1012

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Conversation

zunnu
Copy link
Contributor

@zunnu zunnu commented Jul 29, 2024

Currently calling bin/cake benchmark gives error

[TypeError] Cake\Console\ConsoleInputOption::__construct(): Argument #5 ($default) must be of type string|bool|null, int given, called in <app>/vendor/cakephp/cakephp/src/Console/ConsoleOptionParser.php on lin
e 382 in <app>/vendor/cakephp/cakephp/src/Console/ConsoleInputOption.php on line 107

Stack Trace:

Cake\Console\ConsoleInputOption->__construct() - CORE/src/Console/ConsoleOptionParser.php, line 382
Cake\Console\ConsoleOptionParser->addOption() - ROOT/vendor/cakephp/debug_kit/src/Command/BenchmarkCommand.php, line 178
DebugKit\Command\BenchmarkCommand->buildOptionParser() - CORE/src/Console/BaseCommand.php, line 129
Cake\Console\BaseCommand->getOptionParser() - CORE/src/Console/BaseCommand.php, line 165
Cake\Console\BaseCommand->run() - CORE/src/Console/CommandRunner.php, line 327
Cake\Console\CommandRunner->runCommand() - CORE/src/Console/CommandRunner.php, line 168
Cake\Console\CommandRunner->run() - ROOT/bin/cake.php, line 10
[main] - [main], line 0 

This PR changes the default options parser options to strings from integers

@dereuromark dereuromark merged commit 55745af into cakephp:5.next Jul 29, 2024
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants