mirror of
https://github.com/nextcloud/server.git
synced 2026-07-15 21:03:00 -04:00
Merge pull request #14167 from nextcloud/techdebt/noid/update-php-parser-for-7.1-compat
Update PHP-Parser for 7.1 compatibility
This commit is contained in:
commit
ea3fa78a85
4 changed files with 6 additions and 6 deletions
2
3rdparty
2
3rdparty
|
|
@ -1 +1 @@
|
|||
Subproject commit 2fac6fcf993f9cff25845218c3dccf3617ae14a7
|
||||
Subproject commit 42b675142d5c33b585f1bb204e910afeed7e98db
|
||||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ abstract class AsyncBusTest extends TestCase {
|
|||
|
||||
public function testClosureSelf() {
|
||||
$this->getBus()->push(function () {
|
||||
self::$lastCommand = 'closure-self';
|
||||
AsyncBusTest::$lastCommand = 'closure-self';
|
||||
});
|
||||
$this->runJobs();
|
||||
$this->assertEquals('closure-self', self::$lastCommand);
|
||||
|
|
@ -154,7 +154,7 @@ abstract class AsyncBusTest extends TestCase {
|
|||
public function testClosureBind() {
|
||||
$state = 'bar';
|
||||
$this->getBus()->push(function () use ($state) {
|
||||
self::$lastCommand = 'closure-' . $state;
|
||||
AsyncBusTest::$lastCommand = 'closure-' . $state;
|
||||
});
|
||||
$this->runJobs();
|
||||
$this->assertEquals('closure-bar', self::$lastCommand);
|
||||
|
|
|
|||
Loading…
Reference in a new issue