As announced here, I have started working on a series of posts related to good and bad development practices.
Final classes as a warning sign
The next chapter deals with one of the warning signs in PHP development - final classes.
I am not, in this post, going to go into details on what are final classes and how exactly they are a warning sign. There is a whole article with examples available in the main repository of this series. Let's just say that final classes are functionally useless and can be easily overridden by using a Decorator Design pattern.
The whole article, with analysis and conclusions is available here: https://github.com/constup/php-guidelines/tree/master/src/WarningSigns/FinalClasses
Top comments (0)