-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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 Swoole's defer()
function in Laravel
#52800
Comments
Please see laravel/octane#948. |
Thank you for the context. I believe this issue extends beyond Octane and impacts both the main framework and Sail |
I believe the |
There is a workaround by disabling functions in Swoole with:
However, considering Laravel's history of prioritizing a frictionless developer experience, I believe a better long-term solution may be found. For reference, see: |
Laravel Version
11.23.5
PHP Version
8.3.11
Database Driver & Version
No response
Description
I am currently using the Swoole 5.1.1 extension, which has implemented the
defer()
function since version 4.2.9. This function accepts a Closure as its first argument, leading to a conflict with Laravel's newly introduceddefer()
helper.The current implementation of Laravel's
defer()
involves using two classes, which can be a bit cumbersome to call directly. It would be helpful to consider providing a more convenient alternative, such as a dedicated Facade or another abstraction, to avoid conflicts with Swoole's existing functionality and simplify usage.Please note the following classes:
Illuminate\Concurrency\ForkDriver
Illuminate\Concurrency\ProcessDriver
Illuminate\Concurrency\SyncDriver
These classes internally call the
defer()
function, which will cause conflicts when using the Swoole extension.Steps To Reproduce
Enable the Swoole extension and attempt to use the
defer()
helper functionThe text was updated successfully, but these errors were encountered: