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: accessing settings during database reset causes error (resolves #2106) #2134

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

jobara
Copy link
Collaborator

@jobara jobara commented Feb 9, 2024

Resolves #2106

  • Updates php artisan app:refresh-dev to pre-render the 503 error page
  • Updates the settings helper function to return the default if the settings database table isn't present
  • Sets defaults when checking the settings for the phone number and address

Prerequisites

If this PR changes PHP code or dependencies:

  • I've run composer format and fixed any code formatting issues.
  • I've run composer analyze and addressed any static analysis issues.
  • I've run php artisan test and ensured that all tests pass.
  • I've run composer localize to update localization source files and committed any changes.

If this PR changes CSS or JavaScript code or dependencies:

  • I've run npm run lint and fixed any linting issues.
  • I've run npm run build and ensured that CSS and JavaScript assets can be compiled.

@jobara jobara added this to the 1.3.0 milestone Feb 9, 2024
@jobara jobara requested a review from marvinroman February 9, 2024 12:37
@jobara jobara enabled auto-merge (squash) February 9, 2024 12:37
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (449dff5) 97.94% compared to head (ec2751d) 97.93%.
Report is 1 commits behind head on dev.

Files Patch % Lines
app/helpers.php 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #2134      +/-   ##
============================================
- Coverage     97.94%   97.93%   -0.01%     
  Complexity     2145     2145              
============================================
  Files           333      333              
  Lines          9789     9791       +2     
============================================
+ Hits           9588     9589       +1     
- Misses          201      202       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marvinroman
Copy link
Contributor

I ran the same test locally on a container built with the jobara:GH-2106.

I was no longer able to duplicate any of the errors when running php artisan app:refresh-dev

@jobara
Copy link
Collaborator Author

jobara commented Feb 12, 2024

As a note, I wasn't able to test the case from the settings function where the table doesn't exist. I could drop the table, but it was causing other tests to break, so I've left it off. Hence the drop in coverage.

@jobara jobara disabled auto-merge February 12, 2024 12:08
@jobara jobara enabled auto-merge (squash) February 12, 2024 12:08
@jobara jobara disabled auto-merge February 12, 2024 12:08
@jobara jobara merged commit 700eeca into accessibility-exchange:dev Feb 12, 2024
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select name, payload from `se...
2 participants