Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The devel menu config is installed through dev/config/install, and uninstalled through hook_uninstall. It works nice most of the time, but Drupal doesn't know that this menu is dependent on the devel module.
This can be an issue under certain circumstances, such as a partial config import (and notably https://github.com/drush-ops/drush/issues/1820#issuecomment-178672382).
There is a Drupal answer to this problem: https://www.drupal.org/node/2404447
It has the other advantage to make the devel_uninstall() function useless.
Comment | File | Size | Author |
---|---|---|---|
#12 | add_enforced_dependency-2663558-12.patch | 4.03 KB | willzyx |
#11 | devel-menu-enforced-dependency-2663558-11.patch | 849 bytes | GaëlG |
devel-menu-enforced-dependency.patch | 834 bytes | GaëlG | |
|
Comments
Comment #2
willzyx CreditAttribution: willzyx commentedGaëlG thanks for the patch! Can we add test coverage for this?
Comment #3
nevergone CreditAttribution: nevergone commentedI apply this patch and run "drush cex --skip-modules=devel". Config export contain devel.settings.yml file.
Comment #4
GaëlG@nevergone: did you use this temporary fork of drush? https://github.com/gaelg/drush
Comment #5
nevergone CreditAttribution: nevergone commented@GaëlG: Ok, it works. But user role configuration (user.role.anonymous.yml, user.role.authenticated.yml) contain devel-related permissions: access devel information, switch users.
Comment #6
GaëlGThat's right, but this shouldn't break anything, these permissions will be used if Devel is enabled, and ignored if it's disabled. It won't prevent Devel installation. However, you won't be able to enable Devel if devel.settings or system.menu.devel is already in the database.
Comment #7
nevergone CreditAttribution: nevergone commentedI thought, if skipped devel module in configuration export, then all devel-related config-item leave out.
Comment #8
GaëlGThat would be nice, but I'm not sure if it's possible and easy with D8 config management. Actually all devel-related config entities are skipped, but devel-related data into not-devel-related config entities remain.
Comment #9
nevergone CreditAttribution: nevergone commentedOk, I agree: this is another issue. The attached patch is tested and works well! Thanks!
Comment #10
willzyx CreditAttribution: willzyx commented@nevergone as per #2 we need test coverage for this
Comment #11
GaëlGUpdated patch for latest dev. Still needs test coverage.
Comment #12
willzyx CreditAttribution: willzyx commentedAdded basic test coverage and an hook_update_N() for update the enforced dependencies in the existing menu config.
I'm not sure if this is the best approatch suggestions are welcome :)
Comment #14
willzyx CreditAttribution: willzyx commentedFixed on commit
Committed and pushed to 8.x. Thanks