Skip to content

Add acquia_disable_package_manager#63

Open
balsama wants to merge 4 commits into
mainfrom
disable-pm-au
Open

Add acquia_disable_package_manager#63
balsama wants to merge 4 commits into
mainfrom
disable-pm-au

Conversation

@balsama

@balsama balsama commented May 29, 2026

Copy link
Copy Markdown
Contributor

Motivation

Package Manager Composer operations won't work on Acquia Cloud hosting by design - due to the unwritable filesystem. This module disables those operations.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AhPackageManagerDisabler class implementing both EventSubscriberInterface (to fail StatusCheck/PreCreate Package Manager events) and ConfigFactoryOverrideInterface (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_trials recipe 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.

Comment thread docroot/modules/custom/acquia_disable_package_manager/composer.json
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@phenaproxima

Copy link
Copy Markdown
Contributor

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.

@phenaproxima

Copy link
Copy Markdown
Contributor

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 composer.json, and require it as a normal dependency.

@balsama

balsama commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

acquia/drupal-environment-detector is already a top-level dependency 👍

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.

3 participants