spatie / wordpress-ray

Debug with Ray to fix problems faster in WordPress apps
https://myray.app
MIT License
73 stars 14 forks source link

The plugin breaks WP CLI #75

Closed mskapusuz closed 4 months ago

mskapusuz commented 4 months ago

Hello there,

I have had an issue with this plugin for a long time. When the plugin is enabled, WP CLI is entirely broken.

The error:

Fatal error: During class fetch: Uncaught ParseError: syntax error, unexpected '|', expecting variable (T_VARIABLE) in /srv/www/hezarfen/public_html/wp-content/plugins/spatie-ray/vendor/spatie/macroable/src/Macroable.php:14
Stack trace:
#0 [internal function]: Automattic\Jetpack\Autoloader\jp3123785b021cae6cb6ff0533904b8273\al2_12_0\PHP_Autoloader::load_class()
#1 /srv/www/hezarfen/public_html/wp-content/plugins/spatie-ray/vendor/spatie/ray/src/Ray.php(60): spl_autoload_call()
#2 /srv/www/hezarfen/public_html/wp-content/plugins/hezarfen-pro-for-woocommerce/vendor/jetpack-autoloader/class-php-autoloader.php(90): require('/srv/www/hezarf...')
#3 [internal function]: Automattic\Jetpack\Autoloader\jp3123785b021cae6cb6ff0533904b8273\al2_12_0\PHP_Autoloader::load_class()
#4 /srv/www/hezarfen/public_html/wp-content/plugins/spatie-ray/src/Ray.php(12): spl_autoload_call()
#5 /srv/www/hezarfen/public_html/wp-content/plugins/hezarfen-pro-for-woocommerce/vendor/jetpack-autoloader/class-php-autoloader.php(90): require('/srv/www/hezarf in /srv/www/hezarfen/public_html/wp-content/plugins/spatie-ray/vendor/spatie/ray/src/Ray.php on line 60

Reproducing steps:

  1. Install a fresh WP
  2. Install&Activate the WordPress Ray plugin
  3. See WP CLI doesn't work and you get the fatal error.

Version:1.7.5

mskapusuz commented 4 months ago

Sorry, never mind, the issue seems to be coming from my stack. I couldn't reproduce the issue with a fresh instance.