auth0 / auth0-PHP

PHP SDK for Auth0 Authentication and Management APIs.
https://auth0.com/docs/libraries/auth0-php
MIT License
381 stars 212 forks source link

use final-annotation instead of hard-final #727

Closed leberknecht closed 1 year ago

leberknecht commented 1 year ago

Checklist

SDK Version

8.7

PHP Version

PHP 8.2

Description

Hi, Not a bug but a suggestion: It would be great if you could switch from hard-final to annotation-level @final, so the lib can be mocked during testing without the hassle of creating wrapper classes. Also suggested here https://verraes.net/2014/05/final-classes-in-php/ and many other fighters of "lets make everything final per default"

How can we reproduce this issue?

Try to use the lib in a project and then mock it during testing. Maybe this is a good time to extend the tests of the sample application a bit, atm they are not doing anything meaningful :)

evansims commented 1 year ago

Hi @leberknecht, thanks for your suggestion! We offer interfaces for all our SDK classes, which allows for the mocking capacity you're looking for. We aren't considering changing this behavior at this time.