Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force autoconfigure for schema services #449

Merged
merged 5 commits into from Feb 26, 2021

Conversation

leoloso
Copy link
Collaborator

@leoloso leoloso commented Feb 26, 2021

Before, if $skipSchema is true, 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:

  • Schema services are always registered in the container
  • But, if $skipSchema is true, they are just not initialized

Schema services are all of the AttachExtension type. Hence, "not initialized" means that they do not execute their attach method.

To do this, we created a new ForceAutoconfigureYamlFileLoader class which will always set the default autoconfigure option in the container, with value !$skipSchema.

And then, in the CompilerPass to register all AttachExtension objects in the registry, we only register those objects with autoconfigure => true (i.e. $skipSchema => false)

@leoloso leoloso merged commit e87c308 into master Feb 26, 2021
@leoloso leoloso deleted the force-autoconfigure-for-schema-services branch February 26, 2021 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant