We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use php-scoper inside my own wordpress plugin.
However when using a native WP function inside my plugin (like update_option), I get the error:
Fatal error: Uncaught Error: Call to undefined function _PhpScoper530411ca8549\update_option()
php-scoper spits out the following code:
namespace _PhpScoper530411ca8549; require_once __DIR__ . '/vendor/autoload.php'; \_PhpScoper530411ca8549\update_option('foo', 'bar');
Since update_option is not inside the namespace of the plugin (and comes outside from wordpress), this cannot work, or am I wrong?
Fiddling around with whitelist-global-functions doesn't change this behaviour.
Can you please help out? How do I exclude native wordpress functions from prefixing or even get them running with prefixing?
The text was updated successfully, but these errors were encountered:
I fixed this with:
MyCustomPlugin
'whitelist' => ['MyCustomPlugin\*']
Sorry, something went wrong.
@vielhuber to me it looks like you are missing the scoper-autoload.php file which is critical for any sort of whitelisting
scoper-autoload.php
I included scoper-autoload.php. The problem is, that WordPress is outside of php-scopers influence.
Saw #303, I'll try to have a look to see if there is anything to change there
No branches or pull requests
I use php-scoper inside my own wordpress plugin.
However when using a native WP function inside my plugin (like update_option), I get the error:
php-scoper spits out the following code:
Since update_option is not inside the namespace of the plugin (and comes outside from wordpress), this cannot work, or am I wrong?
Fiddling around with whitelist-global-functions doesn't change this behaviour.
Can you please help out? How do I exclude native wordpress functions from prefixing or even get them running with prefixing?
The text was updated successfully, but these errors were encountered: