瀏覽代碼

Update PHP-Parser for 7.1 compatibility

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v16.0.0alpha1
Joas Schilling 5 年之前
父節點
當前提交
a1b87bc81e
沒有連結到貢獻者的電子郵件帳戶。
共有 3 個檔案被更改,包括 4 行新增4 行删除
  1. 1
    1
      3rdparty
  2. 1
    1
      build/OCPSinceChecker.php
  3. 2
    2
      lib/private/App/CodeChecker/CodeChecker.php

+ 1
- 1
3rdparty

@@ -1 +1 @@
Subproject commit 2fac6fcf993f9cff25845218c3dccf3617ae14a7
Subproject commit 42b675142d5c33b585f1bb204e910afeed7e98db

+ 1
- 1
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');

+ 2
- 2
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);
}

/**

Loading…
取消
儲存