The old PhpParser had dynamic class_alias() calls in its autoloader
which caused HHVM RepoAuthoritative compilation to fail with a fatal
error. These b/c aliases were removed in 2.0.
Change-Id: I6e2e3412204249a50a5806c33f48f426ab8c4511
"justinrainbow/json-schema": "~1.6",
"mediawiki/mediawiki-codesniffer": "0.7.2",
"monolog/monolog": "~1.18.2",
- "nikic/php-parser": "1.4.1",
+ "nikic/php-parser": "2.1.0",
"nmred/kafka-php": "0.1.5",
"phpunit/phpunit": "4.8.24",
"wikimedia/avro": "1.7.7"
* indicating that it is a hard-deprecated interface.
*/
public function isHardDeprecated( PhpParser\Node $node ) {
+ if ( !$node->stmts ) {
+ return false;
+ }
foreach ( $node->stmts as $stmt ) {
if (
$stmt instanceof PhpParser\Node\Expr\FuncCall
$files = $this->getFiles();
$chunkSize = ceil( count( $files ) / 72 );
- $parser = new PhpParser\Parser( new PhpParser\Lexer\Emulative );
+ $parser = ( new PhpParser\ParserFactory )->create( PhpParser\ParserFactory::PREFER_PHP7 );
$traverser = new PhpParser\NodeTraverser;
$finder = new DeprecatedInterfaceFinder;
$traverser->addVisitor( $finder );