Keep Interface New Argument Compatible¶
A reminder for maintainers of PHP libraries: adding a parameter to a method of an interface causes a fatal error in all the classes that implement it. It’s a BC break that should be prohibited in a minor version.
In Symfony, we add the parameter virtually using phpdoc, and read it using func_get_arg().
See Also¶
Example code [Try me]