Add acquia_disable_package_manager#63
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new hidden custom module acquia_disable_package_manager that disables Drupal Package Manager operations when running on Acquia Cloud hosting (where the filesystem is unwritable), and installs it as part of the Acquia Trials recipe. The module short-circuits Package Manager validation with an error on Acquia environments and overrides Project Browser/Automatic Updates config to disable UI installs and unattended updates.
Changes:
- New
AhPackageManagerDisablerclass implementing bothEventSubscriberInterface(to fail StatusCheck/PreCreate Package Manager events) andConfigFactoryOverrideInterface(to force-disable Project Browser UI installs and Automatic Updates). - New module metadata (
*.info.yml,*.services.yml,composer.json). - Adds the new module to the
acquia_trialsrecipe install list.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docroot/modules/custom/acquia_disable_package_manager/src/AhPackageManagerDisabler.php | Event subscriber + config override that disables Package Manager / Project Browser UI install / unattended updates on Acquia hosting. |
| docroot/modules/custom/acquia_disable_package_manager/acquia_disable_package_manager.services.yml | Registers the disabler with event_subscriber and config.factory.override tags. |
| docroot/modules/custom/acquia_disable_package_manager/acquia_disable_package_manager.info.yml | Hidden module info file targeting Drupal core ^11. |
| docroot/modules/custom/acquia_disable_package_manager/composer.json | Module-level Composer manifest requiring acquia/drupal-environment-detector ^1.8. |
| recipes/custom/acquia_trials/recipe.yml | Adds the new module to the Acquia Trials recipe install list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
I'd like to state, for the record, that this module was written personally by me and my MeatBrain, sans LLM assistance. It took me about 10 minutes. |
|
This PR has a problem: there is nothing to require the environment detector package. The most "correct" way to fix this is to add the module as a path repository to the top-level |
|
|
Motivation
Package Manager Composer operations won't work on Acquia Cloud hosting by design - due to the unwritable filesystem. This module disables those operations.