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

Laravel Octane Support: Scoped service binding #2055

Merged

Conversation

coleshirley
Copy link
Contributor

See #2010

@danharrin As I was working on this I found there is an issue with octane itself where scoped services aren't being flushed correctly because of a discrepancy between octane and laravel itself. laravel/octane#500

There is a workaround where after this pull request is submitted you can add the filament service to octane's flush services in the config like so:

config/octane.php:

<?php

...

return [

   ...

    /*
    |--------------------------------------------------------------------------
    | Warm / Flush Bindings
    |--------------------------------------------------------------------------
    |
    | The bindings listed below will either be pre-warmed when a worker boots
    | or they will be flushed before every new request. Flushing a binding
    | will force the container to resolve that binding again when asked.
    |
    */

    'warm' => [
        ...Octane::defaultServicesToWarm(),
    ],

    'flush' => [
        'filament'
    ],

  ...

];

Is that something that should be added to the documentation or do you want to just refer people here? Once the issue in the octane package is resolved we won't need to add that item to the flush in the config

@danharrin danharrin added the bug Something isn't working label Mar 30, 2022
@danharrin
Copy link
Member

Hey, let's refer people here. I don't want to add documentation that we then have to remove later when Laravel fixes the issue.

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants