Description
There is a rule in Symfony to make all non-public class members private
by default, not protected
:
We define all members as private until a valid use case is found that requires higher visibility.
I suggest to make BC policy more strict for Symfony 3: require final
on every new class by default. Reasoning is simple: if you don't think that class should be inherited, then don't leave it opened for inheritance, it would allow to keep BC better. Sometimes I see PRs which technically break BC, but it is allowed because "it's too rare and weird case to inherit that class". To be consistent, you shouldn't allow to inherit that class then. Later you can remove final
keyword if there is valid use case for inheritance.
I can refer to some similar opinions: