Closed
Description
Bug report
Question | Answer |
---|---|
PHP-Scoper version | 0.18.1 |
PHP version | 8.1 |
Platform with version | MacOS 13 |
Github Repo | https://github.com/leoloso/PoP |
I'm using PHP-Scoper to scope 2 WordPress plugins. When I install both of them on the same site, I get the following error:
Fatal error: Cannot redeclare humbug_phpscoper_expose_class() (previously declared in /app/wordpress/wp-content/plugins/graphql-api/vendor/scoper-autoload.php:23) in /app/wordpress/wp-content/plugins/graphql-api-pro/vendor/scoper-autoload.php on line 27
The reason is clear: both plugins define function humbug_phpscoper_expose_class
in the global space.
Maybe we can append if(!function_exists('humbug_phpscoper_expose_class')) { ...
when declaring the function?
For reference, this is one of my scoper.inc.php
.
Metadata
Metadata
Assignees
Labels
No labels