Closed ariaieboy closed 6 months ago
This bug is related to this changes: https://github.com/filamentphp/filament/compare/v3.1.43...v3.1.46
The configureUsing
changes only apply to the first request that reaches the octane worker.
and in the next requests, the configureUsing
method is not applied.
I think the problem here is that Octane only runs the service providers boot
and register
methods once.
And in the next requests it uses the booted laravel.
here is the reproduce repo for this bug: https://github.com/ariaieboy/filament-octane-bug
Note: when you run the application set the worker counts to
1
or you might see the correct answer in some requests since the first request of each worker contains theconfigureUsing
method changes but in the next requests it get cleared.
@danharrin I tested version 3.2.6 but it still has the same problem
i second that
@danharrin Can you re-open this issue?
I moved every configureUsing
method call inside the Filament::serving
method and now everything works fine. But I don't know if it is a good approach in terms of performance?
If we could set some globals using the panel configuration that would be awesome.
I downloaded your repository. Then I installed Roadrunner with Composer. Then I ran octane:start --workers=1
.
The column names appear to be correct for me:
https://github.com/filamentphp/filament/assets/41773797/a2f4b202-1e7a-4e1c-84cd-e7380bd3fb02
I downloaded your repository. Then I installed Roadrunner with Composer. Then I ran
octane:start --workers=1
.The column names appear to be correct for me:
Screen.Recording.2024-01-20.at.16.01.23.mov
that's because I put the function in the register
method of the appServiceProvider
but according to the filament docs we are supposed to put the configureUsing
method in boot
method 🤔
If you move the method into the boot method it won't work with octane.
Will reopen if more info is provided, but for now I don't know how I can help further.
ok just seen the comment, reopening.
If we put the configureUsing methods into the register
method both octane and non-octane apps will work.
I think we should update the docs and add a note about the octane. So people know that if they want to use configureUsing
with octane they must put it in the register
method, not the boot
method.
Should be fixed by #10947.
Package
filament/filament
Package Version
v3.2.x
Laravel Version
v10.x
Livewire Version
v3.x
PHP Version
8.3.x
Problem description
from version 3.1.46 the configureUsing method changes are not working on octane.
Expected behavior
configureUsing method changes must apply to all requests.
Steps to reproduce
create a filament app and add a code like this:
The column labels must have
id
as a prefix in all requests.Reproduction repository
https://github.com/ariaieboy/filament-octane-bug
Relevant log output
No response