A site's install profile is registered as a module in core.extension config, with a weight of 1000.
This is hardcoded in install_finished(), though patches at #3266057: Allow profiles to define a base/parent profile [continue of #1356276] add a hardcoded value of 1000 in to the Extension component too.
Until this quirk of the profile system is cleaned up, we could add a constant for the value to the relevant class, so it's easier to spot and has documentation.
This should probably be postponed on #3266057: Allow profiles to define a base/parent profile [continue of #1356276], as some patches there have been adding a ProfileHandlerInterface which might be a sensible place to define the constant.
Comments
Comment #2
joachim commentedComment #12
nicxvan commentedLet's add it here https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...
I propose a new section at the very end
# Hook order in profiles
Profiles are hardcoded to have a weight of 1000.
This means xyz....
Comment #13
joachim commented#3266057: Allow profiles to define a base/parent profile [continue of #1356276] now says it'll probably never be in core.
We could put this in ExtensionDiscovery, or create a ProfileHandler for consistency?
Comment #14
nicxvan commentedI added a line on the page documenting that 1000 is the weight.
I don't think a constant is necessary people can see in the core.extension.yml.
I'm going to mark this as fixed.
If you think we need further docs feel free to suggest something here.