A class with six static factory methods and a private constructor, where five of the factories did the same thing with different argument names. Named constructors earn their…
A helper that throws an HTTP exception was typed void, so every caller had to write an unreachable return statement to satisfy the analyser. never means the function…
8.1 gave pure intersection types and no way to make one nullable; 8.2 allows a union of intersections, which covers the case everybody hit first. The name describes…
A readonly property must have a type, so a readonly class containing an untyped property is a compile error rather than a silently ignored one. The type requirement…
A trait could carry methods, properties and abstract methods, and not constants, which meant a trait defining behaviour around a constant had to document rather than declare it.…
Assigning to an undeclared property has silently created one since PHP 4, which means every typo in a property name has been a working assignment to the wrong…
When two services share an interface, Symfony resolves the ambiguity using the parameter name, which makes a rename a behaviour change. A parameter name becoming part of the…