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

Disable asterisk char escaping + Add $escape parameter to several methods of Result #612

Merged
merged 10 commits into from
Jun 26, 2023

Conversation

vjik
Copy link
Member

@vjik vjik commented Jun 22, 2023

Q A
Is bugfix? ✔️
New feature? ✔️
Breaks BC?
Fixed issues #610

@what-the-diff
Copy link

what-the-diff bot commented Jun 22, 2023

PR Summary

  • New escape parameter enhancement
    Added a new parameter ($escape) to methods Result::getAttributeErrorMessagesIndexedByPath() and Result::getErrorMessagesIndexedByPath() for customizing or disabling the escape symbol in value path elements.
  • Bug fix for escaping asterisk character
    Fixed a bug that caused improper escaping of the asterisk character in value paths returned by Error::getValuePath(true).
  • Updated methods for escape parameter
    Modified Error::getValuePath, Result::getErrorMessagesIndexedByPath, and Result::getAttributeErrorMessagesIndexedByPath to accept new parameters relating to escape symbols.
  • New tests for escape functionality
    Added tests to validate the escape functionality in Result::getErrorMessagesIndexedByPath and Result::getAttributeErrorMessagesIndexedByPath methods.

@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (ebf6636) 94.29% compared to head (534faea) 94.30%.

❗ Current head 534faea differs from pull request most recent head 32f9168. Consider uploading reports for the commit 32f9168 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #612      +/-   ##
============================================
+ Coverage     94.29%   94.30%   +0.01%     
- Complexity      746      749       +3     
============================================
  Files            88       88              
  Lines          2277     2281       +4     
============================================
+ Hits           2147     2151       +4     
  Misses          130      130              
Impacted Files Coverage Δ
src/Rule/Nested.php 80.71% <ø> (ø)
src/Error.php 100.00% <100.00%> (ø)
src/Result.php 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vjik vjik requested a review from a team June 22, 2023 18:14
@vjik vjik added the status:code review The pull request needs review. label Jun 22, 2023
src/Error.php Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
docs/guide/en/result.md Outdated Show resolved Hide resolved
src/Error.php Outdated Show resolved Hide resolved
src/Result.php Outdated Show resolved Hide resolved
src/Result.php Outdated Show resolved Hide resolved
tests/ErrorTest.php Outdated Show resolved Hide resolved
@samdark samdark merged commit def3a69 into master Jun 26, 2023
50 of 52 checks passed
@samdark samdark deleted the improve-result-errors branch June 26, 2023 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants