DigitalOceanPHP / Client

DigitalOcean API v2 client for PHP
MIT License
709 stars 205 forks source link

Please remove "final" keyword from ExceptionThrower to allow extending this class. #326

Closed lhridley closed 11 months ago

lhridley commented 11 months ago

Currently the HttpClient\Plugin\ExceptionThrower class has the PHP final keyword applied at the class level, which prevents extending the class and overriding the the public handler to more gracefully handle exceptions for applications utilizing the library.

Please consider removing the "final" keyword from this class.

GrahamCampbell commented 11 months ago

Why is it not possible to use composition to achieve what you need, rather than extension?

GrahamCampbell commented 11 months ago

Actually, you should make your own class from scratch. Our class is marked as internal, which means it is not included in our BC promise and may even be deleted in a patch release.