spatie / wordpress-ray

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

using the ray()->link() or ray()->url() methods throws fatal error #76

Open omegabenefits opened 5 months ago

omegabenefits commented 5 months ago

Describe the bug using the ray()->link() or ray()->url() methods throws fatal error

Fatal error: Uncaught Error: Class "Illuminate\Support\Str" not found in /Volumes/Omega/Local/omegastaging/app/public/wp-content/plugins/spatie-ray/vendor/spatie/ray/src/Ray.php:538 Stack trace: #0 /Volumes/Omega/Local/omegastaging/app/public/wp-content/plugins/spatie-ray/vendor/spatie/ray/src/Ray.php(553): Spatie\Ray\Ray->url('https://atsg.om...', '') #1 /Volumes/Omega/Dropbox/Omega Benefits/github/omega-system/includes/class-omega-static.php(134): Spatie\Ray\Ray->link('https://atsg.om...') #2 /Volumes/Omega/Local/omegastaging/app/public/wp-includes/class-wp-hook.php(326): OmegaBenefits\System\Omega_Static->OmegaBenefits\System\{closure}(83) #3 /Volumes/Omega/Local/omegastaging/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #4 /Volumes/Omega/Local/omegastaging/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /Volumes/Omega/Local/omegastaging/app/public/wp-content/plugins/simply-static/src/class-ss-plugin.php(192): do_action('ss_before_stati...', 83, 'export') #6 /Volumes/Omega/Dropbox/Omega Benefits/github/omega-system/includes/class-omega-static.php(577): Simply_Static\Plugin->run_static_export() #7 /Volumes/Omega/Local/omegastaging/app/public/wp-includes/class-wp-hook.php(324): OmegaBenefits\System\Omega_Static->single_static_export('') #8 /Volumes/Omega/Local/omegastaging/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #9 /Volumes/Omega/Local/omegastaging/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #10 /Volumes/Omega/Local/omegastaging/app/public/wp-admin/admin.php(419): do_action('admin_action_om...') #11 /Volumes/Omega/Local/omegastaging/app/public/wp-admin/edit.php(10): require_once('/Volumes/Omega/...') #12 {main} thrown in /Volumes/Omega/Local/omegastaging/app/public/wp-content/plugins/spatie-ray/vendor/spatie/ray/src/Ray.php on line 538

Versions 2.8.0 desktop Mac Wordpress Ray plugin 1.7.5 Wordpress version 6.5.3

PHP version: 8.2.10

Desktop (local wordpress dev)

omegabenefits commented 5 months ago

I've tried building my own updated plugin, updating the composer dependencies to the latest spatie/ray 1.41.2 -- but unsure how to get the new build to include the missing Illuminate\Support dependency (spatie/ray composer.json shows it in require-dev only)

omegabenefits commented 2 months ago

also not able to use the ray()->expand() method 😞 using wordpress plugin v1.7.6 and latest mac desktop 2.8.1

Fatal error: Uncaught BadMethodCallException: Method expand does not exist. in /app/public/wp-content/plugins/spatie-ray/vendor/spatie/macroable/src/Macroable.php:55