Following triggered when activating another plugin instance with this as a base:
PHP Fatal error: Cannot declare class ComposerAutoloaderInitaea68d375cfea6967a1aadf915fd3cfd, because the name is already in use in /bitnami/wordpress/wp-content/plugins/phel-wp-plugin-dupe/vendor/composer/autoload_real.php on line 5
Added a post init script in another branch to demo this https://github.com/jasalt/phel-wp-plugin/blob/13623433f950fc6dc6133d6e5bed240e6e2199b6/docker-post-init-scripts/4_duplicate_plugin.sh working as follows:
docker compose down -v
git fetch origin bug-two-plugin-instances-conflict
git checkout bug-two-plugin-instances-conflict
docker compose up
Then activate the plugin either in WP-Admin plugin management or with:
docker compose exec wordpress wp plugin activate phel-wp-plugin-dupe
Following output given:
wordpress-1 | [18-Nov-2024 13:56:03 UTC] /bitnami/phel-wp-plugin/
wordpress-1 | [18-Nov-2024 13:56:03 UTC] /bitnami/wordpress/wp-content/plugins/phel-wp-plugin-dupe/
wordpress-1 | [18-Nov-2024 13:56:03 UTC] PHP Fatal error: Cannot declare class ComposerAutoloaderInitaea68d375cfea6967a1aadf915fd3cfd, because the name is already in use in /bitnami/wordpress/wp-content/plugins/phel-wp-plugin-dupe/vendor/composer/autoload_real.php on line 5
wordpress-1 | 172.20.0.1 - - [18/Nov/2024:13:56:03 +0000] "GET /wp-admin/plugins.php?action=activate&plugin=phel-wp-plugin-dupe%2Fphel-wp-plugin-dupe.php&plugin_status=all&paged=1&s&_wpnonce=aa9e338bc3 HTTP/1.1" 302 -
wordpress-1 | [18-Nov-2024 13:56:03 UTC] /bitnami/phel-wp-plugin/
wordpress-1 | 172.20.0.1 - - [18/Nov/2024:13:56:03 +0000] "GET /wp-admin/plugins.php?error=true&plugin=phel-wp-plugin-dupe%2Fphel-wp-plugin-dupe.php&_error_nonce=f41afb8924 HTTP/1.1" 200 14897
Following triggered when activating another plugin instance with this as a base:
Added a post init script in another branch to demo this https://github.com/jasalt/phel-wp-plugin/blob/13623433f950fc6dc6133d6e5bed240e6e2199b6/docker-post-init-scripts/4_duplicate_plugin.sh working as follows:
Then activate the plugin either in WP-Admin plugin management or with:
Following output given: