Lines Matching refs:to

6 * Added support for declaring functions with name `exit` or `die`, to allow their use in stubs.
13 * Added `indent` option to pretty printer, which can be used to specify the indentation to use
14 (defaulting to four spaces). This also allows using tab indentation.
36 argument or a single plain argument continues to use a `Node\Expr\Exit_` node. Otherwise (e.g.
38 * Added support for passing enum values to various builder methods, like `BuilderFactory::val()`.
43 supported by the PHP 7 parser. This is necessary in order to support property hooks.
72 * Update `PhpVersion::getNewestSupported()` to report PHP 8.3 instead of PHP 8.2.
79 * Added check to detect use of PHP-Parser with libraries that define `T_*` compatibility tokens
80 with incorrect type (such as string instead of int). This would lead to `TypeError`s down the
81 line. Now an `Error` will be thrown early to indicate the problem.
104 * Added `rawValue` attribute to `InterpolatedStringPart` and heredoc/nowdoc `String_`s, which
107 * Added `Stmt\Block` to represent `{}` code blocks. Previously, such code blocks were flattened
114 * Use visitor to assign comments. This fixes the long-standing issue where comments were assigned
115 to all nodes sharing a starting position. Now only the outer-most node will hold the comments.
131 * Visitors can now be passed directly to the `NodeTraverser` constructor. A separate call to
136 * The minimum host PHP version is now PHP 7.4. It is still possible to parse code from older
142 * Attribute handling has been moved from the lexer to the parser, and is no longer configurable.
145 * The pretty printer now defaults to PHP 7.4 as the target version.
176 * Moved `NodeTraverser::REMOVE_NODE` etc. to `NodeVisitor::REMOVE_NODE`. The old constants are still
183 * `Comment::getReformattedText()` now normalizes CRLF newlines to LF newlines.
217 version is set to older than PHP 7.0.
219 * Fixed checks for when it is safe to print strings as heredoc/nowdoc to accommodate flexible
241 * PHP 7.1 is now required to run PHP-Parser.
242 * Formatting of the standard pretty printer has been adjusted to match PSR-12 more closely.
260 * The PHP 5 parser has been removed. The PHP 7 parser has been adjusted to deal with PHP 5 code
268 * Fixed formatting preservation when adding *multiple* attributes to a class/method/etc that
282 * Added `__serialize` and `__unserialize` to magic method list.
284 * Fixed formatting preservation when adding attributes to a class/method/etc that previously had no…
292 * Added `rawValue` attribute to `LNumber`, `DNumber` and `String_` nodes, which stores the unparsed
306 to avoid a dynamic property deprecation warning with PHP 8.2.
326 argument is a `VariadicPlaceholder`. The representation is intended to be forward-compatible with
328 `Expr\CallLike`, which provides an `isFirstClassCallable()` method to determine whether a
329 placeholder id present. `getArgs()` can be used to assert that the call is not a first-class
348 * Fixed compatibility with PHP 8.1. `&` tokens are now canonicalized to the
359 * An `addAttribute()` method accepting an `Attribute` or `AttributeGroup` has been adde to all
401 * Ternary expressions are now treated as non-associative in the pretty printer, in order to
450 * Added support for removing the first element of a list to the formatting-preserving pretty
466 backwards compatibility reasons, throw expressions in statement context continue to be
482 * Added `phpVersion` option to the emulative lexer, which allows controlling the target version to
483 emulate (defaults to the latest available, currently PHP 8.0). This is useful to parse code that
537 * Added `getProperty()` method to `ClassLike` nodes.
542 inserting code next to certain nop statements. The formatting is still ugly though.
563 * php-yacc is now used to generate the parser. This has no impact on users of the library.
570 * Added getProperties(), getConstants() and getTraitUses() to ClassLike. (#629, #630)
574 * Fixed flexible heredoc emulation to check for digits after the end label. This synchronizes
600 * `php-parse` will now print messages to stderr, so that stdout only contains the actual result of
622 * Add `kind` attribute to `Cast\Double_`, which allows to distinguish between `(float)`,
650 available on PHP versions before 7.3, support has to be emulated. This emulation is not perfect
651 and some cases which we do not expect to occur in practice (such as flexible doc strings being
654 * Added `DONT_TRAVERSE_CURRENT_AND_CHILDREN` to `NodeTraverser` to skip both traversal of child
662 * The following methods have been added to `BuilderFactory`:
706 * Added checks to node traverser to prevent replacing a statement with an expression or vice versa.
708 * Added the following methods to `BuilderFactory`, to simplify creation of expressions:
735 * The `Autoloader` class has been removed. It is now required to use the Composer autoloader.
761 * Added start token offsets to comments.
770 * Added `replaceNodes` option to `NameResolver`, defaulting to true. If this option is disabled,
773 * Added `NodeFinder` class, which can be used to find nodes based on a callback or class name. This
774 is a utility to avoid custom node visitor implementations for simple search operations.
787 `getStartFilePos()` and `getEndFilePos()` methods to `Node`. These provide a more obvious access
789 * Added `ConstExprEvaluator` to evaluate constant expressions to PHP values.
799 * The `name` subnode of `Param` has been renamed to `var` and now contains a `Variable` rather than
801 * The `name` subnode of `StaticVar` has been renamed to `var` and now contains a `Variable` rather
807 can be used to get the effective alias, even if it is not explicitly given.
817 * The `Node::setLine()` method has been removed. If you really need to, you can use `setAttribute()`
860 * Added `setDocComment()` method to namespace builder. (#437)
924 into `p()`, instead of directly dispatching to the type-specific printing method).
940 * Throw a `LogicException` when trying to pretty-print an `Error` node. Previously this resulted in
946 * Added `preserveOriginalNames` option to `NameResolver`. If this option is enabled, an
947 `originalName` attribute, containing the unresolved name, will be added to each resolved name.
994 * Added optional `ErrorHandler` argument to `Parser::parse()`, `Lexer::startLexing()` and
1006 * Due to the error handling changes, the `Parser` interface and `Lexer` API have changed.
1050 (instead of `Name` instances) similar to other builtin types.
1053 methods. The constructor changed to accept the additional subnode.
1060 to `items` and now contains `ArrayItem`s instead of plain variables.
1061 * [7.1] Added support for multi-catch. The `Catch` subnode `type` has been renamed to `types` and
1068 Due to PHP 7.1 support additions described above, the node structure changed as follows:
1071 * The `ClassConst` constructor changed to accept an additional `flags` subnode.
1073 * The `List` subnode `vars` has been renamed to `items` and now contains `ArrayItem`s instead of
1075 * The `Catch` subnode `type` has been renamed to `types` and is now an array of `Name`s.
1079 * The `type` subnode on `Class`, `ClassMethod` and `Property` has been renamed to `flags`. The
1080 `type` subnode has retained for backwards compatibility and is populated to the same value as
1081 `flags`. However, writes to `type` will not update `flags`.
1092 * Removed support for running on PHP 5.4. It is however still possible to parse PHP 5.2-5.4 code
1120 * Added `dumpComments` option to node dumper, to enable dumping of comments associated with nodes.
1121 * Added `Stmt\Nop` node, that is used to collect comments located at the end of a block or at the
1123 * Added `kind` attribute to `Expr\Exit` to distinguish between `exit` and `die`.
1124 * Added `kind` attribute to `Scalar\LNumber` to distinguish between decimal, binary, octal and
1126 * Added `kind` attribute to `Expr\Array` to distinguish between `array()` and `[]`.
1127 * Added `kind` attribute to `Scalar\String` and `Scalar\Encapsed` to distinguish between
1129 * Added `docLabel` attribute to `Scalar\String` and `Scalar\Encapsed`, if it is a heredoc or
1131 * Added start file offset information to `Comment` nodes.
1132 * Added `setReturnType()` method to function and method builders.
1133 * Added `-h` and `--help` options to `php-parse` script.
1159 ASTs. The format case will have an empty `stmts` array, while the latter will set `stmts` to
1176 `Expr\ShellExec`. The change has been done to allow assignment of attributes to encapsed string
1189 * Update group use support to be in line with recent PHP 7.0 builds.
1190 * Renamed `php-parse.php` to `php-parse` and registered it as a composer bin.
1196 * Added `shortArraySyntax` option to pretty printer, to print all arrays using short syntax.
1206 * Removed support for running on PHP 5.3. It is however still possible to parse PHP 5.2 and PHP 5.3
1216 attribute was added to `Stmt\UseUse` to handle mixed group use declarations.
1222 * Added `PhpParser\ParserFactory` class, which should be used to create parser instances.
1234 passing `true` to the constructor.