History log of /PHP-Parser/lib/PhpParser/PrettyPrinterAbstract.php (Results 51 – 75 of 157)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 646b4907 24-Jul-2022 Nikita Popov

Don't force newline after doc string when targeting PHP >= 7.3


# 59145a44 23-Jul-2022 Nikita Popov

Treat assignments as unary operators

Assignment expressions can be viewed as unary operators where
the whole "$x =" part is the operator.


# 7bf63482 23-Jul-2022 Nikita Popov

Remove inc/dec from precedence map

Inc/dec are primitive expressions that only accept a variable
operand, rather than a general expression operand.


# a73c8ee0 23-Jul-2022 Nikita Popov

Add a phpVersion option to the pretty printer

This is currently just used to initialize the default for short
array syntax.

The default target version in 7.0, which also means t

Add a phpVersion option to the pretty printer

This is currently just used to initialize the default for short
array syntax.

The default target version in 7.0, which also means that the
default for short arrays is flipped to on.

show more ...


# 050342b5 04-Jul-2022 MathiasReker

Add visibility modifiers to constants

Closes GH-848.


# b6d11da5 05-Jun-2022 Nikita Popov

Add space after "use" during empty list insertion as well


# aff98bbf 04-Jun-2022 Nikita Popov

Use PHP 8.0 token representation

Migrate everything to use PhpToken-compatible token representation,
rather than the legacy array/string representation.


# 7c445bb6 04-Jun-2022 Tomas Votruba

Remove space before return type in insertionMap (#841)

* remove space before colon in PrettyPrinterAbstract

* update tests


# 6c0b63d9 25-Jan-2022 Dominik Peters

Change print order of modifiers

Print abstract/final before visibility modifiers, in line with
PSR-12.

Closes #826.


# 9c5eb3cc 04-Jun-2022 Nikita Popov

Add some missing type annotations


# b5234eac 12-Sep-2021 Nikita Popov

Tweak coding style


# 632ead3a 12-Sep-2021 Shalvah

Print comma before comments for new array item (#805)

Print comma before rather than after comments. Also switch to multiline mode if inserting an item with comments.

Fixes #804.


# ace6c67a 02-Sep-2021 Nikita Popov

Add support for intersection types


# 55c42692 21-Jul-2021 Máté Kocsis

Add support for new PHP 8.1 modifiers (#796)

Implement support for readonly properties (https://wiki.php.net/rfc/readonly_properties_v2) and
final class contstants (https://wiki.php.net/

Add support for new PHP 8.1 modifiers (#796)

Implement support for readonly properties (https://wiki.php.net/rfc/readonly_properties_v2) and
final class contstants (https://wiki.php.net/rfc/final_class_const).

show more ...


# feed91cf 09-Jul-2021 Nikita Popov

Avoid ctype_alnum() on integer

This is deprecated in PHP 8.1


# f68e1a43 25-Apr-2021 Tomas Votruba

[PHP 8.1] Add support for enums (#758)

RFC: https://wiki.php.net/rfc/enumerations

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>


# eff72eef 30-Sep-2020 Nikita Popov

Fix #718: PrettyPrinter breaks nested ternaries

Mark ternary as non-associative operator, as left-associative use
is deprecated in PHP 7.4 and removed in PHP 8.0.


# 88be6127 22-Sep-2020 Nikita Popov

FPPP: Fix remove + add at start of list


# c7dc3ce5 19-Sep-2020 Nikita Popov

Add basic FPPP support for attributes


# ad365b1b 29-Aug-2020 Nikita Popov

FPPP: Fix code block detection during removal

Instead of checking whether there is a {/} before/after the removed
note, check whether {/} occurs in the between-node range. Dropping
t

FPPP: Fix code block detection during removal

Instead of checking whether there is a {/} before/after the removed
note, check whether {/} occurs in the between-node range. Dropping
that is what we're really concerned about here.

show more ...


# 4bc82432 23-Aug-2020 Nikita Popov

Only special-case brace handling for statement lists

Don't interpret the } before a catch clause as a block statement
and trigger a pretty printing fallback.


# bd722809 23-Aug-2020 Nikita Popov

FPPP: Support removing nodes from start of list


# 8bcaa426 09-Aug-2020 Nikita Popov

Add parens for new/instanceof with complex expression

This is not fully accurate because the rules for "new variables"
are different than the rules for dereferenceable LHS.


# feb6bf7a 09-Aug-2020 Nikita Popov

Wrap class const LHS in parens if necessary

This looks like a very old bug in the pretty printer that showed
up in PHP 8 tests.


# 23d9c177 02-Aug-2020 Nikita Popov

Add support for nullsafe operator


1234567