/PHP-Parser/lib/PhpParser/Lexer/ |
H A D | Emulative.php | 34 * @param PhpVersion|null $phpVersion PHP version to emulate. Defaults to newest supported. 36 public function __construct(?PhpVersion $phpVersion = null) { argument 37 $this->targetPhpVersion = $phpVersion ?? PhpVersion::getNewestSupported();
|
/PHP-Parser/test_old/ |
H A D | run.php | 60 $phpVersion = $options['--php-version'] ?? '8.0'; variable 142 …= (new PhpParser\ParserFactory())->createForVersion(PhpParser\PhpVersion::fromString($phpVersion));
|
/PHP-Parser/test/PhpParser/Lexer/ |
H A D | EmulativeTest.php | 433 … public function testTargetVersion(string $phpVersion, string $code, array $expectedTokens): void { argument 434 $lexer = new Emulative(PhpVersion::fromString($phpVersion));
|
/PHP-Parser/doc/component/ |
H A D | Pretty_printing.markdown | 37 * `phpVersion` (defaults to 7.4) allows opting into formatting that is not supported by older PHP 42 a legacy option, and `phpVersion` should be used to control this behavior instead. 44 The behaviors controlled by `phpVersion` (defaults to PHP 7.4) are:
|
/PHP-Parser/lib/PhpParser/PrettyPrinter/ |
H A D | Standard.php | 145 $shouldIdent = $this->phpVersion->supportsFlexibleHeredoc(); 165 $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; 184 $nl = $this->phpVersion->supportsFlexibleHeredoc() ? $this->nl : $this->newline; 572 …$this->phpVersion->supportsShortArrayDestructuring() ? Expr\List_::KIND_ARRAY : Expr\List_::KIND_L… 659 …. '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList(… 691 …. '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList(… 738 if (!$this->phpVersion->supportsYieldWithoutParentheses()) { 848 …. ($node->params ? '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailing… 857 …. '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList(… 875 …. '(' . $this->pMaybeMultiline($node->params, $this->phpVersion->supportsTrailingCommaInParamList(… [all …]
|
/PHP-Parser/lib/PhpParser/ |
H A D | ParserAbstract.php | 43 protected PhpVersion $phpVersion; variable in PhpParser\\ParserAbstract 150 * @param PhpVersion $phpVersion PHP version to target, defaults to latest supported. This 156 public function __construct(Lexer $lexer, ?PhpVersion $phpVersion = null) { argument 158 $this->phpVersion = $phpVersion ?? PhpVersion::getNewestSupported(); 706 if (!$this->phpVersion->supportsBuiltinType($lowerName)) {
|
H A D | PrettyPrinterAbstract.php | 130 protected PhpVersion $phpVersion; variable in PhpParser\\PrettyPrinterAbstract 193 $this->phpVersion = $options['phpVersion'] ?? PhpVersion::fromComponents(7, 4); 201 $options['shortArraySyntax'] ?? $this->phpVersion->supportsShortArraySyntax(); 203 $this->phpVersion->supportsFlexibleHeredoc() ? null : '_DOC_STRING_END_' . mt_rand(); 1287 if ($this->phpVersion->allowsDelInIdentifiers()) {
|
/PHP-Parser/grammar/ |
H A D | php.y | 1004 if (!$this->phpVersion->allowsAssignNewByReference()) { 1190 { $$ = array($1); parseEncapsed($$, '`', $this->phpVersion->supportsUnicodeEscapes()); } 1191 … { parseEncapsed($1, '`', $this->phpVersion->supportsUnicode… 1236 …{ $$ = Scalar\String_::fromString($1, attributes(), $this->phpVersion->supportsUnicodeEscapes()); } 1239 …parseEncapsed($2, '"', $this->phpVersion->supportsUnicodeEscapes()); $$ = new Scalar\InterpolatedS… 1244 { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion->allowsInvalidOctals()); }
|
/PHP-Parser/lib/PhpParser/Parser/ |
H A D | Php7.php | 2175 if (!$self->phpVersion->allowsAssignNewByReference()) { 2516 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode… 2519 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode… 2577 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicode… 2581 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicode… 2584 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOc…
|
H A D | Php8.php | 2177 if (!$self->phpVersion->allowsAssignNewByReference()) { 2518 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode… 2521 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode… 2579 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicode… 2583 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicode… 2586 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOc…
|
/PHP-Parser/ |
H A D | UPGRADE-5.0.md | 392 The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defau…
|
H A D | CHANGELOG.md | 482 * Added `phpVersion` option to the emulative lexer, which allows controlling the target version to
|