Updated all dependencies and prepared for PHP 8
This commit is contained in:
@@ -8,7 +8,7 @@ namespace CloudObjects\PhpMAE;
|
||||
|
||||
use CloudObjects\PhpMAE\Sandbox\CustomizedSandbox;
|
||||
use PHPSandbox\SandboxWhitelistVisitor, PHPSandbox\ValidatorVisitor;
|
||||
use PhpParser\ParserFactory, PhpParser\NodeTraverser;
|
||||
use PhpParser\ParserFactory, PhpParser\PhpVersion, PhpParser\NodeTraverser;
|
||||
use ML\IRI\IRI;
|
||||
use CloudObjects\SDK\COIDParser;
|
||||
use CloudObjects\PhpMAE\Exceptions\PhpMAEException;
|
||||
@@ -43,7 +43,6 @@ class ClassValidator {
|
||||
'GuzzleHttp\Client',
|
||||
'GuzzleHttp\HandlerStack', 'GuzzleHttp\Middleware',
|
||||
'GuzzleHttp\Handler\CurlHandler',
|
||||
'GuzzleHttp\Subscriber\Oauth\Oauth1',
|
||||
'GuzzleHttp\Promise',
|
||||
'Dflydev\FigCookies\SetCookie',
|
||||
'Symfony\Component\Mime\Email',
|
||||
@@ -105,7 +104,7 @@ class ClassValidator {
|
||||
$stack = ClassRepository::DEFAULT_STACK) {
|
||||
|
||||
// Initialize parser and parse source code
|
||||
$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);
|
||||
$parser = (new ParserFactory)->createForVersion(PhpVersion::getHostVersion());
|
||||
$ast = $parser->parse($sourceCode);
|
||||
|
||||
// Parse and dump use statements
|
||||
|
||||
Reference in New Issue
Block a user