Skip to content

Releases: mattacosta/php-parser

v1.0.0-beta.7

06 Jun 03:49
Compare
Choose a tag to compare
v1.0.0-beta.7 Pre-release
Pre-release

[email protected] (2020-06-05)

Added

  • Emulation of PHP's workaround for tokenizing UTF-8 and UTF-16 text.
  • A static from method to create a PhpParserOptions object from a generic configuration object.

Changed

  • ISourceText now includes an encoding property.
  • SourceTextFactory.from() now has an optional encoding parameter.
  • PhpSyntaxTree.fromText() now has an optional encoding parameter.
  • IndirectVariable and LocalVariable now use separate visitor methods.

Fixed

  • A possible exception when finding tokens in the last node of a long list.
  • Incorrect state when parsing an interpolated string that is immediately followed by another string.
  • SyntaxWalker no longer throws an exception when only walking nodes.

v1.0.0-beta.6

13 Sep 05:23
Compare
Choose a tag to compare
v1.0.0-beta.6 Pre-release
Pre-release

[email protected] (2019-09-12)

Added

  • PHP 7.4 features:
    • Null coalescing assignments.
    • Spread operators in arrays.
    • Arrow functions.
    • Typed properties.
    • Numeric literal separators.

Changed

  • PHP 7.4 changes:
    • The (real) type cast now generates a deprecation warning.
    • Open tags are now valid at the end of files.
  • The UseElement property name has been renamed to target.
  • Line breaks are no longer included in SingleLineComment tokens.
  • Unexpected characters now generate Error tokens instead of Unknown tokens.
  • The BackQuoteTemplate token has been renamed to ShellCommandTemplate.
  • The NewLine token has been renamed to LineBreak.

Fixed

  • Incorrect state after tokenizing interpolations with close tags.
  • Incorrect state after tokenizing interpolations with #-style comments.
  • Interpolations with trailing trivia no longer generate corrupt syntax trees.
  • Invalid unicode escape sequences now have the correct diagnostic width.
  • TextSpan objects should no longer contain offsets before the starting position.
  • Interpolations with invalid hex/bin offsets should not generate 0x or 0b tokens.

v1.0.0-beta.5

05 May 03:43
Compare
Choose a tag to compare
v1.0.0-beta.5 Pre-release
Pre-release

[email protected] (2019-05-04)

Added

  • Feature availability diagnostics are now reported when the required language
    version is not met.

Changed

  • Improved diagnostics in many cases where other tokens are possible.
  • ISyntaxNode now has an isMissing property.
  • PhpParserOptions now includes a documentationMode property (currently not
    implemented).
  • PhpParserOptions now has individual properties for each feature.

Fixed

  • Duplicate diagnostic on interfaces with var properties.
  • Trait adaptations with a method reference that uses a relative name are no
    longer parsed incorrectly.
  • TraitUseGroupSyntaxNode and IncompleteMemberSyntaxNode should inherit from
    StatementSyntaxNode.

Removed

  • ISyntaxNode no longer requires methods to get descendants.

v1.0.0-beta.4

30 Aug 14:00
Compare
Choose a tag to compare
v1.0.0-beta.4 Pre-release
Pre-release

[email protected] (2018-08-30)

Added

  • PHP 7.3 features.
    • Trailing commas in argument lists.
    • Byref assignment in list deconstructions.
    • Flexible heredocs.
  • A static formatMessage() method to ErrorCodeInfo for convenience.

Changed

  • The token used by <> is no longer shared with !=.
  • The token used by die is no longer shared with exit.
  • ISyntaxNode now has a findChildToken() method.

Fixed

  • An exception when tokenizing an interpolated string that was missing certain paired characters.
  • An exception when tokenizing an unexpected character at the end of a file.
  • The yield from token should no longer partially match identifiers that start with "from".
  • Invocation expressions with relative names such as namespace\foo() are no longer parsed incorrectly.

v1.0.0-beta.3

04 Jun 17:32
Compare
Choose a tag to compare
v1.0.0-beta.3 Pre-release
Pre-release

[email protected] (2018-06-04)

Added

  • Functions with reserved names can now be parsed using the allowReservedNames option.
  • SyntaxToken now implements a static getText() method.

Changed

  • Type cast aliases are now separate, unique tokens.
  • ISourceText now implements IEquatable.
  • ISourceText now has a withChanges() method.

Fixed

  • Short open tags should be parsed as echo statements.
  • Abstract syntax nodes should declare their own abstract properties instead of deferring to implementations.

v1.0.0-beta.2

28 Feb 23:37
Compare
Choose a tag to compare
v1.0.0-beta.2 Pre-release
Pre-release

[email protected] (2018-02-28)

Added

  • PhpParser now accepts a parameter for additional options.

Changed

  • ISyntaxNode now includes a hasError property.
  • PhpSyntaxTree now has a public constructor.

Fixed

  • A long value with an exponent should be tokenized as a double.

v1.0.0-beta.1

26 Nov 05:49
Compare
Choose a tag to compare
v1.0.0-beta.1 Pre-release
Pre-release

[email protected] (2017-11-25)

Initial release.