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

Configuration validator improvements #657

Merged
merged 2 commits into from
Oct 20, 2022
Merged

Configuration validator improvements #657

merged 2 commits into from
Oct 20, 2022

Conversation

evansims
Copy link
Member

@evansims evansims commented Oct 19, 2022

Changes

This PR makes improvements to the validation process for the SdkConfiguration and SdkState classes by way of the ConfigurationMixin trait. It now applies more appropriate "dirty" checks and comparisons, and restores previous behavior of raising ConfigurationExceptions rather than TypeErrors when invalid types are passed to the configuration classes.

References

Testing

Run vendor/bin/pest from a local clone of the repo, or review the GitHub status checks below.

Contributor Checklist

@evansims evansims added this to the 8.3.3 milestone Oct 19, 2022
@codecov-commenter
Copy link

Codecov Report

Base: 95.32% // Head: 94.86% // Decreases project coverage by -0.46% ⚠️

Coverage data is based on head (0c79f94) compared to base (e35111c).
Patch coverage: 77.44% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #657      +/-   ##
============================================
- Coverage     95.32%   94.86%   -0.47%     
- Complexity     1204     1239      +35     
============================================
  Files            65       65              
  Lines          4153     4186      +33     
============================================
+ Hits           3959     3971      +12     
- Misses          194      215      +21     
Impacted Files Coverage Δ
src/Configuration/SdkConfiguration.php 73.71% <73.41%> (-1.24%) ⬇️
src/Configuration/SdkState.php 71.79% <79.16%> (+2.15%) ⬆️
src/Mixins/ConfigurableMixin.php 56.20% <86.66%> (-2.77%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@evansims evansims marked this pull request as ready for review October 19, 2022 17:39
@evansims evansims requested a review from a team as a code owner October 19, 2022 17:39
@evansims evansims merged commit 9333bea into main Oct 20, 2022
@evansims evansims deleted the fix/config-validators branch October 20, 2022 01:00
github-actions bot pushed a commit that referenced this pull request Oct 20, 2022
* Configuration validator improvements

* Adjust type in cookieSecure state check
@evansims evansims mentioned this pull request Oct 20, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants