History log of /PHP-Parser/ (Results 126 – 150 of 1690)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
df3a705721-May-2023 Nikita Popov

Add Name::getParts(), deprecate Name::$parts

In preparation for switching this to a plain string in
PHP-Parser 5, deprecate direct access to the property and
provide an API that will

Add Name::getParts(), deprecate Name::$parts

In preparation for switching this to a plain string in
PHP-Parser 5, deprecate direct access to the property and
provide an API that will work on both versions.

(cherry picked from commit c9e5a13d68486e9fd75f9be1b4639644e54e7f4f)

show more ...

d43edfbb21-May-2023 Nikita Popov

Support CRLF newlines in pretty printer

Can be enabled using the "newlines" option.

ad8daa1221-May-2023 Nikita Popov

Normalize newlines in Comment::getReformattedText()

Normalize CRLF to LF in getReformattedText(). That was, if the
comment is pretty-printed, we will use proper LF newlines, rather
t

Normalize newlines in Comment::getReformattedText()

Normalize CRLF to LF in getReformattedText(). That was, if the
comment is pretty-printed, we will use proper LF newlines, rather
than inserting indentation between the CR and LF.

At the same time, this also makes it easier to emit actual CRLF
newlines with a custom pretty printer.

Fixes #599.

show more ...

5883189d21-May-2023 Nikita Popov

Fix return type of Comment::getReformattedText()

afe1628a21-May-2023 Nikita Popov

Add support for NodeVisitor::REPLACE_WITH_NULL

Fixes #716.

289756d021-May-2023 Nikita Popov

Gracefully handle non-contiguous arrays in Differ

Fixes #909.

8490c0e821-May-2023 Nikita Popov

Call leaveNode() on visitors in reverse order

Node visitation is now properly nested. The call sequence will
now be

$visitor1->enterNode($n);
$visitor2->enterNode($n

Call leaveNode() on visitors in reverse order

Node visitation is now properly nested. The call sequence will
now be

$visitor1->enterNode($n);
$visitor2->enterNode($n);
$visitor2->leaveNode($n);
$visitor1->leaveNode($n);

rather than

$visitor1->enterNode($n);
$visitor2->enterNode($n);
$visitor1->leaveNode($n);
$visitor2->leaveNode($n);

Fixes #899.

show more ...

8bc6982421-May-2023 Nikita Popov

Ensure removing visitor does not leave holes

fb2c3ac920-May-2023 Nikita Popov

Fix emulative lexer with default error handler

If no error handler is provided, explicitly create one, so we don't
end up calling handleError() on null.

c23976a220-May-2023 Nikita Popov

Stop accepting strings as types

For types the use of a string is ambiguous -- it could be either
an Identifier or a Name. Don't guess.

Retain the implicit promotion to Identifie

Stop accepting strings as types

For types the use of a string is ambiguous -- it could be either
an Identifier or a Name. Don't guess.

Retain the implicit promotion to Identifier in places where only
Identifier is legal, e.g. various symbol names.

show more ...

a9dad5c520-May-2023 Nikita Popov

Fix type of ClassConst::$type

74caed6420-May-2023 Nikita Popov

Fix labelCharMap for DEL character

This map is supposed to have string keys, not integer keys.

a5d4c10020-May-2023 Nikita Popov

Remove some unused symbols

93731c5c20-May-2023 Nikita Popov

Move constants from NodeTraverser to NodeVisitor

These are really part of the NodeVisitor API. Retain aliases for
compatibility.

0a8a333a20-May-2023 Nikita Popov

Blacklist test with comments in intersection types

91da191420-May-2023 Nikita Popov

Support readonly anonymous classes

5c267f5520-May-2023 Nikita Popov

Add support for typed constants

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

9a5d5c1120-May-2023 Nikita Popov

Add newline at end of file for many tests

Add the newline in reconstructTest() and run updateTests.php, to
reduce spurious diffs in the future.


test/PhpParser/CodeTestParser.php
test/code/parser/blockComments.test
test/code/parser/comments.test
test/code/parser/errorHandling/eofError.test
test/code/parser/expr/arrayDef.test
test/code/parser/expr/arrayDestructuring.test
test/code/parser/expr/arrayEmptyElemens.test
test/code/parser/expr/arraySpread.test
test/code/parser/expr/arrow_function.test
test/code/parser/expr/assign.test
test/code/parser/expr/assignNewByRef.test
test/code/parser/expr/cast.test
test/code/parser/expr/clone.test
test/code/parser/expr/closure.test
test/code/parser/expr/closure_use_trailing_comma.test
test/code/parser/expr/comparison.test
test/code/parser/expr/concatPrecedence.test
test/code/parser/expr/constant_expr.test
test/code/parser/expr/errorSuppress.test
test/code/parser/expr/exit.test
test/code/parser/expr/exprInIsset.test
test/code/parser/expr/exprInList.test
test/code/parser/expr/fetchAndCall/args.test
test/code/parser/expr/fetchAndCall/constFetch.test
test/code/parser/expr/fetchAndCall/constantDeref.test
test/code/parser/expr/fetchAndCall/funcCall.test
test/code/parser/expr/fetchAndCall/namedArgs.test
test/code/parser/expr/fetchAndCall/newDeref.test
test/code/parser/expr/fetchAndCall/objectAccess.test
test/code/parser/expr/fetchAndCall/simpleArrayAccess.test
test/code/parser/expr/fetchAndCall/staticCall.test
test/code/parser/expr/fetchAndCall/staticPropertyFetch.test
test/code/parser/expr/firstClassCallables.test
test/code/parser/expr/includeAndEval.test
test/code/parser/expr/issetAndEmpty.test
test/code/parser/expr/keywordsInNamespacedName.test
test/code/parser/expr/listReferences.test
test/code/parser/expr/listWithKeys.test
test/code/parser/expr/logic.test
test/code/parser/expr/match.test
test/code/parser/expr/math.test
test/code/parser/expr/new.test
test/code/parser/expr/newWithoutClass.test
test/code/parser/expr/print.test
test/code/parser/expr/shellExec.test
test/code/parser/expr/ternaryAndCoalesce.test
test/code/parser/expr/throw.test
test/code/parser/expr/trailingCommas.test
test/code/parser/expr/uvs/constDeref.test
test/code/parser/expr/uvs/globalNonSimpleVarError.test
test/code/parser/expr/uvs/indirectCall.test
test/code/parser/expr/uvs/isset.test
test/code/parser/expr/uvs/new.test
test/code/parser/expr/uvs/newInstanceofExpr.test
test/code/parser/expr/uvs/staticProperty.test
test/code/parser/expr/varVarPos.test
test/code/parser/expr/variable.test
test/code/parser/nopPositions.test
test/code/parser/scalar/explicitOctal.test
test/code/parser/scalar/invalidOctal.test
test/code/parser/scalar/magicConst.test
test/code/parser/stmt/class/abstract.test
test/code/parser/stmt/class/class_position.test
test/code/parser/stmt/class/conditional.test
test/code/parser/stmt/class/constModifierErrors.test
test/code/parser/stmt/class/constModifiers.test
test/code/parser/stmt/class/enum.test
test/code/parser/stmt/class/enum_with_string.test
test/code/parser/stmt/class/final.test
test/code/parser/stmt/class/interface.test
test/code/parser/stmt/class/name.test
test/code/parser/stmt/class/property_promotion.test
test/code/parser/stmt/class/readonly.test
test/code/parser/stmt/class/readonlyAsClassName.test
test/code/parser/stmt/class/readonlyMethod.test
test/code/parser/stmt/class/staticMethod.test
test/code/parser/stmt/class/staticType.test
test/code/parser/stmt/class/trait.test
test/code/parser/stmt/const.test
test/code/parser/stmt/controlFlow.test
test/code/parser/stmt/echo.test
test/code/parser/stmt/function/builtinTypeDeclarations.test
test/code/parser/stmt/function/byRef.test
test/code/parser/stmt/function/conditional.test
test/code/parser/stmt/function/defaultValues.test
test/code/parser/stmt/function/neverType.test
test/code/parser/stmt/function/nullFalseTrueTypes.test
test/code/parser/stmt/function/nullableTypes.test
test/code/parser/stmt/function/parameters_trailing_comma.test
test/code/parser/stmt/function/returnTypes.test
test/code/parser/stmt/function/specialVars.test
test/code/parser/stmt/function/typeDeclarations.test
test/code/parser/stmt/function/typeVersions.test
test/code/parser/stmt/function/variadic.test
test/code/parser/stmt/function/variadicDefaultValue.test
test/code/parser/stmt/generator/basic.test
test/code/parser/stmt/generator/yieldPrecedence.test
test/code/parser/stmt/generator/yieldUnaryPrecedence.test
test/code/parser/stmt/haltCompiler.test
test/code/parser/stmt/haltCompilerInvalidSyntax.test
test/code/parser/stmt/haltCompilerOffset.test
test/code/parser/stmt/haltCompilerOutermostScope.test
test/code/parser/stmt/hashbang.test
test/code/parser/stmt/if.test
test/code/parser/stmt/inlineHTML.test
test/code/parser/stmt/loop/do.test
test/code/parser/stmt/loop/for.test
test/code/parser/stmt/loop/foreach.test
test/code/parser/stmt/loop/while.test
test/code/parser/stmt/multiCatch.test
test/code/parser/stmt/namespace/braced.test
test/code/parser/stmt/namespace/commentAfterNamespace.test
test/code/parser/stmt/namespace/name.test
test/code/parser/stmt/namespace/nested.test
test/code/parser/stmt/namespace/notBraced.test
test/code/parser/stmt/namespace/nsAfterHashbang.test
test/code/parser/stmt/switch.test
test/code/parser/stmt/tryCatch.test
test/code/parser/stmt/tryCatch_without_variable.test
test/code/parser/stmt/tryWithoutCatch.test
test/code/parser/stmt/unset.test
779b695020-May-2023 Nikita Popov

Fix coding style

b68fb76f19-May-2023 Nikita Popov

Add makeReadonly() to param builder

(cherry picked from commit 11e2dcd96c830ee934fa7b0243f4d67d8a8821ab)

36a6dcd006-Mar-2023 Cees-Jan Kiewiet

[5.x] Add constructor property promotion

By making flags on the Param builder configurable by providing make(Public|Protected|Private) methods we can promote parameters to properties from th

[5.x] Add constructor property promotion

By making flags on the Param builder configurable by providing make(Public|Protected|Private) methods we can promote parameters to properties from the constructor

show more ...

bb4263ea05-Mar-2023 Nikita Popov

Treat del as label character depending on PHP version

In formatting-preserving pretty printing, treat DEL as a label
character based on the target PHP version (the default of 7.1
imp

Treat del as label character depending on PHP version

In formatting-preserving pretty printing, treat DEL as a label
character based on the target PHP version (the default of 7.1
implying it isn't one).

This avoids failure to round-trip an unchanged input.

show more ...

4ce0de2d05-Mar-2023 Nikita Popov

Use PHP 7.1 as default pretty printer target

a3bc900a05-Mar-2023 Nikita Popov

Don't ltrim when preserving formatting

We shouldn't ltrim when printing a whole file, that way we will
not just fail to preserve formatting, but actually change semantics
by dropping

Don't ltrim when preserving formatting

We shouldn't ltrim when printing a whole file, that way we will
not just fail to preserve formatting, but actually change semantics
by dropping meaningful whitespace.

show more ...

7785d2b805-Mar-2023 Nikita Popov

Remove garbage collection section from docs

The GC issue has been fixed in PHP 7.3 and is no longer relevant.

12345678910>>...68