Problem/Motivation
In Drupal 11 we support both v5 and v6 of justinrainbow/json-schema.
In Drupal 12 we can drop support for v5.
Steps to reproduce
Proposed resolution
Drop support for v5, keep v6 only.
Remaining tasks
Update the constraint in composer.json
Remove the PHPStan ignore in Drupal\jsonapi_response_validator\EventSubscriber\ResourceResponseValidator
Update checks in ComponentValidator and ComponentValidatorTest
Search for any other checks related to the version of the JSON Schema library
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3562477
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3562477-drop-support-for
changes, plain diff MR !15083
Comments
Comment #2
bbralaComment #3
bbralaComment #4
longwaveAt the same time, in ComponentValidator:
and ComponentValidatorTest:
Comment #6
wim leersIndeed, there’s more to be simplified once we no longer support version 5 :)
Comment #7
longwaveWell, let's do this.
Comment #8
bbralaCant really remove the custom validator there?
JsonSchema\Tool\Validator\UriValidator only supports a fixed set of special urls.
So that would mean we need to change
core/modules/system/tests/modules/sdc_test/components/my-cta/my-cta.component.ymlto end up in RelativeReferenceValidator which would mean the type should beuriref or uri-reference.I can change that in the code, but that would kinda mean if there is components with format: uri those might break?
So not too sure about that part.
How to reproduce:
it will fail.
Then
Comment #11
pdureau commentedSorry, i have pushed a rebase to the fork while I just wanted checking the issue.
Comment #12
quietone commentedAdded to the 'other' section of #3449808: [12.x] [meta] Requirements for tagging 12.0.0-beta1
Comment #13
longwaveWe already dropped the dependency on ^5 in #3612963: Drop older dependency versions in Drupal 12, I forgot there was some supporting code here.
Comment #14
quietone commentedComment #15
smustgrave commentedSeems pretty straight forward with teh 5 version dropped already. LGTM.
Comment #17
longwaveCommitted and pushed 4e63537fff2 to main. Thanks!