Problem/Motivation
We have a nice ConfigSchemaChecker
in core which we use for testing. We do not enable it by default (i.e. "on production") for performance reasons and because schema violations are generally developer errors and shouldn't occur on stable systems.
However, for local development environments, it would be great to enable ConfigSchemaChecker
.
Proposed resolution
We already have a mechanism for standardizing best-practice development settings: example.settings.local.php
and development.services.yml
.
Let's add \Drupal\Core\Config\Testing\ConfigSchemaChecker
to development.services.yml
. Consider adding a todo to move it out of the Testing
namespace in D9.
And decide on the namespace. There was an initial suggestion of 'Drupal\Core\Config\Schema\ConfigSchemaChecker'. And later the patch used '\Drupal\Core\Config\Devel\ConfigSchemaChecker', which was changed to '\Drupal\Core\Config\Development\ConfigSchemaChecker'.
Is the current namespace '\Drupal\Core\Config\Development\ConfigSchemaChecker' the one to use or something else?
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Instructions | ||
Reroll the patch if it no longer applies. | Instructions |
User interface changes
None.
API changes
Because we recommend copying example.settings.local.php
directly and that directly includes development.services.yml
this constitutes a change in behavior for people that have the local settings enabled. I.e. if they violating config, they will not be able to re-save the config after this change.
Data model changes
None.