Happyr/auth0-bundle

Every auth0-php classes are final and should not be declared as lazy services

amenophis opened this issue · 6 comments

Hi @Nyholm,
I encounter an issue when trying this bundle, in auth0-php@8.0.0-BETA1, every classes are final.
In my project, I got the symfony/proxy-manager-bridge component installed. As you declared services as lazy in the configuration, it ends up with the following error:
ProxyManager\Exception\InvalidProxiedClassException: Provided class "Auth0\SDK\API\Authentication" is final and cannot be proxied

Do you think we can simply remove the lazy services configuration ?
If OK for you, i will push a PR.

The lazy services are intentional because the sdk makes http requests when classes are instantiated. But I’m happy to remove the final keyword on the services.

I speak about SDK classes that are final, you speak about those classes ? Or bundle ones ? You are a maintainer of auth0 SDK ?

Oh. I’m sorry. I just woke up :)

but I still believe I’m correct. We should open an issue/pr on the sdk to maker sure they are not final or that they don’t make the http request. (The latter allows us to remove “lazy”)

Please link to this issue.

Ok will open an issue on the SDK directly !

The responses in auth0/auth0-PHP#527 seams like we can remove "lazy" from this library.

Do you want to make a PR?

Fixed by #47