Active
Project:
Drupal core
Version:
main
Component:
extension system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2012 at 03:13 UTC
Updated:
8 Sep 2023 at 03:12 UTC
Jump to comment: Most recent
Many people argue that install profiles should be nothing else than configuration in the first place.
With the new configuration system, almost all PHP code in an install profile's hook_install() will move to configuration files in a ./config/ subdirectory.
If an install profile needs or wants to do something a module can do, then it should ship with a module.
There's really no reason at all for why the code needs to live directly in the profile.
Comments
Comment #0.0
sunUpdated issue summary.
Comment #0.1
sunUpdated issue summary.
Comment #0.2
sunUpdated issue summary.
Comment #0.3
sunUpdated issue summary.
Comment #1
sunI clarified the impact of CMI on install profiles (in proposal B).
FWIW, I'd strongly prefer proposal B, since it allows us to remove tons of hacks and keep the architecture clean.
Essentially, proposal B degrades an install profile to a simple "pointer" to a (site) directory in which further modules/themes may be found. If that pointer or the directory happens to vanish - e.g., because the subdirectories have been moved into sites/all/* - then nothing bad happens — the system remains to stay functional and operable.
Comment #1.0
sunUpdated issue summary.
Comment #2
catchI added two more issues to the summary.
Comment #3
webchickTurning installation profiles into modules in D7 was an important DX improvement, IMO. They were special "thingies" in D6 and earlier and really difficult to work with. They need a way to declare dependencies, to perform tasks on install, to alter the forms during registration and add/change/remove fields, etc. All of which are things modules do. Why should I have to learn two different ways to do the same things?
At the very least, if we're going to go with option B, an analysis should be done of the top 20 or so distros and find out if it's actually true that "almost all PHP code in an install profile's hook_install() will move to configuration files in a ./config/ subdirectory." I have my doubts.
Comment #4
sunWell, we can happily inject some special code like the following into the Drupal installer:
... or even more custom and less hacky:
... plus probably a dozen other possible ways to achieve the same.
But the important part is:
That's a one-time hack/operation for a clearly defined scope. — We do not continue to support a hack that's an architectural disaster for the entire lifecycle of a Drupal site.
Comment #5
catchEverything that can't, can go in a profile-specific module that ships with the distribution no?
There are many, many places in core, where we have special casing of profiles to avoid them actually working like modules, those need to go.
Comment #6
dkl4 commentedFor background, see the following issue which I believe changed profiles into "full modules" :
Install profiles should be modules with full access to the Drupal API and all it entails(.install files, dependencies, update_x)
http://drupal.org/node/509398
Comment #6.0
dkl4 commentedAdding two issues to summary.
Comment #7
sunComment #8
andypostneeds update about current state of modules storage and hook invocation
Comment #12
andypostBeta is too close
Comment #20
quietone commentedHappened to find this after looking at one of the related issues in the IS. Adding those issues to related issues.
Comment #24
quietone commentedFound another related issue
Comment #26
smustgrave commentedWonder if this. ticket can be closed for #2595663: When installing a profile module it incorrectly gets added to the module list with type module as they have a patch over there.
Comment #28
taggartj commentedFor me in 10.1.3
I had to do something like this
in Drupal\Core\Extension\ExtensionList ....
was upgrading but drush cr was not working / throwing an error
just incase you see "The profile X does not exist."