Problem/Motivation

Discovered in #3364108: Configuration schema & required keys.

TypedConfigManager does not correctly override all of the methods of its base class, TypedDataManager.

The result is that sometimes it will get confused and NOT use the correct plugin definitions (*.schema.yml files' contents, surfaced by \Drupal\Core\Config\Schema\ConfigSchemaDiscovery), but instead those of the parent class (@DataType plugins).

Steps to reproduce

Proposed resolution

Add the test coverage that was overlooked in #1866610: Introduce Kwalify-inspired schema format for configuration.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3403782

Command icon 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:

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Status: Active » Needs review
wim leers’s picture

I think we should add explicit test coverage for all methods on TypedConfigManager, because it's unclear which code paths work correctly and which ones fail in the way described in the issue summary and demonstrated in the basic test coverage already in the MR.

smustgrave’s picture

Status: Needs review » Needs work

The test added seemed to work. Not sure if this issue is meant to include all test coverage or if that should be a follow up. Could that be noted in IS?

borisson_’s picture

I think the plan is to include all test coverage in this issue, I think that would make the most sense?

wim leers’s picture

Priority: Normal » Major

Bumping to Major given the data corruption/pollution nature of the problem.

heddn’s picture

I think this is what is breaking #3520741: Fix head tests or fix related functionality if necessary. Something between 10.2 and 10.3 changed dramatically enough that this happens all the time with that module.

heddn’s picture

Something is overriding the typedDataManager. Adding a $definition->setTypedDataManager($this->container->get('config.typed')); seems to fix this for the contrib project. I'm not sure we actually want to do more than just do that on the contrib project so I'm going to remove that as a blocker. I've updated the test coverage. But we still want to make sure all the methods are tested i.e. #6.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.