Lines Matching refs:to

1 Upgrading from PHP-Parser 2.x to 3.0
6 * The specific details of the node representation have changed in some cases, primarily to
8 * There have been significant changes to the error recovery implementation. This may affect you,
14 PHP-Parser now requires PHP 5.5 or newer to run. It is however still possible to *parse* PHP 5.2,
17 ### Changes to the node structure
19 The following changes are likely to require code changes if the respective nodes are used:
21 * The `List` subnode `vars` has been renamed to `items` and now contains `ArrayItem`s instead of
23 * The `Catch` subnode `type` has been renamed to `types` and is now an array of `Name`s.
26 * The `type` subnode on `Class`, `ClassMethod` and `Property` has been renamed to `flags`. The
27 `type` subnode has retained for backwards compatibility and is populated to the same value as
28 `flags`. However, writes to `type` will not update `flags` and use of `type` is discouraged.
30 The following changes are unlikely to require code changes:
32 * The `ClassConst` constructor changed to accept an additional `flags` subnode.
35 * The `Array` subnode `items` may now contain `null` elements (due to destructuring).
39 ### Changes to error recovery mode
41 Previously, error recovery mode was enabled by setting the `throwOnError` option to `false` when
59 Instead an instance of `ErrorHandler\Collecting` should be passed to the `parse()` method:
82 parser will be able to recover from the error in both cases. For this reason, this change will
85 It is possible to restore the precise previous behavior with the following code:
108 In order to support recovery from lexer errors, the signature of the `startLexing()` method changed
109 to optionally accept an `ErrorHandler`:
118 If you use a custom lexer with overridden `startLexing()` method, it needs to be changed to accept
119 the extra parameter. The value should be passed on to the parent method.
123 The constructors of certain nodes used to contain additional checks for semantic errors, such as
148 namespace into fully qualified names. For example `foo()` in the global namespace resolves to
155 If node dumper results are used in tests, updates may be needed to account for this.