Closed morozov closed 4 years ago
The world is not perfect nor bug free.
Currently, in the atk4/data project, I fixed a lot of issues by extending the specific DB platform. It works well. Most of the issues, I reported here or even proposed a PR.
Such fixing is impossible when the classes are declared final. Would it be possible to remove the final
from the driver classes so the oppurtunity to fixing the impl. from the target project side is still possible?
I fixed a lot of issues by extending the specific DB platform.
The platform classes are not final, so you can continue to do this.
Would it be possible to remove the
final
from the driver classes so the oppurtunity to fixing the impl. from the target project side is still possible?
I don't believe that this is really necessary. The DBAL has a well defined driver and middleware architecture that should allow you to easily implement your own driver or hook into whatever the bundled drivers are doing.
If you feel like you need to patch the driver classes, these are your options:
One example are driver ExceptionConverter
classes. They should not be final.
ExceptionConverter
implementations can be decorated. You gain nothing by extending them.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
The issue was originally raised in https://github.com/doctrine/dbal/pull/3007#issuecomment-362630921.
A quick check with Ocramius/Finalizer shows:
For all finalized classes, all their properties and protected methods should be declard private and renamed if they violate the PSR-2 naming conventions.