Aggiornato Composer
This commit is contained in:
7
vendor/sebastian/lines-of-code/ChangeLog.md
vendored
7
vendor/sebastian/lines-of-code/ChangeLog.md
vendored
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [1.0.4] - 2023-12-22
|
||||
|
||||
### Changed
|
||||
|
||||
* This component is now compatible with `nikic/php-parser` 5.0
|
||||
|
||||
## [1.0.3] - 2020-11-28
|
||||
|
||||
### Fixed
|
||||
@@ -28,6 +34,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
|
||||
|
||||
* Initial release
|
||||
|
||||
[1.0.4]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.3...1.0.4
|
||||
[1.0.3]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.2...1.0.3
|
||||
[1.0.2]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.1...1.0.2
|
||||
[1.0.1]: https://github.com/sebastianbergmann/lines-of-code/compare/1.0.0...1.0.1
|
||||
|
||||
2
vendor/sebastian/lines-of-code/composer.json
vendored
2
vendor/sebastian/lines-of-code/composer.json
vendored
@@ -17,7 +17,7 @@
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"nikic/php-parser": "^4.6"
|
||||
"nikic/php-parser": "^4.18 || ^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.3"
|
||||
|
||||
@@ -11,10 +11,8 @@ namespace SebastianBergmann\LinesOfCode;
|
||||
|
||||
use function substr_count;
|
||||
use PhpParser\Error;
|
||||
use PhpParser\Lexer;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\NodeTraverser;
|
||||
use PhpParser\Parser;
|
||||
use PhpParser\ParserFactory;
|
||||
|
||||
final class Counter
|
||||
@@ -39,7 +37,7 @@ final class Counter
|
||||
}
|
||||
|
||||
try {
|
||||
$nodes = $this->parser()->parse($source);
|
||||
$nodes = (new ParserFactory)->createForHostVersion()->parse($source);
|
||||
|
||||
assert($nodes !== null);
|
||||
|
||||
@@ -83,9 +81,4 @@ final class Counter
|
||||
|
||||
return $visitor->result();
|
||||
}
|
||||
|
||||
private function parser(): Parser
|
||||
{
|
||||
return (new ParserFactory)->create(ParserFactory::PREFER_PHP7, new Lexer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user