@ramsey @cabbey That hypothetical plugin could run the SA tool when the corresponding configuration file is found. But we have several SA tools, and they don't have the same format for comments/attributes. Nor they have the same funcionalities. Something officially defined by the PHP project would allow Composer to implement this check-then-erase flow on installation, ensuring anyone using a lib would need to go through the static analysis step.
@gmazzap @cabbey I see a lot of libraries written in TS but distributed already transpiled. How does that enforce anything?
In the case of PHP, there would not be a transpile step. The erased types would mainly be fancy syntax as hints to tools like IDEs.