spatie / wordpress-ray

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

Error in 1.7.4 #64

Closed juref-specto closed 1 year ago

juref-specto commented 1 year ago

After the update to 1.7.4 when trying to ray() an array or object I get a fatal error.

Fatal error: Uncaught Error: syntax error, unexpected token ")"
in /var/www/html/wp-content/plugins/spatie-ray/vendor/symfony/var-dumper/Dumper/AbstractDumper.php on line 74

Call stack:

Automattic\J\A\j\PHP_Autoloader::load_class()
wp-content/plugins/spatie-ray/vendor/symfony/var-dumper/Dumper/CliDumper.php:22
require()
wp-content/plugins/spatie-ray/vendor/jetpack-autoloader/class-php-autoloader.php:90
Automattic\J\A\j\PHP_Autoloader::load_class()
wp-content/plugins/spatie-ray/vendor/symfony/var-dumper/Dumper/HtmlDumper.php:22
require()
wp-content/plugins/spatie-ray/vendor/jetpack-autoloader/class-php-autoloader.php:90
Automattic\J\A\j\PHP_Autoloader::load_class()
wp-content/plugins/spatie-ray/vendor/spatie/ray/src/ArgumentConverter.php:30
Spatie\Ray\ArgumentConverter::convertToPrimitive()
wp-content/plugins/spatie-ray/vendor/spatie/ray/src/PayloadFactory.php:62
Spatie\Ray\PayloadFactory::getPayload()
wp-content/plugins/spatie-ray/vendor/spatie/ray/src/PayloadFactory.php:38
Spatie\Ray\PayloadFactory::Spatie\Ray\{closure}()
array_map()
wp-content/plugins/spatie-ray/vendor/spatie/ray/src/PayloadFactory.php:39
Spatie\Ray\PayloadFactory::getPayloads()
wp-content/plugins/spatie-ray/vendor/spatie/ray/src/PayloadFactory.php:22
Spatie\Ray\PayloadFactory::createForValues()
wp-content/plugins/spatie-ray/vendor/spatie/ray/src/Ray.php:693
Spatie\Ray\Ray::send()
wp-content/plugins/spatie-ray/vendor/spatie/ray/src/helpers.php:51
ray()
wp-content/themes/obnova-webshop/functions.php:84
include()
wp-settings.php:585
require_once()
wp-config.php:133
require_once()
wp-load.php:50
require_once()
wp-blog-header.php:13
require()
index.php:17
jeffreyvr commented 1 year ago

Composer seems to use PHP 8.1 in the deploy action which causes this issue. Will look into this when I have time, so that it uses 8.0 instead. Or maybe someone already knows how to set it correctly?

jmslbam commented 1 year ago

Want to confirm that running composer install from the plugin directory makes it work 👍

juref-specto commented 1 year ago

@jmslbam Thanks for sharing. I can confirm too that running composer install from the plugin folder solves the problem.

littlenoah89 commented 1 year ago

@jmslbam I can confirm too. Hope in a quick fix. Thanks for sharing.

littlenoah89 commented 1 year ago

Hello everyone, I just wanted to ask if there are any updates regarding the resolution of the issue reported above. Thank you.

jeffreyvr commented 1 year ago

This issue should be resolved once a new release is made. Before the release is made, the version number in readme.txt and wp-ray.php should be updated as well.

freekmurze commented 1 year ago

I've just released v1.7.5 👍