Home
last modified time | relevance | path

Searched refs:version (Results 1 – 25 of 27) sorted by relevance

12

/PHP-Parser/lib/PhpParser/
H A DParserFactory.php14 public function createForVersion(PhpVersion $version): Parser { argument
15 if ($version->isHostVersion()) {
18 $lexer = new Lexer\Emulative($version);
20 if ($version->id >= 80000) {
21 return new Php8($lexer, $version);
23 return new Php7($lexer, $version);
H A DPhpVersion.php59 public static function fromString(string $version): self { argument
60 if (!preg_match('/^(\d+)\.(\d+)/', $version, $matches)) {
61 throw new \LogicException("Invalid PHP version \"$version\"");
/PHP-Parser/test/PhpParser/
H A DPhpVersionTest.php7 $version = PhpVersion::fromComponents(8, 2);
8 $this->assertSame(80200, $version->id);
10 $version = PhpVersion::fromString('8.2');
11 $this->assertSame(80200, $version->id);
13 $version = PhpVersion::fromString('8.2.14');
14 $this->assertSame(80200, $version->id);
16 $version = PhpVersion::fromString('8.2.14rc1');
17 $this->assertSame(80200, $version->id);
H A DCodeParsingTest.php21 public function createParser(?string $version): Parser { argument
23 $version = $version === null
24 ? PhpVersion::getNewestSupported() : PhpVersion::fromString($version);
25 return $factory->createForVersion($version);
/PHP-Parser/test/code/parser/scalar/
H A DinvalidOctal.test6 !!version=7.0
19 !!version=5.6
H A DunicodeEscape.test47 !!version=5.6
/PHP-Parser/.github/workflows/
H A Dmain.yml18 php-version: "7.4"
33 name: "PHP ${{ matrix.php-version }} Unit Tests"
36 php-version:
50 php-version: "${{ matrix.php-version }}"
67 php-version: "8.4"
84 php-version: "7.4"
101 php-version: "8.3"
118 php-version: "8.3"
/PHP-Parser/test/code/parser/expr/
H A DassignNewByRef.test6 !!version=5.6
27 !!version=7.0
H A DconcatPrecedence.test7 !!version=8.0
55 !!version=7.4
H A Dalternative_array_syntax.test15 !!version=7.4
/PHP-Parser/test/code/parser/stmt/function/
H A DnullFalseTrueTypes.test9 !!version=8.1
64 !!version=8.2
H A DtypeVersions.test1 Types by version
14 !!version=5.6
226 !!version=7.0
438 !!version=7.1
650 !!version=7.2
862 !!version=8.0
1074 !!version=8.1
/PHP-Parser/test/code/parser/stmt/class/
H A DreadonlyAsClassName.test17 !!version=7.4
/PHP-Parser/test_old/
H A Drun-php-src.sh8 php test_old/run.php --verbose --no-progress --php-version=$VERSION PHP ./data/php-src
/PHP-Parser/test/code/prettyPrinter/stmt/
H A Dparam_comments.test82 !!version=8.0
/PHP-Parser/
H A DUPGRADE-1.0.md4 ### PHP version requirements
7 running on a newer version.
12 …re still available as aliases, as such most code should continue running on the new version without
H A DUPGRADE-5.0.md4 ### PHP version requirements
6 … It is however still possible to *parse* code for older versions, while running on a newer version.
18 version, for example `int` is treated as a class name on PHP 5.6 and as a built-in on PHP 7.0.
34 …or of three new methods that provide more fine-grained control over the PHP version being targeted:
36 …)`: Use this if you don't know the PHP version of the code you're parsing. It's better to assume a…
37 * `createForHostVersion()`: Use this if you're parsing code for the PHP version you're running on.
38 * `createForVersion()`: Use this if you know the PHP version of the code you want to parse.
42 In all cases, the PHP version is a fairly weak hint that is only used on a best-effort basis. The p…
44 For example, if you specify version `"8.0"`, then `class ReadOnly {}` is treated as a valid class d…
392 …tty printer will make formatting choices to make the code valid for that version. It currently con…
H A DUPGRADE-2.0.md4 ### PHP version requirements
7 PHP 5.3 source code, while running on a newer version.
H A DUPGRADE-4.0.md4 ### PHP version requirements
7 source code, while running on a newer version.
H A DREADME.md9 [**Documentation for version 5.x**][doc_master] (current; for running on PHP >= 7.4; for parsing PH…
11 [Documentation for version 4.x][doc_4_x] (supported; for running on PHP >= 7.0; for parsing PHP 5.2…
/PHP-Parser/test/code/prettyPrinter/expr/
H A DdocStrings.test127 !!version=7.2
H A Dyield.test82 !!version=5.6,parserVersion=8.0
/PHP-Parser/doc/
H A D2_Usage_of_basic_components.markdown34 // Parser for the version you are running on.
37 // Parser for the newest PHP version supported by the PHP-Parser library.
40 // Parser for a specific PHP version.
44 Which version you should target depends on your use case. In many cases you will want to use the
45 host version, as people typically analyze code for the version they are running on. However, when
46 analyzing arbitrary code you are usually best off using the newest supported version, which tends
H A D0_Introduction.markdown33 support them for any version.
45 version it runs on), additionally a wrapper for emulating tokens from newer versions is provided.
/PHP-Parser/doc/component/
H A DLexer.markdown12 this extension only supports lexing code for the PHP version you are running on, while this library…
31 and will try to emulate `ext/tokenizer` output for that version. This is done using separate `Token…

Completed in 34 milliseconds

12