History log of /PHP-Parser/ (Results 701 – 725 of 1692)
Revision (<<< Hide revision tags) (Show revision tags >>>)Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
e5453f0d01-Dec-2017 Nikita Popov

Extract pSingleQuotedString as an extension point

And add some more string formatting tests.

b507fa4301-Dec-2017 Nikita Popov

Ensure names are not empty

336a49b413-Nov-2017 Nikita Popov

FPPP: Fix comment indentation (#443)

fa174b0913-Nov-2017 Nikita Popov

Merge branch '3.x'


94ca9a7a13-Nov-2017 Nikita Popov

Use Tokens::class in lexer

Ref #441.

0bb74e0312-Nov-2017 Nikita Popov

Drop two more getType() usages in builders

8d3f48ab12-Nov-2017 Nikita Popov

Switch some auxiliary pretty printer tables away from getType()

Instead use class names via ::class.

1c11626f12-Nov-2017 Nikita Popov

Add explicit getType() methods

Rather than automatically deriving getType() from the class name.


lib/PhpParser/Node/Arg.php
lib/PhpParser/Node/Const_.php
lib/PhpParser/Node/Expr/ArrayDimFetch.php
lib/PhpParser/Node/Expr/ArrayItem.php
lib/PhpParser/Node/Expr/Array_.php
lib/PhpParser/Node/Expr/Assign.php
lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
lib/PhpParser/Node/Expr/AssignOp/BitwiseXor.php
lib/PhpParser/Node/Expr/AssignOp/Concat.php
lib/PhpParser/Node/Expr/AssignOp/Div.php
lib/PhpParser/Node/Expr/AssignOp/Minus.php
lib/PhpParser/Node/Expr/AssignOp/Mod.php
lib/PhpParser/Node/Expr/AssignOp/Mul.php
lib/PhpParser/Node/Expr/AssignOp/Plus.php
lib/PhpParser/Node/Expr/AssignOp/Pow.php
lib/PhpParser/Node/Expr/AssignOp/ShiftLeft.php
lib/PhpParser/Node/Expr/AssignOp/ShiftRight.php
lib/PhpParser/Node/Expr/AssignRef.php
lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php
lib/PhpParser/Node/Expr/BinaryOp/BitwiseOr.php
lib/PhpParser/Node/Expr/BinaryOp/BitwiseXor.php
lib/PhpParser/Node/Expr/BinaryOp/BooleanAnd.php
lib/PhpParser/Node/Expr/BinaryOp/BooleanOr.php
lib/PhpParser/Node/Expr/BinaryOp/Coalesce.php
lib/PhpParser/Node/Expr/BinaryOp/Concat.php
lib/PhpParser/Node/Expr/BinaryOp/Div.php
lib/PhpParser/Node/Expr/BinaryOp/Equal.php
lib/PhpParser/Node/Expr/BinaryOp/Greater.php
lib/PhpParser/Node/Expr/BinaryOp/GreaterOrEqual.php
lib/PhpParser/Node/Expr/BinaryOp/Identical.php
lib/PhpParser/Node/Expr/BinaryOp/LogicalAnd.php
lib/PhpParser/Node/Expr/BinaryOp/LogicalOr.php
lib/PhpParser/Node/Expr/BinaryOp/LogicalXor.php
lib/PhpParser/Node/Expr/BinaryOp/Minus.php
lib/PhpParser/Node/Expr/BinaryOp/Mod.php
lib/PhpParser/Node/Expr/BinaryOp/Mul.php
lib/PhpParser/Node/Expr/BinaryOp/NotEqual.php
lib/PhpParser/Node/Expr/BinaryOp/NotIdentical.php
lib/PhpParser/Node/Expr/BinaryOp/Plus.php
lib/PhpParser/Node/Expr/BinaryOp/Pow.php
lib/PhpParser/Node/Expr/BinaryOp/ShiftLeft.php
lib/PhpParser/Node/Expr/BinaryOp/ShiftRight.php
lib/PhpParser/Node/Expr/BinaryOp/Smaller.php
lib/PhpParser/Node/Expr/BinaryOp/SmallerOrEqual.php
lib/PhpParser/Node/Expr/BinaryOp/Spaceship.php
lib/PhpParser/Node/Expr/BitwiseNot.php
lib/PhpParser/Node/Expr/BooleanNot.php
lib/PhpParser/Node/Expr/Cast/Array_.php
lib/PhpParser/Node/Expr/Cast/Bool_.php
lib/PhpParser/Node/Expr/Cast/Double.php
lib/PhpParser/Node/Expr/Cast/Int_.php
lib/PhpParser/Node/Expr/Cast/Object_.php
lib/PhpParser/Node/Expr/Cast/String_.php
lib/PhpParser/Node/Expr/Cast/Unset_.php
lib/PhpParser/Node/Expr/ClassConstFetch.php
lib/PhpParser/Node/Expr/Clone_.php
lib/PhpParser/Node/Expr/Closure.php
lib/PhpParser/Node/Expr/ClosureUse.php
lib/PhpParser/Node/Expr/ConstFetch.php
lib/PhpParser/Node/Expr/Empty_.php
lib/PhpParser/Node/Expr/Error.php
lib/PhpParser/Node/Expr/ErrorSuppress.php
lib/PhpParser/Node/Expr/Eval_.php
lib/PhpParser/Node/Expr/Exit_.php
lib/PhpParser/Node/Expr/FuncCall.php
lib/PhpParser/Node/Expr/Include_.php
lib/PhpParser/Node/Expr/Instanceof_.php
lib/PhpParser/Node/Expr/Isset_.php
lib/PhpParser/Node/Expr/List_.php
lib/PhpParser/Node/Expr/MethodCall.php
lib/PhpParser/Node/Expr/New_.php
lib/PhpParser/Node/Expr/PostDec.php
lib/PhpParser/Node/Expr/PostInc.php
lib/PhpParser/Node/Expr/PreDec.php
lib/PhpParser/Node/Expr/PreInc.php
lib/PhpParser/Node/Expr/Print_.php
lib/PhpParser/Node/Expr/PropertyFetch.php
lib/PhpParser/Node/Expr/ShellExec.php
lib/PhpParser/Node/Expr/StaticCall.php
lib/PhpParser/Node/Expr/StaticPropertyFetch.php
lib/PhpParser/Node/Expr/Ternary.php
lib/PhpParser/Node/Expr/UnaryMinus.php
lib/PhpParser/Node/Expr/UnaryPlus.php
lib/PhpParser/Node/Expr/Variable.php
lib/PhpParser/Node/Expr/YieldFrom.php
lib/PhpParser/Node/Expr/Yield_.php
lib/PhpParser/Node/Identifier.php
lib/PhpParser/Node/Name.php
lib/PhpParser/Node/Name/FullyQualified.php
lib/PhpParser/Node/Name/Relative.php
lib/PhpParser/Node/NullableType.php
lib/PhpParser/Node/Param.php
lib/PhpParser/Node/Scalar/DNumber.php
lib/PhpParser/Node/Scalar/Encapsed.php
lib/PhpParser/Node/Scalar/EncapsedStringPart.php
lib/PhpParser/Node/Scalar/LNumber.php
lib/PhpParser/Node/Scalar/MagicConst/Class_.php
lib/PhpParser/Node/Scalar/MagicConst/Dir.php
lib/PhpParser/Node/Scalar/MagicConst/File.php
lib/PhpParser/Node/Scalar/MagicConst/Function_.php
lib/PhpParser/Node/Scalar/MagicConst/Line.php
lib/PhpParser/Node/Scalar/MagicConst/Method.php
lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php
lib/PhpParser/Node/Scalar/MagicConst/Trait_.php
lib/PhpParser/Node/Scalar/String_.php
lib/PhpParser/Node/Stmt/Break_.php
lib/PhpParser/Node/Stmt/Case_.php
lib/PhpParser/Node/Stmt/Catch_.php
lib/PhpParser/Node/Stmt/ClassConst.php
lib/PhpParser/Node/Stmt/ClassMethod.php
lib/PhpParser/Node/Stmt/Class_.php
lib/PhpParser/Node/Stmt/Const_.php
lib/PhpParser/Node/Stmt/Continue_.php
lib/PhpParser/Node/Stmt/DeclareDeclare.php
lib/PhpParser/Node/Stmt/Declare_.php
lib/PhpParser/Node/Stmt/Do_.php
lib/PhpParser/Node/Stmt/Echo_.php
lib/PhpParser/Node/Stmt/ElseIf_.php
lib/PhpParser/Node/Stmt/Else_.php
lib/PhpParser/Node/Stmt/Expression.php
lib/PhpParser/Node/Stmt/Finally_.php
lib/PhpParser/Node/Stmt/For_.php
lib/PhpParser/Node/Stmt/Foreach_.php
lib/PhpParser/Node/Stmt/Function_.php
lib/PhpParser/Node/Stmt/Global_.php
lib/PhpParser/Node/Stmt/Goto_.php
lib/PhpParser/Node/Stmt/GroupUse.php
lib/PhpParser/Node/Stmt/HaltCompiler.php
lib/PhpParser/Node/Stmt/If_.php
lib/PhpParser/Node/Stmt/InlineHTML.php
lib/PhpParser/Node/Stmt/Interface_.php
lib/PhpParser/Node/Stmt/Label.php
lib/PhpParser/Node/Stmt/Namespace_.php
lib/PhpParser/Node/Stmt/Nop.php
lib/PhpParser/Node/Stmt/Property.php
lib/PhpParser/Node/Stmt/PropertyProperty.php
lib/PhpParser/Node/Stmt/Return_.php
lib/PhpParser/Node/Stmt/StaticVar.php
lib/PhpParser/Node/Stmt/Static_.php
lib/PhpParser/Node/Stmt/Switch_.php
lib/PhpParser/Node/Stmt/Throw_.php
lib/PhpParser/Node/Stmt/TraitUse.php
lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php
lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php
lib/PhpParser/Node/Stmt/Trait_.php
lib/PhpParser/Node/Stmt/TryCatch.php
lib/PhpParser/Node/Stmt/Unset_.php
lib/PhpParser/Node/Stmt/UseUse.php
lib/PhpParser/Node/Stmt/Use_.php
lib/PhpParser/Node/Stmt/While_.php
lib/PhpParser/Node/VarLikeIdentifier.php
lib/PhpParser/NodeAbstract.php
05e2cd2812-Nov-2017 Nikita Popov

Merge branch '3.x'

Conflicts:
lib/PhpParser/NodeAbstract.php


bac91b4211-Nov-2017 Maks Rafalko

Correctly determine Type of Node when PHP-Parser's namespaces are prefixed

Hi there,

I'm working on mutation testing framework ([Infection](https://github.com/infection/infection/))

Correctly determine Type of Node when PHP-Parser's namespaces are prefixed

Hi there,

I'm working on mutation testing framework ([Infection](https://github.com/infection/infection/)) that is distributed as a PHAR. One of this goal is to run target project's test suite against mutated code. Since we use reflection and load project's autoloader, we want to avoid potential conflicts between vendor files of Infection itself and the target project.

To avoid this issue, there is a project calld [PHP-Scoper](https://github.com/humbug/php-scoper). What it does is it prefixes all the namespaces of the library (including vendor folder) with some character(s), for example namespace `Infection\Mutator\PublicVisibility` is transformed to `ScoperAbc123\Infection\Mutant\PublicVisibility`.

But since it also prefixes vendor folder, PHP-Parser's classes are prefixed as well and `NodeAbstract::getType()` after this prefixing works incorrectly.

There is a hardcoded number `15` which means to remove `'PhpParser\Node'` (length=15) substring from the FQCN.

Code:

```php
// PHPParser\Node\Stmt\Declare_ -> Stmt_Declare

return strtr(substr(rtrim(get_class($this), '_'), 15), '\\', '_');
```

What I suggest is a little be more dynamic solution, to correctly extract class name (type) from the ***prefixed*** FQCL:

`ScoperAbc123\PHPParser\Node\Stmt\Declare_` -> `Stmt_Declare`

show more ...

a75164c712-Nov-2017 Nikita Popov

Rename YYNLSTATES to numNonLeafStates

c59e75f811-Nov-2017 Nikita Popov

Clear parser state directly after parsing

I don't think this makes any difference in practical scenarios, but
it makes memory usage analysis simpler.

4392a7b111-Nov-2017 Nikita Popov

Fix PHP5 static call fixup

Variable nodes directly store the variable name as a string, they
don't use VarLikeIdentifier. So remove this wrapper if it exists.

Revision tags: v4.0.0alpha2
a659240d10-Nov-2017 Nikita Popov

Release PHP-Parser 4.0.0 Alpha 2

68e9b91e10-Nov-2017 Nikita Popov

Use fully-qualified names for global constant references

7162b36f10-Nov-2017 Nikita Popov

Add bullet point summary to main README as well

73be076710-Nov-2017 Nikita Popov

Docs: Add performance section

e2c0c59804-Nov-2017 Nikita Popov

FPPP: Optimize indentation calculation

Precalculate the indentation for every position. The previous
implementation was quadratic for long lines.

66f88cfa04-Nov-2017 Nikita Popov

Update changelog

9b6a257704-Nov-2017 Nikita Popov

FPPP: Convert some checks to assertions

Don't just silently fall back if we receive illegal input.

457fe04904-Nov-2017 Nikita Popov

Ensure nodes have full complement of location info

6a2e1ae404-Nov-2017 Nikita Popov

FPPP: Graceful handling of comment changes

47c973b304-Nov-2017 Nikita Popov

Store start token position in comments

56bc8ebb04-Nov-2017 Nikita Popov

FPPP: Add support for removal from list nodes

361398bc04-Nov-2017 Nikita Popov

Merge branch '3.x'

Conflicts:
CHANGELOG.md


1...<<21222324252627282930>>...68