Allow both dry-validation 0.x and 1.x #4379
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This backports the changes done in master in 5d8819f but tries to avoid changing the interface through the use of a class method #call and a Dry::Validation::Result wrapping class using SimpleDelegator that defines #messages.
This allows downstream applications to upgrade to dry-validation 1.x which is necessary if the app uses the
config
gem and wants to use ruby 2.7. This unblocks Hyku from upgrading to Hyrax 2.7.2 and ruby 2.7 (see samvera/hyku#1630).I ran the tests for WorkflowSchema and WorkflowImporter locally with dry-validation 0.13.3 (and dry-struct 0.6.0) as well as dry-validation 1.5.1 (and dry-struct 1.3.0).
@samvera/hyrax-code-reviewers