Home
last modified time | relevance | path

Searched refs:phpVersion (Results 1 – 12 of 12) sorted by relevance

/PHP-Parser/lib/PhpParser/Lexer/
H A DEmulative.php34 * @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 Drun.php60 $phpVersion = $options['--php-version'] ?? '8.0'; variable
142 …= (new PhpParser\ParserFactory())->createForVersion(PhpParser\PhpVersion::fromString($phpVersion));
/PHP-Parser/test/PhpParser/Lexer/
H A DEmulativeTest.php433 … public function testTargetVersion(string $phpVersion, string $code, array $expectedTokens): void { argument
434 $lexer = new Emulative(PhpVersion::fromString($phpVersion));
/PHP-Parser/doc/component/
H A DPretty_printing.markdown37 * `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 DStandard.php145 $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 DParserAbstract.php43 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();
708 if (!$this->phpVersion->supportsBuiltinType($lowerName)) {
H A DPrettyPrinterAbstract.php130 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 Dphp.y1003 if (!$this->phpVersion->allowsAssignNewByReference()) {
1189 { $$ = array($1); parseEncapsed($$, '`', $this->phpVersion->supportsUnicodeEscapes()); }
1190 … { parseEncapsed($1, '`', $this->phpVersion->supportsUnicode…
1235 …{ $$ = Scalar\String_::fromString($1, attributes(), $this->phpVersion->supportsUnicodeEscapes()); }
1238 …parseEncapsed($2, '"', $this->phpVersion->supportsUnicodeEscapes()); $$ = new Scalar\InterpolatedS…
1243 { $$ = $this->parseLNumber($1, attributes(), $this->phpVersion->allowsInvalidOctals()); }
/PHP-Parser/lib/PhpParser/Parser/
H A DPhp8.php2182 if (!$self->phpVersion->allowsAssignNewByReference()) {
2523 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode…
2526 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode…
2584 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicode…
2588 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicode…
2591 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOc…
H A DPhp7.php2166 if (!$self->phpVersion->allowsAssignNewByReference()) {
2507 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode…
2510 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '`', $self->phpVersion->supportsUnicode…
2568 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicode…
2572 …lue = Node\Scalar\String_::parseEscapeSequences($s->value, '"', $self->phpVersion->supportsUnicode…
2575 …nStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->allowsInvalidOc…
/PHP-Parser/
H A DUPGRADE-5.0.md392 The pretty printer now accepts a `phpVersion` option, which accepts a `PhpVersion` object and defau…
H A DCHANGELOG.md475 * Added `phpVersion` option to the emulative lexer, which allows controlling the target version to

Completed in 90 milliseconds