Force autoconfigure for schema services #449
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before, if
$skipSchema
istrue
, then schema services would not be registered in the container.That created a problem: the
ModuleResolver
needs to show the name for those services in the Modules page, but since a disabled module was not registered in the container, we couldn't access its name.This PR changes the procedure:
$skipSchema
istrue
, they are just not initializedSchema services are all of the
AttachExtension
type. Hence, "not initialized" means that they do not execute theirattach
method.To do this, we created a new
ForceAutoconfigureYamlFileLoader
class which will always set the defaultautoconfigure
option in the container, with value!$skipSchema
.And then, in the
CompilerPass
to register allAttachExtension
objects in the registry, we only register those objects withautoconfigure => true
(i.e.$skipSchema => false
)