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

Get rid of symfony-exceptions.patch #1815

Merged
merged 2 commits into from
May 22, 2024
Merged

Get rid of symfony-exceptions.patch #1815

merged 2 commits into from
May 22, 2024

Conversation

rmunn
Copy link
Collaborator

@rmunn rmunn commented May 21, 2024

Fixes #1814

Description

We can finally get rid of this hacky "patch a vendor library in place" solution now that PHP exceptions are deriving from the Exception class rather than the Error class.

Screenshots

None; no behavior change.

Checklist

  • I have labeled my PR with: bug, feature, engineering, security fix or testing
  • I have performed a self-review of my own code
  • I have reviewed the title & description of this PR which I will use as the squashed PR commit message
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have enabled auto-merge (optional)

Testing

Testers, use the following instructions against our staging environment. Post your findings as a comment and include any meaningful screenshots, etc.

Describe how to verify your changes and provide any necessary test data.

  • Run make and make sure the site still works.
  • If MongoDB auth is enabled, try changing the MONGODB_PASS env var to an incorrect value to see an exception when you try to go to http://localhost:8080/auth/login

We can finally get rid of this since it seems PHP exceptions are finally
deriving from the Exception class rather than the Error class.
@rmunn rmunn added the engineering Tasks which do not directly relate to a user-facing feature or fix label May 21, 2024
@rmunn rmunn self-assigned this May 21, 2024
@rmunn rmunn requested a review from megahirt May 21, 2024 03:15
Copy link

github-actions bot commented May 21, 2024

Unit Test Results

362 tests   362 ✅  13s ⏱️
 37 suites    0 💤
  1 files      0 ❌

Results for commit e685f1d.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@megahirt megahirt left a comment

Choose a reason for hiding this comment

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

How about we just comment out this feature instead of removing it. That way we can still use it when debugging PHP and need to see what the internal Error is.

This way we can easily re-apply the patch if need be.

Also comment the commented-out lines so it's clear why they exist.
@rmunn
Copy link
Collaborator Author

rmunn commented May 21, 2024

@megahirt - Done. I've brought the patch file back, and simply commented out the lines in the Dockerfile that would apply it. So if this exception-swallowing behavior comes back in the future, it'll be obvious from reading the Dockerfile what to do about it.

@rmunn rmunn requested a review from megahirt May 21, 2024 09:24
Copy link
Collaborator

@megahirt megahirt left a comment

Choose a reason for hiding this comment

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

LGTM!

@rmunn rmunn merged commit 1e5f87b into develop May 22, 2024
17 checks passed
@rmunn rmunn deleted the debt/no-symfony-patching branch May 22, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Tasks which do not directly relate to a user-facing feature or fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debt: Get rid of Symfony exception-handling patch
2 participants