diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-12 17:41:52 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-14 20:04:17 +0100 |
commit | a1b87bc81e818db00e89ec76a9f6df35d9c5448d (patch) | |
tree | fa27172e4ce51f83766d016bea2b1be915accba9 | |
parent | b6d327ee47b2c4cbd062d52997efbe0186c4c45c (diff) | |
download | nextcloud-server-a1b87bc81e818db00e89ec76a9f6df35d9c5448d.tar.gz nextcloud-server-a1b87bc81e818db00e89ec76a9f6df35d9c5448d.zip |
Update PHP-Parser for 7.1 compatibility
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
m--------- | 3rdparty | 0 | ||||
-rw-r--r-- | build/OCPSinceChecker.php | 2 | ||||
-rw-r--r-- | lib/private/App/CodeChecker/CodeChecker.php | 4 |
3 files changed, 3 insertions, 3 deletions
diff --git a/3rdparty b/3rdparty -Subproject 2fac6fcf993f9cff25845218c3dccf3617ae14a +Subproject 42b675142d5c33b585f1bb204e910afeed7e98d diff --git a/build/OCPSinceChecker.php b/build/OCPSinceChecker.php index 04a19b3416f..13f58fe2550 100644 --- a/build/OCPSinceChecker.php +++ b/build/OCPSinceChecker.php @@ -99,7 +99,7 @@ class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract { echo 'Parsing all files in lib/public for the presence of @since or @deprecated on each method...' . PHP_EOL . PHP_EOL; -$parser = new PhpParser\Parser(new PhpParser\Lexer); +$parser = (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7); /* iterate over all .php files in lib/public */ $Directory = new RecursiveDirectoryIterator(dirname(__DIR__) . '/lib/public'); diff --git a/lib/private/App/CodeChecker/CodeChecker.php b/lib/private/App/CodeChecker/CodeChecker.php index d2f6d7451b4..8f539897c97 100644 --- a/lib/private/App/CodeChecker/CodeChecker.php +++ b/lib/private/App/CodeChecker/CodeChecker.php @@ -25,9 +25,9 @@ namespace OC\App\CodeChecker; use OC\Hooks\BasicEmitter; -use PhpParser\Lexer; use PhpParser\NodeTraverser; use PhpParser\Parser; +use PhpParser\ParserFactory; use RecursiveCallbackFilterIterator; use RecursiveDirectoryIterator; use RecursiveIteratorIterator; @@ -57,7 +57,7 @@ class CodeChecker extends BasicEmitter { public function __construct(ICheck $checkList, $checkMigrationSchema) { $this->checkList = $checkList; $this->checkMigrationSchema = $checkMigrationSchema; - $this->parser = new Parser(new Lexer); + $this->parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); } /** |