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

Add tests for and refactor publication field type validation rules #765

Merged

Conversation

caendesilva
Copy link
Member

No description provided.

@caendesilva caendesilva changed the base branch from master to publications-feature December 19, 2022 20:23
@caendesilva caendesilva changed the title Test and refactor publication field type validation rules Add tests for and refactor publication field type validation rules Dec 19, 2022
Copy link
Member Author

@caendesilva caendesilva left a comment

Choose a reason for hiding this comment

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

@rgasch Whenever you have time over, please take a look at my comments and questions.

@codecov
Copy link

codecov bot commented Dec 19, 2022

Codecov Report

Merging #765 (353e66d) into publications-feature (4eca4e3) will increase coverage by 1.00%.
The diff coverage is n/a.

@@                    Coverage Diff                     @@
##             publications-feature     #765      +/-   ##
==========================================================
+ Coverage                   96.87%   97.87%   +1.00%     
+ Complexity                   2754     1379    -1375     
==========================================================
  Files                         320      160     -160     
  Lines                        7610     3811    -3799     
==========================================================
- Hits                         7372     3730    -3642     
+ Misses                        238       81     -157     
Impacted Files Coverage Δ
.../Features/Publications/Models/PublicationField.php
...rc/Framework/Exceptions/BaseUrlNotSetException.php
...rk/src/Framework/Factories/HydePageDataFactory.php
...c/Framework/Concerns/Internal/MockableFeatures.php
...s/framework/src/Support/Filesystem/ProjectFile.php
...ckages/framework/src/Foundation/Facades/Router.php
...eatures/Publications/Models/PaginationSettings.php
...rk/Features/Blogging/Models/LocalFeaturedImage.php
...framework/src/Console/Commands/MakePageCommand.php
...Markdown/Processing/CodeblockFilepathProcessor.php
... and 151 more

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

@caendesilva caendesilva marked this pull request as ready for review December 21, 2022 15:02
@caendesilva
Copy link
Member Author

The range validations add a very large amount of complexity. I'm starting to think about how much we really need them. Sure length validation for article descriptions might be good, but do we really need to validate date ranges and integer values? Maybe it would be better to allow arbitrary Laravel validation rules to be specified in the schema file instead of its min/max values.

@caendesilva caendesilva merged commit 8583d3c into publications-feature Dec 21, 2022
@caendesilva caendesilva deleted the test-and-refactor-publication-validation-rules branch December 21, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants