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

Request $request can not be pass it as variable #1

Open
manunoly opened this issue Dec 15, 2023 · 2 comments
Open

Request $request can not be pass it as variable #1

manunoly opened this issue Dec 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@manunoly
Copy link

Hello @saeedvaziry nice package, this can be the missing piece that PHP is needing,

if I pass any variable is working fine
AsyncHandler::dispatch(function () use ($user) { logger('test'); });

but if you pass the $request object to AsyncHandler::dispatch fn, I always get a 500 error, it's the expected behave or I'm missing something,

AsyncHandler::dispatch(function () use ($request) { logger('test'); });
image

@saeedvaziry saeedvaziry added the bug Something isn't working label Dec 16, 2023
@saeedvaziry
Copy link
Owner

I can confirm this bug. will take a look at it.

but as a workaround I was able to use request() helper inside the closure.

@badarnento
Copy link

Hi @saeedvaziry

Did you manage to resolve this issue? I’m currently encountering the same problem that @manunoly mentioned. You mentioned that you were able to use the request() helper. I tried it, but I’m still unable to resolve the issue.

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

No branches or pull requests

3 participants