Skip to content

Commit

Permalink
[#79] Update nikic/php-parser from ~1.3 to ~2.0 to support PHP 7
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzx committed Jan 27, 2016
1 parent f05bcc1 commit 6bb1958
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

"hassankhan/config": "~0.9",
"herrera-io/phar-update": "~2.0",
"nikic/php-parser": "~1.3",
"nikic/php-parser": "~2.0",
"symfony/console": "~2.7|~3.0",
"symfony/yaml": "~2.7|~3.0",
"tomzx/finder": "~0.1"
Expand Down
8 changes: 4 additions & 4 deletions src/PHPSemVerChecker/Scanner/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
namespace PHPSemVerChecker\Scanner;

use PhpParser\Error;
use PhpParser\Lexer\Emulative;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\Parser;
use PhpParser\ParserFactory;
use PHPSemVerChecker\Registry\Registry;
use PHPSemVerChecker\Visitor\ClassVisitor;
use PHPSemVerChecker\Visitor\FunctionVisitor;
use PHPSemVerChecker\Visitor\InterfaceVisitor;
use PHPSemVerChecker\Visitor\TraitVisitor;
use RuntimeException;

class Scanner {
class Scanner
{
/**
* @var \PHPSemVerChecker\Registry\Registry
*/
Expand All @@ -31,7 +31,7 @@ class Scanner {
public function __construct()
{
$this->registry = new Registry();
$this->parser = new Parser(new Emulative());
$this->parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7);
$this->traverser = new NodeTraverser();

$visitors = [
Expand Down

0 comments on commit 6bb1958

Please sign in to comment.