mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 22:39:03 +02:00
⬆️ Upgrade lib : nikic/php-parser
We were on v3 that is no longer maintained and compatibility is annonced for PHP 7.2. v4 is active and supports PHP up to 8.0 No problem to update as this is only used in the config editor (\Combodo\iTop\Config\Validator\iTopConfigAstValidator)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace PhpParser;
|
||||
|
||||
class ParserFactory {
|
||||
class ParserFactory
|
||||
{
|
||||
const PREFER_PHP7 = 1;
|
||||
const PREFER_PHP5 = 2;
|
||||
const ONLY_PHP7 = 3;
|
||||
@@ -17,7 +18,7 @@ class ParserFactory {
|
||||
*
|
||||
* @return Parser The parser instance
|
||||
*/
|
||||
public function create($kind, Lexer $lexer = null, array $parserOptions = array()) {
|
||||
public function create(int $kind, Lexer $lexer = null, array $parserOptions = []) : Parser {
|
||||
if (null === $lexer) {
|
||||
$lexer = new Lexer\Emulative();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user