Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support arbitrary paths for plugins #725

Merged
merged 1 commit into from
May 21, 2024
Merged

Support arbitrary paths for plugins #725

merged 1 commit into from
May 21, 2024

Conversation

lucatume
Copy link
Owner

Allow the WPLoader module plugins and silentlyActivatePlugins parameters to point to arbitrary plugin paths.

The paths can be absolute paths like /home/projects/my-plugin/plugin.php, paths relative to the project root directory like vendor/woocommerce/woocommerce.php, directory/file.php or file.php paths relative to the WordPress installation plugins directory.

E.g. this configuration will work:

actor: IntegrationTester
bootstrap: _bootstrap.php
modules:
  enabled:
    - \Helper\Integration
    - lucatume\WPBrowser\Module\WPLoader:
        wpRootFolder: /var/wordpress
        dbUrl: mysql://root:root@mysql:3306/wordpress
        tablePrefix: test_
        domain: wordpress.test
        adminEmail: admin@wordpress.test
        title: 'Integration Tests'
        plugins:
          - hello.php # This plugin will be loaded from the WordPress installation plugins directory.
          - /home/plugins/woocommerce/woocommerce.php # This plugin will be loaded from an arbitrary absolute path.
          - vendor/acme/project/plugin.php # This plugin will be loaded from an arbitrary relative path inside the project root folder.
          - my-plugin.php # This plugin will be loaded from the project root folder.
        theme: twentytwentythree

@lucatume lucatume self-assigned this May 21, 2024
@lucatume lucatume marked this pull request as ready for review May 21, 2024 12:56
@lucatume lucatume merged commit cfc712d into master May 21, 2024
43 checks passed
@lucatume lucatume deleted the v4-arbitrary-paths branch May 21, 2024 12:57
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