"Heard in the Community" series aims to wrap up news from the PHP, symfony and other communities I find interesting and follow.
Here's the first post.
Protect your privates
Symfony2 coding standards favor public and protected access modifiers over private. Blog post by Lukas started hot discussion on this subject in the community (on twitter and blogs):
- Red tape and the art of ripping through it by Lukas Smith
- My privates are not public, they are protected by Stefan Koopmanschap
- Good use of public, private and protected in OO class design by Ivo Jansch
While I think that all methods should be as private as possible I can understand points made in the listed blog posts. I guess coding an Open Source framework might need different approach. In everyday work, however, I believe it's a good practice to make the main responsibility of a class public and its internals private or protected.
PHP4 is dead (again)
Over 3 years ago PHP4 end of life announcement was published. Despite its death PHP4 is still hanging around like a zombie. Some of the popular Open Source projects keep supporting it. WordPress is one of the last projects to announce end of support for PHP4. Finally I'd say.