- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I've started building this! π₯³
I've got it working locally already. I'm building on top of π Expose validation constraint violations in Config Inspector UI and drush command Fixed . I'm starting out with Validatability % first, but that means I've got 95% of what we need in place.
Sneak preview:
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
While working on this, I've discovered two blocking core bugs, both of which I've added a work-around for:
- Status changed to Needs review
over 1 year ago 2:58pm 17 May 2023 - last update
over 1 year ago Patch Failed to Apply - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
1/4 done.
-
$ vendor/bin/drush config:inspect --only-error --------------------- ---------- ------------- ---------- Key Status Validatable Data --------------------- ---------- ------------- ---------- editor.editor.cke4 1 errors media.settings Correct 17% 1 errors system.theme.global Correct 38% 1 errors tour.tour.cdn-ui 8 errors update.settings Correct 8% 1 errors --------------------- ---------- ------------- ----------
- Nothing in core is 100% validatable, but when we start making more things validatable, this new flag will be really helpful:
$ vendor/bin/drush config:inspect --only-error --invalidatability-is-error ----------------------------------------------------------- ---------- ------------- ---------- Key Status Validatable Data ----------------------------------------------------------- ---------- ------------- ---------- automated_cron.settings Correct 0% Valid automatic_updates.settings Correct 20% Valid block.block.claro_breadcrumbs Correct 27% Valid block.block.claro_content Correct 27% Valid block.block.claro_help Correct 27% Valid β¦ editor.editor.basic_html Correct 69% Valid β¦ system.menu.footer Correct 40% Valid system.menu.main Correct 40% Valid system.menu.tools Correct 40% Valid β¦ views.view.who_s_new Correct 18% Valid views.view.who_s_online Correct 17% Valid ----------------------------------------------------------- ---------- ------------- ----------
- Let's look at only a few:
$ vendor/bin/drush config:inspect --only-error --invalidatability-is-error --filter-keys=media.settings,system.theme.global --------------------- --------- ------------- ---------- Key Status Validatable Data --------------------- --------- ------------- ---------- media.settings Correct 17% 1 errors system.theme.global Correct 38% 1 errors --------------------- --------- ------------- ----------
- Let's add detail:
$ vendor/bin/drush config:inspect --only-error --invalidatability-is-error --filter-keys=media.settings,system.theme.global --detail ------------------------------ --------- ------------- ----------------------------------------------------- Key Status Validatable Data ------------------------------ --------- ------------- ----------------------------------------------------- _core Correct NOT _core.default_config_hash Correct NOT icon_base_uri Correct NOT iframe_domain Correct NOT oembed_providers_url Correct NOT media.settings:iframe_domain Correct This value should be of the correct primitive type. favicon Correct NOT favicon.mimetype Correct NOT favicon.path Correct NOT favicon.url Correct NOT features Correct NOT logo Correct NOT logo.path Correct NOT logo.url Correct NOT system.theme.global:logo.url Correct This value should be of the correct primitive type. ------------------------------ --------- ------------- -----------------------------------------------------
This looks surprisingly simple but took me MULTIPLE DAYS to put together! π±
-
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
π Expose validation constraint violations in Config Inspector UI and drush command Fixed landed! Now this patch will apply. Re-testing.
- last update
over 1 year ago 3 pass - ππΊHungary GΓ‘bor Hojtsy Hungary
The code updates look good :) The only thing I am stuck on is whether "invalidatability" is a word or a good word at least? When I tried googling for it, Google suggested "invalidate ability" which means an entirely different thing. Should it be "--strict-validation" or only "--strict" even?
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
But "strict" already has a particular meaning in the config schema world:
\Drupal\KernelTests\KernelTestBase::$strictConfigSchema
:/** * Set to TRUE to strict check all configuration saved. * * @see \Drupal\Core\Config\Development\ConfigSchemaChecker * * @var bool */ protected $strictConfigSchema = TRUE;
IMHO "validatability" is just fine. Yes, it's kinda like "cacheability" in how little it was used. But it's perfectly valid English. And there is prior use of it beyond Drupal β for example
\Symfony\Component\HttpFoundation\Response::isValidateable()
.How about
--invalidatable-is-error
or--not-validatable-is-error
- last update
over 1 year ago 2 pass, 2 fail - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Now validatability is shown in the UI π
Next up: showing validation constraints.
The last submitted patch, 14: 3216089-14.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs work
over 1 year ago 9:51am 19 May 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Thanks to #14 I noticed that
media.settings
has the typeuri
yet is marked as not validatable. That is not correct.The problem:
interface UriInterface extends PrimitiveInterface
β note that this does not inheritStringInterface
yetclass Uri extends StringData implements UriInterface
which means that due toclass StringData extends PrimitiveBase implements StringInterface
β¦
Uri
implementsStringInterface
too π€ͺI didn't account for that in
::computeNodeValidatability()
. Fixed. - Status changed to Needs review
over 1 year ago 9:53am 19 May 2023 - last update
over 1 year ago PHPLint Failed - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
- ππΊHungary GΓ‘bor Hojtsy Hungary
I was thinking
--error-if-invalid
but that would be about the validation result not that it can be validated or not. Hm.--error-if-not-validateable
could be an option but I'm still not 100% convinced :D It has a very particular spelling that may be easy to get wrong. - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Maybe "strict" is fine. π€ Because we'd eventually want
\Drupal\KernelTests\KernelTestBase::$strictConfigSchema
to actually validate things too.So β¦ perhaps this is even appropriate! π
I'll update the patch and open a core issue for doing exactly that.
- Status changed to Needs work
over 1 year ago 10:59am 19 May 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
+++ b/src/Commands/InspectorCommands.php @@ -104,19 +128,36 @@ class InspectorCommands extends DrushCommands { + if ($detail) { + foreach ($raw_validatability->getValidatabilityPerPropertyPath() as $property_path => $is_validatable) { + // Skip validatable property paths. + if ($onlyError && $invalidatability_is_error && $is_validatable === TRUE) { + continue; + } + $rows[$property_path] = ['key' => $property_path, 'status' => $status, 'validatability' => $is_validatable ? dt('Validatable') : dt('NOT'), 'data' => NULL]; + } + } + // Continue to validating the data: even with incomplete + // validatability that is valuable to check.
π This means that first "detail" rows are generated for each property path β¦ and then we continue on toward validating, which results in output like this:
$ vendor/bin/drush config:inspect --invalidatability-is-error --filter-keys=media.settings --detail ------------------------------------------ --------- ------------- ----------------------------------------------------- Key Status Validatable Data ------------------------------------------ --------- ------------- ----------------------------------------------------- media.settings:_core Correct NOT media.settings:_core.default_config_hash Correct NOT media.settings:icon_base_uri Correct NOT media.settings:iframe_domain Correct Validatable media.settings:oembed_providers_url Correct Validatable media.settings:standalone_url Correct NOT media.settings:_core Correct Valid media.settings:_core.default_config_hash Correct Valid media.settings:icon_base_uri Correct Valid media.settings:iframe_domain Correct This value should be of the correct primitive type. media.settings:oembed_providers_url Correct Valid media.settings:standalone_url Correct Valid ------------------------------------------ --------- ------------- -----------------------------------------------------
π Each property path is listed TWICE: once for "validatability" detail, once for "data validity" detail.
That should of course be combined.
- Status changed to Needs review
over 1 year ago 11:03am 19 May 2023 - last update
over 1 year ago 3 pass - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
This is better:
$ vendor/bin/drush config:inspect --invalidatability-is-error --filter-keys=media.settings --detail ------------------------------------------- --------- ------------- ----------------------------------------------------- Key Status Validatable Data ------------------------------------------- --------- ------------- ----------------------------------------------------- media.settings Correct 33% 1 errors media.settings:_core Correct NOT Valid media.settings:_core.default_config_hash Correct NOT Valid media.settings:icon_base_uri Correct NOT Valid media.settings:iframe_domain Correct Validatable This value should be of the correct primitive type. media.settings:oembed_providers_url Correct Validatable Valid media.settings:standalone_url Correct NOT Valid ------------------------------------------- --------- ------------- -----------------------------------------------------
I took the liberty of slightly changing how
--detail
works. Rather than showing only details, I'm now also keeping the row for the containing config. Because that gives you a valuable high-level perspective: the % of validatability and the number of errors. Given the increase in information provided, I think this is a reasonable change.Also fixed the PHPLint error (which does not occur on PHP 8, hence I missed it).
- last update
over 1 year ago 3 pass - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I changed it to use
--strict
but ran into$ vendor/bin/drush config:inspect --strict --filter-keys=media.settings --detail PHP Fatal error: Uncaught TypeError: Drush\Preflight\PreflightArgs::setStrict(): Argument #1 ($strict) must be of type bool, null given in /Users/wim.leers/core/vendor/drush/drush/src/Preflight/PreflightArgs.php:453 Stack trace: #0 [internal function]: Drush\Preflight\PreflightArgs->setStrict(NULL) #1 /Users/wim.leers/core/vendor/drush/drush/src/Preflight/ArgsPreprocessor.php(85): call_user_func(Array, NULL)
β¦ turns out
drush
reserves this argument:\Drush\Preflight\PreflightArgs::isStrict()
π€·ββοΈSo
--strict-validation
it is! - last update
over 1 year ago 3 pass - last update
over 1 year ago 3 pass - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Noticed a bug introduced in #16 while verifying that the output for #23 still matched that of earlier patch iterations (it did β until #16 as expected, which is how I spotted this bug) β I inverted the condition there but forgot about one of the documented edge cases:
BooleanInterface
. Correctly handling that again results in significantly higher percentage of validatability, because a lot of config schemas usetype: boolean
. - last update
over 1 year ago 3 pass - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
β¦ but I really believe that such a bulleted list just does not give enough context. I think symbols can provide a lot of clarity here, without the need for adding a lot of additional words:
P.S.: I went all the way, and made this work well in RTL contexts too:
- Issue was unassigned.
- last update
over 1 year ago 3 pass - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
And now, the ability to list constraints using
--list-constraints
in Drush:-
Let's look at my module's config:
$ vendor/bin/drush config:inspect --filter-keys=cdn.settings -------------- --------- ------------- ------- Key Status Validatable Data -------------- --------- ------------- ------- cdn.settings Correct 36% Valid -------------- --------- ------------- -------
- Let's add detail:
$ vendor/bin/drush config:inspect --filter-keys=cdn.settings --detail ----------------------------------------- --------- ------------- ------- Key Status Validatable Data ----------------------------------------- --------- ------------- ------- cdn.settings Correct 36% Valid cdn.settings: Correct NOT Valid cdn.settings:_core Correct NOT Valid cdn.settings:_core.default_config_hash Correct NOT Valid cdn.settings:farfuture Correct NOT Valid cdn.settings:farfuture.status Correct Validatable Valid cdn.settings:langcode Correct NOT Valid cdn.settings:mapping Correct NOT Valid cdn.settings:mapping.conditions Correct NOT Valid cdn.settings:mapping.domain Correct Validatable Valid cdn.settings:mapping.type Correct NOT Valid cdn.settings:scheme Correct Validatable Valid cdn.settings:status Correct Validatable Valid cdn.settings:stream_wrappers Correct NOT Valid cdn.settings:stream_wrappers.0 Correct Validatable Valid ----------------------------------------- --------- ------------- -------
- Let's list the constraints too:
$ vendor/bin/drush config:inspect --filter-keys=cdn.settings --detail --list-constraints ----------------------------------------- --------- ------------- ------- ----------------------------------------------------------------------------- Key Status Validatable Data Validation constraints ----------------------------------------- --------- ------------- ------- ----------------------------------------------------------------------------- cdn.settings Correct 36% Valid cdn.settings: Correct NOT Valid cdn.settings:_core Correct NOT Valid cdn.settings:_core.default_config_hash Correct NOT Valid cdn.settings:farfuture Correct NOT Valid cdn.settings:farfuture.status Correct Validatable Valid Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraint cdn.settings:langcode Correct NOT Valid cdn.settings:mapping Correct NOT Valid cdn.settings:mapping.conditions Correct NOT Valid cdn.settings:mapping.domain Correct Validatable Valid Drupal\cdn\Plugin\Validation\Constraint\CdnDomainConstraint Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraint cdn.settings:mapping.type Correct NOT Valid cdn.settings:scheme Correct Validatable Valid Drupal\cdn\Plugin\Validation\Constraint\CdnSchemeConstraint Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraint cdn.settings:status Correct Validatable Valid Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraint cdn.settings:stream_wrappers Correct NOT Valid cdn.settings:stream_wrappers.0 Correct Validatable Valid Drupal\cdn\Plugin\Validation\Constraint\CdnStreamWrapperConstraint Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraint ----------------------------------------- --------- ------------- ------- -----------------------------------------------------------------------------
- Great, now let's limit it to errors only:
$ vendor/bin/drush config:inspect --filter-keys=cdn.settings --detail --list-constraints --only-error ----- -------- ------------- ------ ------------------------ Key Status Validatable Data Validation constraints ----- -------- ------------- ------ ------------------------
- That listed nothing because the config schema is valid and all data is valid. So now let's enable the strict validation mode:
$ vendor/bin/drush config:inspect --filter-keys=cdn.settings --detail --list-constraints --only-error --strict-validation ----------------------------------------- --------- ------------- ------- ------------------------ Key Status Validatable Data Validation constraints ----------------------------------------- --------- ------------- ------- ------------------------ cdn.settings Correct 36% Valid cdn.settings: Correct NOT Valid cdn.settings:_core Correct NOT Valid cdn.settings:_core.default_config_hash Correct NOT Valid cdn.settings:farfuture Correct NOT Valid cdn.settings:langcode Correct NOT Valid cdn.settings:mapping Correct NOT Valid cdn.settings:mapping.conditions Correct NOT Valid cdn.settings:mapping.type Correct NOT Valid cdn.settings:stream_wrappers Correct NOT Valid ----------------------------------------- --------- ------------- ------- ------------------------
I think/hope this proves that this all works great now. Let's switch to the example I used for showing the validatability before:
media.settings
:$ vendor/bin/drush config:inspect --filter-keys=media.settings --detail --list-constraints --only-error --strict-validation ------------------------------------------- --------- ------------- ----------------------------------------------------- -------------------------------------------------------- Key Status Validatable Data Validation constraints ------------------------------------------- --------- ------------- ----------------------------------------------------- -------------------------------------------------------- media.settings Correct 43% 1 errors media.settings: Correct NOT Valid media.settings:_core Correct NOT Valid media.settings:_core.default_config_hash Correct NOT Valid media.settings:icon_base_uri Correct NOT Valid media.settings:iframe_domain Correct Validatable This value should be of the correct primitive type. Drupal\Core\Validation\Plugin\Validation\Constraint\Pr imitiveTypeConstraint ------------------------------------------- --------- ------------- ----------------------------------------------------- --------------------------------------------------------
That's the same command as the one above, just replacing
cdn.settings
withmedia.settings
. Makes sense to me!IMHO this is ready now. An idea for a follow-up could be to distinguish between inherited constraints vs local constraints β that would make it clear that for example the
_core
key (which is present in bothcdn.settings
andmedia.settings
's Drush output) actually is of the type_core_config_info
β so adding a validation constraint there would fix it everywhere. -
Let's look at my module's config:
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Another follow-up would be to map the FQCNs to the equivalent types:
\Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraint
would becomePrimitiveType
because of
* @Constraint( * id = "PrimitiveType", * label = @Translation("Primitive type", context = "Validation") * )
\Drupal\cdn\Plugin\Validation\Constraint\CdnDomainConstraint
would becomeCdnDomain
because of
* @Constraint( * id = "CdnDomain", * label = @Translation("CDN domain", context = "Validation"), * )
- and so on
β¦ but that's really just a nice-to-have compared to today, where this information is still painfully difficult to access.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
RE: "strict" β created π KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate Fixed for core.
- Status changed to Needs work
over 1 year ago 3:10pm 19 May 2023 - ππΊHungary GΓ‘bor Hojtsy Hungary
Looks great overall! I think there is a disconnect where we say the data is not validatable and then we say the data is valid :) Can we unbreak the terminology mismatch there?
- Status changed to Needs review
over 1 year ago 3:54pm 19 May 2023 - last update
over 1 year ago 3 pass - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Good call!
I was not happy about that either.
Having worked on π KernelTestBase::$strictConfigSchema = TRUE and BrowserTestBase::$strictConfigSchema = TRUE do not actually strictly validate Fixed in the mean time, I think I know how to distinguish:
Valid
(when actually properly validatable) vsCorrect primitive type
(when no real validation constraints are present, only primitive type is being checked):$ vendor/bin/drush config:inspect --filter-keys=system.theme.global --detail --strict-validation --------------------------------------------------------- --------- ------------- ----------------------------------------------------- Key Status Validatable Data --------------------------------------------------------- --------- ------------- ----------------------------------------------------- system.theme.global Correct 53% 1 errors system.theme.global: Correct NOT Correct primitive type system.theme.global:_core Correct Validatable Valid system.theme.global:_core.default_config_hash Correct Validatable Valid system.theme.global:favicon Correct NOT Correct primitive type system.theme.global:favicon.mimetype Correct NOT Correct primitive type system.theme.global:favicon.path Correct NOT Correct primitive type system.theme.global:favicon.url Correct NOT Correct primitive type system.theme.global:favicon.use_default Correct Validatable Valid system.theme.global:features Correct NOT Correct primitive type system.theme.global:features.comment_user_picture Correct Validatable Valid system.theme.global:features.comment_user_verification Correct Validatable Valid system.theme.global:features.favicon Correct Validatable Valid system.theme.global:features.node_user_picture Correct Validatable Valid system.theme.global:logo Correct NOT Correct primitive type system.theme.global:logo.path Correct NOT Correct primitive type system.theme.global:logo.url Correct Validatable This value should be of the correct primitive type. system.theme.global:logo.use_default Correct Validatable Valid --------------------------------------------------------- --------- ------------- -----------------------------------------------------
and in the UI:
What do you think?
- π«π·France andypost
Thank you Wim! It's very helpful and require to fix previous commit...
But when I'm looking at report in browser/drush the amount of duplicated
Correct primitive type
makes my eyes skip errors because errors are shorter and less visible (skimmable)As this value is displayed for every non-error line it could be added to "legend" (above or below table) to prevent printing expected defaults on each line.
On fresh core install 10.1.x it shows only 2 errors and no performance affected
$ time drush config:inspect --only-error --list-constraints --detail ------------------------------- --------- ------------- ----------------------------------------------------- ------------------------------------------------------------- Key Status Validatable Data Validation constraints ------------------------------- --------- ------------- ----------------------------------------------------- ------------------------------------------------------------- system.theme.global Correct 41% 1 errors system.theme.global:logo.url Correct Validatable This value should be of the correct primitive type. Drupal\Core\Validation\Plugin\Validation\Constraint\Primiti veTypeConstraint update.settings Correct 14% 1 errors update.settings:fetch.url Correct Validatable This value should be of the correct primitive type. Drupal\Core\Validation\Plugin\Validation\Constraint\Primiti veTypeConstraint ------------------------------- --------- ------------- ----------------------------------------------------- ------------------------------------------------------------- real 0m 2.66s user 0m 2.40s sys 0m 0.23s
btw I can't install module for 11.x branch)
+++ b/src/Commands/InspectorCommands.php @@ -104,43 +138,113 @@ class InspectorCommands extends DrushCommands { + $validatability = dt('@validatability%', ['@validatability' => intval($raw_validatability->computePercentage() * 100)]); ... $rows[$name] = ['key' => $name, 'status' => $status, 'validatability' => $validatability, 'data' => $data];
Moreover without this patch the variable is undefined in current 2.1.x branch
- Status changed to Needs work
over 1 year ago 7:07am 22 May 2023 - ππΊHungary GΓ‘bor Hojtsy Hungary
I agree with @andypost that a shorter result would be better with a legend if needed, especially in the drush result.
- Status changed to Needs review
over 1 year ago 5:02pm 22 May 2023 - last update
over 1 year ago 3 pass - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Adding a legend is trivial per https://symfony.com/doc/current/components/console/helpers/table.html#sp.... We could choose to add it at the top or bottom.
But β¦
\Consolidation\OutputFormatters\FormatterManager::write()
's unavoidable call to\Consolidation\OutputFormatters\FormatterManager::validateAndRestructure()
unfortunately forcefully requires every row to contain the columns that all other rows have.After a LOT of searching and trial and error I found a way to make it work. But this only allows us putting the legend at the top. (Which is probably preferable anyway.) This is the result:
$ vendor/bin/drush config:inspect --filter-keys=media.settings --strict-validation --detail Legend for Data: β β β Correct primitive type, detailed validation impossible. β β β Correct primitive type, passed all validation constraints. -------------------------------- --------- ------------- ------------------------------------- Key Status Validatable Data -------------------------------- --------- ------------- ------------------------------------- media.settings Correct 43% 1 errors media.settings: Correct NOT β β media.settings:_core Correct NOT β β media.settings:_core.default_ Correct NOT β β config_hash media.settings:icon_base_uri Correct NOT β β media.settings:iframe_domain Correct Validatable This value should be of the correct primitive type. media.settings:oembed_provide Correct Validatable β β rs_url media.settings:standalone_url Correct Validatable β β -------------------------------- --------- ------------- -------------------------------------
Note that the legend only appears when needed:
$ vendor/bin/drush config:inspect --filter-keys=media.settings --strict-validation ---------------- --------- ------------- ---------- Key Status Validatable Data ---------------- --------- ------------- ---------- media.settings Correct 43% 1 errors ---------------- --------- ------------- ----------
and
$ vendor/bin/drush config:inspect --filter-keys=media.settings --strict-validation --detail --fields=key,status,validatability ------------------------------------------- --------- ------------- Key Status Validatable ------------------------------------------- --------- ------------- media.settings Correct 43% media.settings: Correct NOT media.settings:_core Correct NOT media.settings:_core.default_config_hash Correct NOT media.settings:icon_base_uri Correct NOT media.settings:iframe_domain Correct Validatable media.settings:oembed_providers_url Correct Validatable media.settings:standalone_url Correct Validatable ------------------------------------------- --------- -------------
I also made it stand out visually:
Finally, I made this work in the UI too:
- Status changed to RTBC
over 1 year ago 7:02pm 22 May 2023 - last update
over 1 year ago 3 pass - ππΊHungary GΓ‘bor Hojtsy Hungary
Rerolled following π Config inspection should wipe relevant caches to always get up-to-date results Fixed . Let's make sure it passes our smoke tests.
- 89100229 committed on 2.1.x
Issue #3216089 by Wim Leers, GΓ‘bor Hojtsy, andypost, vuil: Expose...
- 89100229 committed on 2.1.x
- Status changed to Fixed
over 1 year ago 7:30am 23 May 2023 - ππΊHungary GΓ‘bor Hojtsy Hungary
Yay, committed! We can refine this forward as needed.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
AWESOME! ππ₯³π
I already started working on what I said in #27 and #28:
An idea for a follow-up could be to distinguish between inherited constraints vs local constraints β that would make it clear that for example the
_core
key (which is present in bothcdn.settings
andmedia.settings
's Drush output) actually is of the type_core_config_info
β so adding a validation constraint there would fix it everywhere.+
Another follow-up would be to map the FQCNs to the equivalent types:
\Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraint
would becomePrimitiveType
because of
* @Constraint( * id = "PrimitiveType", * label = @Translation("Primitive type", context = "Validation") * )
\Drupal\cdn\Plugin\Validation\Constraint\CdnDomainConstraint
would becomeCdnDomain
because of
* @Constraint( * id = "CdnDomain", * label = @Translation("CDN domain", context = "Validation"), * )
- and so on
β¦ but that's really just a nice-to-have compared to today, where this information is still painfully difficult to access.
Stay tuned!
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Ooh, shiny. Nice work!
- π³π±Netherlands ronaldtebrake
Awesome work, looking forward to using this!
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Kept my promise, see π Improve display of validation constraints: constraint IDs instead of FQCNs and local vs inherited Fixed π
Automatically closed - issue fixed for 2 weeks with no activity.