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

Be compatible with different laravel and swoole adapters #202

Open
v131313 opened this issue Jan 4, 2023 · 4 comments
Open

Be compatible with different laravel and swoole adapters #202

v131313 opened this issue Jan 4, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@v131313
Copy link

v131313 commented Jan 4, 2023

Summary

look at file PHPOpenSourceSaver\JWTAuth\Providers\LaravelServiceProvider:45
if (isset($_SERVER['LARAVEL_OCTANE'])) {
$clear = function () {
JWTAuth::clearResolvedInstances();

You clear only when octane is enabled, i use larave-S
yet another laravel + swoole adapter and looks like this code don`t do any "good" for me.

how about rewrite to:
if (isset($_SERVER['LARAVEL_OCTANE']) || extension_loaded('swoole') || extension_loaded('openswoole')
don`t know - do we need cleaners when using octane and RoadRunner server.

@v131313 v131313 added the enhancement New feature or request label Jan 4, 2023
@mfn
Copy link
Contributor

mfn commented Jan 4, 2023

Sounds reasonable to me; @dmason30 are you still around? WDYT?

@dmason30
Copy link
Contributor

dmason30 commented Jan 4, 2023

Sounds reasonable to me; @dmason30 are you still around? WDYT?

Its clearing using Octane events so i am not sure what allowing anything but LARAVEL_OCTANE enabled code into that block would achieve.

@Messhias
Copy link
Collaborator

But I don't get the issue, what's the problem to run only when the env variable is setup?

@mfn
Copy link
Contributor

mfn commented Feb 21, 2024

@v131313 your request sounds reasonable, I suggest you make a PR to evaluate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants