- Issue created by @gapple
- First commit to issue fork.
- Merge request !15Issue #3379215: Use Choice config validation constraint → (Closed) created by elber
- last update
over 1 year ago 128 pass - Status changed to Needs review
over 1 year ago 10:16am 4 August 2023 - 🇧🇷Brazil elber Brazil
Hi I just tried to create a basic choice contraint following these docs
https://www.drupal.org/node/3376195
https://symfony.com/doc/current/reference/constraints/Choice.html#basic-usage
- Status changed to Active
over 1 year ago 3:11am 5 August 2023 - 🇨🇦Canada gapple
Thank you for the effort, but that MR is not really helpful.
- The validation constraint definition needs to be conditionally backported, as the CKEditor5 module previously did: https://git.drupalcode.org/project/drupal/-/merge_requests/4352/diffs#18...
- Thecsp_directive_source_list.base
schema can be a static list of options.
-csp_directive_source_list.flags
could be limited to a static list of options. I don't know that the callback is given enough context to limit flags that aren't valid for each directive (e.g.unsafe-inline
doesn't make sense if not on default-src, script-src, or style-src)
-csp_policy.reporting.plugin
could possibly be limited by a callback to the available reporting plugins - 🇨🇦Canada gapple
I think easier to require
^10.2
for2.0.0
, and skip backporting support for<=10.1
in the8.x-1.x
branch. - Status changed to Postponed
about 1 year ago 9:25am 19 January 2024 - 🇨🇦Canada gapple
I think having this as part of 2.1.0, after core support for 8.1 is dropped, since this isn't necessary to introduce in 2.0.0.
- Status changed to Active
5 months ago 8:51am 17 August 2024 - 🇨🇦Canada gapple
There's some additional validation constraints that are useful:
- The reporting plugin id →
- Required / optional mapping keysSome possible future enhancements:
- Only permit the 'flags' property on relevant directives
- Validate the 'flags' values permitted for the respective directive
- Validate directives sequence keys -
gapple →
committed cb16c8ab on 2.x
Issue #3379215 Add validation constraints to config schema
-
gapple →
committed cb16c8ab on 2.x
- Status changed to Fixed
4 months ago 11:56pm 13 September 2024 Automatically closed - issue fixed for 2 weeks with no activity.