Skip to content

Added 'moduleInstall()' and 'moduleUninstall()' to all drivers.#315

Merged
AlexSkrypnyk merged 1 commit intomasterfrom
feature/module-install
Apr 16, 2026
Merged

Added 'moduleInstall()' and 'moduleUninstall()' to all drivers.#315
AlexSkrypnyk merged 1 commit intomasterfrom
feature/module-install

Conversation

@AlexSkrypnyk
Copy link
Copy Markdown
Collaborator

Iterates on #164 by @phenaproxima. Thank you for the contribution!

Summary

  • Added moduleInstall() and moduleUninstall() methods to DriverInterface and CoreInterface.
  • Implemented the methods across all drivers: DrupalDriver, DrushDriver, and BaseDriver (throws UnsupportedDriverActionException).
  • Implemented the methods in all three core classes: Drupal6, Drupal7, and Drupal8.

Implementation details

DriverInterface / CoreInterface: Defined moduleInstall($module_name) and moduleUninstall($module_name) with full PHPDoc.

BaseDriver: Both methods throw UnsupportedDriverActionException as the default fallback, consistent with other unimplemented actions.

DrupalDriver: Delegates to the active core via $this->getCore()->moduleInstall() / moduleUninstall().

DrushDriver: Uses Drush commands pm-enable and pm-uninstall with --yes to avoid interactive prompts.

Drupal6: Uses module_enable() / module_disable() + drupal_uninstall_module().

Drupal7: Uses module_enable() / module_disable() + drupal_uninstall_modules().

Drupal8: Uses the module_installer service via \Drupal::service('module_installer')->install() / uninstall().

…eUninstall()' to all drivers.

Co-authored-by: Phena Proxima <djphenaproxima@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

Warning

Rate limit exceeded

@AlexSkrypnyk has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 41 minutes and 0 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 41 minutes and 0 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 47499bdc-10e4-4f0c-af82-bbb608afcf17

📥 Commits

Reviewing files that changed from the base of the PR and between 951a75b and 0075501.

📒 Files selected for processing (8)
  • src/Drupal/Driver/BaseDriver.php
  • src/Drupal/Driver/Cores/CoreInterface.php
  • src/Drupal/Driver/Cores/Drupal6.php
  • src/Drupal/Driver/Cores/Drupal7.php
  • src/Drupal/Driver/Cores/Drupal8.php
  • src/Drupal/Driver/DriverInterface.php
  • src/Drupal/Driver/DrupalDriver.php
  • src/Drupal/Driver/DrushDriver.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/module-install

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AlexSkrypnyk AlexSkrypnyk merged commit 55939d0 into master Apr 16, 2026
6 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/module-install branch April 16, 2026 22:00
@AlexSkrypnyk AlexSkrypnyk added this to the 2.5 milestone Apr 17, 2026
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.

1 participant