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

Handle HTTP status code for BEditaClientException #44

Merged
merged 3 commits into from
Jun 11, 2021

Conversation

batopa
Copy link
Member

@batopa batopa commented Jun 11, 2021

This PR fix a wrong behavior in ExceptionRenderer introduced after the upgrade to CakePHP 4.2.
The template used for rendering error was wrong when occurs a BEditaClientException because CakePHP ExceptionRenderer set the HTTP status code just for HttpException.

Ref: https://book.cakephp.org/4/en/appendices/4-2-migration-guide.html#error

Bonus track
Introduce PHP Code Sniffer configuration that replace the cs-setup script.

@batopa batopa added the bug Something isn't working label Jun 11, 2021
@codecov
Copy link

codecov bot commented Jun 11, 2021

Codecov Report

Merging #44 (8508a89) into master (bc33adc) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #44      +/-   ##
============================================
+ Coverage     90.25%   90.33%   +0.07%     
- Complexity      189      191       +2     
============================================
  Files            19       19              
  Lines           503      507       +4     
============================================
+ Hits            454      458       +4     
  Misses           49       49              
Impacted Files Coverage Δ
src/Error/ExceptionRenderer.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc33adc...8508a89. Read the comment docs.

@stefanorosanelli stefanorosanelli merged commit 82fc406 into master Jun 11, 2021
@stefanorosanelli stefanorosanelli deleted the fix/exception-renderer-status-code branch June 11, 2021 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants