Thanks PhpStorm :)
Add ErrorHandler interface, as well as ErrorHandler\Throwing and ErrorHandler\Collecting. The error handler is passed to Parser::parse(). This supersedes the throwOnError option. NameResolver now accepts an ErrorHandler in the ctor.
Doesn't belong there and will cause issue with multiple assignments.
And run the other stuff against Php5 and Php7 parsers. Also move canonicalize() from CodeTestAbstract into a free-standing function.