Our great sponsors
-
Serializer
Library for (de-)serializing data of any complexity (supports JSON, and XML) (by schmittjoh)
-
bypass-finals
Removes `final` and `readonly` keywords from source code on-the-fly and allows mocking of final methods and classes. It can be used together with any test tool such as PHPUnit or Mockery.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Making a class "final" is always a bad decision IMO. You would never know how will other people use your library. For example, we used JMSSerializerBundle and wanted to extend DateHandler to make it not to throw exceptions if a date string is invalid. But the class is final. So we had to just copy-paste it :(
Even with the keyword final it's still possible to extend by using the final disable library https://github.com/dg/bypass-finals but the fact you needed to disable it makes it very clear that it's unsupported behaviour.