-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update the make:publication command #786
Update the make:publication command #786
Conversation
Codecov Report
@@ Coverage Diff @@
## publications-feature #786 +/- ##
==========================================================
- Coverage 100.00% 99.88% -0.12%
+ Complexity 2796 1406 -1390
==========================================================
Files 324 162 -162
Lines 7028 3541 -3487
==========================================================
- Hits 7028 3537 -3491
- Misses 0 4 +4 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
According to the docs (https://laravel.com/docs/9.x/validation#rule-boolean)
Just extracting bools to a helper method that casts to bool changes the generated YAML from Not sure how to allow strings without losing custom validation rules and without too much added code Edit: Think I figured it out b3303aa but we might want to extract that to a custom validation rule that we can swap out the standard one for Resources: https://github.com/illuminate/validation/blob/3f63f1046f67377a64779baaa86d7f1997b5f748/Concerns/ValidatesAttributes.php#L448-L453 |
20e5e0d
to
fe7d71f
Compare
…evelop into publications-feature-refactors
5c68b60
to
1d712b3
Compare
This reverts commit be9d3db.
Some things left to do, moving todos to #685 |
Refactors the
make:publication
command to fix bugs and provide a consistent console UI layer.Fixes:
true
toSTDIN
is the same as writing'true'
)$field->getValidationRules()
instead of$field->type->rules()
as it seems we might be missing checking custom rulesphp hyde make:publication foo
and there are no publications at all, the current message"Error: Unable to locate any publication types. Did you create any?"
might not be entirely relevant.