Skip to content

[#53] Fixed type mismatch when providing show-run-dates argument to ts:list#54

Open
marcin-jozwikowski wants to merge 1 commit into
ancyrweb:masterfrom
marcin-jozwikowski:fix/typecast_for_show-run-dates
Open

[#53] Fixed type mismatch when providing show-run-dates argument to ts:list#54
marcin-jozwikowski wants to merge 1 commit into
ancyrweb:masterfrom
marcin-jozwikowski:fix/typecast_for_show-run-dates

Conversation

@marcin-jozwikowski

Copy link
Copy Markdown

A simple fix to type mismatch described in issue #53 : introduce a type cast to int.
Added a test to simulate the behaviour that caused the problem. It randomizes the argument to avoid hard-coded false-positives; passes the value as a string to the command; and finally expects everything to work just fine.


$application = new Application();
/** @var Scheduler $scheduler */
$application->add(new ListCommand($scheduler));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to the following? Since today, the package also supports Symfony 8, and Application::add has been removed

$application->addCommands([new ListCommand($scheduler)]);

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