A static analysis first approach to RFCs
Where appropriate should PHP updates start off in static analysis world before becoming part of the PHP language?
A PHP library that adds compile-time-style guarantees — such as package-level visibility and must-use return values — enforced by static analysis.
DaveLiddament/php-language-extensions View on GitHub
The PHP Language Extensions library adds guarantees that PHP itself doesn't enforce — package-level namespace visibility, must-use return values, restricting traits to specific classes, and more — using attributes checked by static analysis. It lets you express and enforce design intent that would otherwise live only in comments.
Where appropriate should PHP updates start off in static analysis world before becoming part of the PHP language?
Learn how the InjectableVersion attribute ensures that correct interface of class is used in Dependency Injection.
Learn how the RestrictTraitTo attribute ensures that traits are used correctly.
Learn how the TestTag attribute helps with testing.
Learn how the NamespaceVisibility attribute emulates the missing package visibility modifier.
Learn how the MustUseResult attribute can prevent coding mistakes.
Learn how the Friend attribute can be used to enforce the usage of creational design patterns.
It's possible to use static analysis to emulate new language features in PHP. This article examines how, and introduces the PHP Language Extension Library.
Learn how to implement new language features using static analysis.