Skip to content
New issue

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

Conflict with laravel/framework & laravel/octane - Spatie/Once #6294

Closed
everestmx opened this issue Mar 20, 2024 · 4 comments
Closed

Conflict with laravel/framework & laravel/octane - Spatie/Once #6294

everestmx opened this issue Mar 20, 2024 · 4 comments

Comments

@everestmx
Copy link

  • Laravel Version: 11.0.7
  • Nova Version: 4.33.0
  • Laravel Octane: 2.3.5
  • PHP Version: 8.3

Description:

Package spatie/once not installed, blocked in replace rule, maybe after this commit - laravel/framework@45ea409

Detailed steps to reproduce the issue on a fresh Nova installation:

composer create-project laravel/laravel
composer require laravel/nova laravel/octane spiral/roadrunner-cli spiral/roadrunner-http
php artisan octane:install
php artisan octane:start

open in browser 127.0.0.1:8000 and see this error in log:

Class "Spatie\Once\Cache" not found

  at vendor/laravel/nova/src/NovaCoreServiceProvider.php:102
     98▕ 
     99▕             $event->listen(RequestReceived::class, function ($event) {
    100▕                 Nova::flushState();
    101▕                 /** @phpstan-ignore-next-line */
  ➜ 102▕                 Cache::getInstance()->flush();
    103▕ 
    104▕                 $event->sandbox->forgetInstance(ImpersonatesUsers::class);
    105▕             });
    106▕ 
✗ ls -Al ./vendor/spatie/once
ls: ./vendor/spatie/once: No such file or directory
✗ composer depends spatie/once
laravel/framework v11.0.7 replaces spatie/once (*)              
laravel/nova      4.33.0  requires spatie/once (^1.1|^2.0|^3.0) 
@codebarista
Copy link

This is fixed but not yet released: #6278 (comment)

@mrtawil
Copy link

mrtawil commented Mar 21, 2024

@codebarista please update us when the new release is out, thank you!

@rasmuscnielsen
Copy link

It seems that the release is out, but I'm still getting some pretty weird issues when using Laravel Octane.

When I visit /nova/dashboards/main straight after login, I get a 404. Stopping Octane and starting again seems to work, but then visiting my User resource I consistently get 404 on metrics, cards, lenses requests.

All these has in common that it uses once() to resolve the resource. I haven't gone fully onboard in debugging it yet, but I would be surprised if it's completely unrelated as this is a completely fresh Laravel 11 + Octane + Nova installation.

image

@crynobone
Copy link
Member

@rasmuscnielsen Please send new issue with all the required information and reproducing repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants