To use framework specific functionality, such as viewing queries in Laravel, or displaying mails in WordPress, you should still install the relevant package or library.
If a framework specific package is detected, it will be used instead of the global Ray.
Is this still working in the case of WordPress?
My global installation is working, and my mu-plugin installation is working, tested on their own.
When both are active, running this in a custom plugin:
ray()->clearScreen();
ray('hello');
ray()->showHooks(); // WP only function
ray()->stopShowingHooks(); // WP only function
results in:
Fatal error: Uncaught BadMethodCallException: Method showHooks does not exist. in phar://C:/Users/Tim/AppData/Roaming/Composer/vendor/spatie/global-ray/ray-phars/ray_php_8.0.phar/vendor/spatie/macroable/src/Macroable.php:42
Stack trace:
#0 C:\webdev\wptest3\public_html\wp-content\plugins\test\test.php(20): GlobalRay\Spatie\Ray\Ray->__call('showHooks', Array)
#1 C:\webdev\wptest3\public_html\wp-settings.php(517): include_once('C:\\webdev\\wptes...')
#2 C:\webdev\wptest3\public_html\wp-config.php(78): require_once('C:\\webdev\\wptes...')
#3 C:\webdev\wptest3\public_html\wp-load.php(50): require_once('C:\\webdev\\wptes...')
#4 C:\webdev\wptest3\public_html\wp-admin\admin.php(34): require_once('C:\\webdev\\wptes...')
#5 C:\webdev\wptest3\public_html\wp-admin\plugins.php(10): require_once('C:\\webdev\\wptes...')
#6 {main}
thrown in phar://C:/Users/Tim/AppData/Roaming/Composer/vendor/spatie/global-ray/ray-phars/ray_php_8.0.phar/vendor/spatie/macroable/src/Macroable.php on line 42
source: https://myray.app/docs/php/vanilla-php/installation
Is this still working in the case of WordPress?
My global installation is working, and my mu-plugin installation is working, tested on their own.
When both are active, running this in a custom plugin:
results in:
If I disable the global install:
Then it works.