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: exit with success command line status 0 for not implemented things #730

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Dec 22, 2023

PR #711 made sure to return an int command line status from all Symfony command execute functions.

But it returned 1 for commands that are not yet implemented. That causes scripts to fail if they call any of the not-yet-implemented commands. That has resulted in upgrades failing when they previously worked (albeit with some steps not implemented). Although some steps were not yet implemented, the actual upgrade was working.

This PR changes the command line status to 0 for not-yet-implemented things. 0 is success for the command line. That puts the behavior back to the way it was.

See discussion in issue #726

Also, remove phpstan ignoreErrors entries for things that are not errors, Recent versions of phpstan no longer have these false positives, so they are no longer needed in phpstan.neon - this gets phpstan passing in CI.

Copy link

sonarcloud bot commented Dec 22, 2023

@phil-davis phil-davis mentioned this pull request Dec 22, 2023
44 tasks
@phil-davis phil-davis requested a review from IljaN January 2, 2024 04:44
@phil-davis
Copy link
Contributor Author

@jvillafanez @IljaN @jnweiger if anyone is back from leave, please review.

Copy link
Contributor

@jnweiger jnweiger left a comment

Choose a reason for hiding this comment

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

The "not implemented" messages were probably originally meant to abort.
But yeah, backwards compatibility "keep going despite the 'errors'" is more important.

Maybe add a comment that we intend to continue. Or change the messages to something like

$output->writeln('upgrade:backupDb command is not implemented. Continuing anyway...');

But that is only eye-candy.

@phil-davis phil-davis merged commit 2ac652e into master Jan 10, 2024
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the not-implemented-0 branch January 10, 2024 06:11
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