-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Do not stop at the first PHP error/warning in files:scan #37944
Conversation
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@@ -236,31 +236,35 @@ | |||
/** | |||
* Initialises some useful tools for the Command | |||
*/ | |||
protected function initTools() { | |||
protected function initTools(OutputInterface $output) { |
Check notice
Code scanning / Psalm
MissingReturnType
Is the full stack trace needed on screen? |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
The full stack trace was there on screen already, I did not change that. |
/backport to stable26 |
/backport to stable25 |
Edit: missed the previous discussion Additionally, summarizing the number of failures somewhere at the end would prevent errors from being unseen from scrolling of the screen with large verbose outputs. |
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Added an error counter. |
The backport to stable25 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable25
git pull origin/stable25
# Create the new backport branch
git checkout -b fix/foo-stable25
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
Summary
The files:scan command sets a custom error handler to show PHP errors. But it stops at the first one, failing the whole scan for one malformed PNG file.
This PR changes that to instead show errors but continue.
Output:
Checklist