You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue during a fresh install of Laravel 10 with Jetstream 2.x and Backpack 6.0. It seems that Backpack's service provider fires before Jetstream's service provider, leading to a problem with the resolution of BladeCompiler::class.
Consequently, the Jetstream Livewire components are not properly configured, as they rely on a callback that occurs after BladeCompiler::class is resolved.
Steps to Reproduce:
Perform a fresh install of Laravel 10.
Install Jetstream 2.x and Backpack 6.0 using auto-discovery.
Expected Results:
The order of service provider firing should not affect the configuration of Livewire components. Jetstream should handle the situation gracefully, ensuring proper setup regardless of the order of service providers.
Actual Results:
Backpack's service provider fires before Jetstream's, causing BladeCompiler::class to be resolved before Jetstream's service provider has a chance to run. As a result, Jetstream registers a callback for after BladeCompiler::class is resolved and since it is already resolved the callback never fires and Jetstream's Livewire components are never registered.
Workaround:
To mitigate the issue, I disabled auto-discovery and arranged for Backpack to execute after Jetstream, which seemed to resolve the problem.
Potential Solution:
I have reported this issue to Backpack, they might fix it on their end.
Nevertheless, it might be worth considering a potential solution within Jetstream as well. One possible approach is to have Jetstream check if BladeCompiler::class is already resolved during its setup process. If it is resolved, Jetstream could immediately proceed with setting up the Livewire components appropriately.
Additional Notes:
I must admit that I'm not entirely certain about the implications of implementing the suggested solution. Therefore, I'm willing to collaborate and submit a pull request to Jetstream if this approach seems beneficial and is deemed a potential fix.
I appreciate your attention to this matter and look forward to a resolution, whether through Backpack's or Jetstream's updates.
Thank you!
The text was updated successfully, but these errors were encountered:
register() method should only be used to define services and Backpack shouldn't resolved Blade there and instead use boot(). Alternatively, Backpack should follow Jetstream style to only interacts with Blade when it being resolve.
Description:
I encountered an issue during a fresh install of Laravel 10 with Jetstream 2.x and Backpack 6.0. It seems that Backpack's service provider fires before Jetstream's service provider, leading to a problem with the resolution of
BladeCompiler::class
.Consequently, the Jetstream Livewire components are not properly configured, as they rely on a callback that occurs after BladeCompiler::class is resolved.
Steps to Reproduce:
Expected Results:
The order of service provider firing should not affect the configuration of Livewire components. Jetstream should handle the situation gracefully, ensuring proper setup regardless of the order of service providers.
Actual Results:
Backpack's service provider fires before Jetstream's, causing
BladeCompiler::class
to be resolved before Jetstream's service provider has a chance to run. As a result, Jetstream registers a callback for afterBladeCompiler::class
is resolved and since it is already resolved the callback never fires and Jetstream's Livewire components are never registered.Workaround:
To mitigate the issue, I disabled auto-discovery and arranged for Backpack to execute after Jetstream, which seemed to resolve the problem.
Potential Solution:
I have reported this issue to Backpack, they might fix it on their end.
Nevertheless, it might be worth considering a potential solution within Jetstream as well. One possible approach is to have Jetstream check if
BladeCompiler::class
is already resolved during its setup process. If it is resolved, Jetstream could immediately proceed with setting up the Livewire components appropriately.Additional Notes:
I must admit that I'm not entirely certain about the implications of implementing the suggested solution. Therefore, I'm willing to collaborate and submit a pull request to Jetstream if this approach seems beneficial and is deemed a potential fix.
I appreciate your attention to this matter and look forward to a resolution, whether through Backpack's or Jetstream's updates.
Thank you!
The text was updated successfully, but these errors were encountered: