Commit Graph

203 Commits

Author SHA1 Message Date
Nikita Popov
01e85a26c6 Support recovery for param without variable
We store an Expr\Error for the variable in this case.
2018-05-12 19:49:39 +02:00
Nikita Popov
fa99c3fbfb Recover from foreach without as 2018-04-28 22:31:45 +02:00
Nikita Popov
e4a54fa90a Release PHP-Parser 4.0.1 2018-03-25 19:35:16 +02:00
Nikita Popov
3125b54e5e Link to composer/xdebug-handler 2018-03-25 19:34:45 +02:00
Nikita Popov
7f8ff1b9a4 Add support for list reference assignments
RFC: https://wiki.php.net/rfc/list_reference_assignment
2018-03-10 16:48:20 +01:00
Nikita Popov
91a462ce76 PHP 7.3: Add support for trailing commas in calls
RFC: https://wiki.php.net/rfc/trailing-comma-function-calls
2018-03-10 16:41:20 +01:00
Nikita Popov
610617fe93 Also add new() builder 2018-03-03 22:25:58 +01:00
Nikita Popov
ff2d85dc6b Add constFetch() and classConstFetch() builders 2018-03-03 22:14:42 +01:00
Nikita Popov
b998d1e9b5 Add funcCall(), methodCall() and staticCall() builders 2018-03-03 15:40:51 +01:00
Nikita Popov
9c18e3db49 Release PHP-Parser 4.0.0 2018-02-28 21:39:30 +01:00
Nikita Popov
ae52aadb43 Fix merge leftovers in changelog 2018-02-28 21:37:11 +01:00
Nikita Popov
9cea94000a Merge branch '3.x'
Conflicts:
	CHANGELOG.md
	lib/PhpParser/NodeAbstract.php
2018-02-28 21:32:04 +01:00
Nikita Popov
bb87e28e7d Release PHP-Parser 3.1.5 2018-02-28 21:30:58 +01:00
Nikita Popov
ad9c42b66a Merge branch '3.x'
Conflicts:
	lib/PhpParser/Parser/Php5.php
	lib/PhpParser/Parser/Php7.php
2018-01-30 23:07:11 +01:00
Nikita Popov
08215e7646 Fix duplicate switch comment assignment
Fixes #469.
2018-01-30 23:06:20 +01:00
Nikita Popov
c18bb27723 Release PHP-Parser 4.0 Beta 1 2018-01-27 19:06:36 +01:00
Nikita Popov
6a273c9fbd Remove Autoloader class 2018-01-25 23:13:53 +01:00
Nikita Popov
c2d3ecad35 Merge branch '3.x'
Conflicts:
	CHANGELOG.md
2018-01-25 22:32:25 +01:00
Nikita Popov
e57b3a0978 Release PHP-Parser 3.1.4 2018-01-25 22:31:33 +01:00
Nikita Popov
b85b6b3519 Merge branch '3.x'
Conflicts:
	lib/PhpParser/PrettyPrinter/Standard.php
2018-01-25 22:18:32 +01:00
Nikita Popov
94c715d97e Fix pretty printing of -(-$x) and +(+$x)
Fixes #459.
2018-01-25 22:17:35 +01:00
Nikita Popov
4dacbb8d39 FPPP: Fix indentation on list insertion
Use indentation of last list element, instead of indentation
before the insertion point.

Fixes #466.
2018-01-25 22:08:40 +01:00
Gabriel Caruso
bcb45d31eb Trailing whitespaces (#461)
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-08 11:10:03 +01:00
Nikita Popov
1c7fd314d1 FPPP: Add heuristic for multi-line lists 2017-12-26 21:14:36 +01:00
Nikita Popov
63abf9cb3f Release PHP-Parser 4.0 Alpha 3 2017-12-26 17:29:20 +01:00
Tomáš Votruba
ceb4932ca8 Clean merge leftover in changelog (#456) 2017-12-26 17:25:14 +01:00
Nikita Popov
aa289c9694 Merge branch '3.x'
Conflicts:
	CHANGELOG.md
2017-12-26 15:44:25 +01:00
Nikita Popov
579f4ce846 Release PHP-Parser 3.1.3 2017-12-26 15:43:21 +01:00
Nikita Popov
dc3ace55c3 FPPP: Support insert at start of list node (#446) 2017-12-01 22:09:51 +01:00
Nikita Popov
336a49b428 FPPP: Fix comment indentation (#443) 2017-11-13 13:27:27 +01:00
Nikita Popov
a659240dc2 Release PHP-Parser 4.0.0 Alpha 2 2017-11-10 23:36:59 +01:00
Nikita Popov
66f88cfa07 Update changelog 2017-11-04 18:22:06 +01:00
Nikita Popov
361398bc0d Merge branch '3.x'
Conflicts:
	CHANGELOG.md
2017-11-04 12:49:58 +01:00
Nikita Popov
08131e7ff2 Release PHP-Parser 3.1.2 2017-11-04 12:48:34 +01:00
Nikita Popov
fd6e8d7ea8 Merge branch '3.x'
Conflicts:
	lib/PhpParser/Builder/Namespace_.php
	lib/PhpParser/Node/Stmt/ClassMethod.php
	test/PhpParser/Builder/NamespaceTest.php
2017-11-04 12:45:04 +01:00
Nikita Popov
0ba710affa Add setDocComment() to namespace build (#437) 2017-11-04 12:43:02 +01:00
Brad Mostert
837579a40c Fix spelling in documentation (#434) 2017-10-31 22:47:42 +01:00
Nikita Popov
5900d78cc9 FPPP: Support anonymous classes (#432)
This is a huge hack... We temporarily create a new node with the
correct structure and use that for printing.

I think it would be better to always use a separate node type for
NewAnonClass, rather than using a combination of New and Class,
but this would require some larger changes, as this node type would
have to be both Expr and ClassLike, which is not possible right now,
as the latter is a class rather than an interface...
2017-10-29 12:26:12 +01:00
Nikita Popov
776275361a FPPP: Support modifier changes (#428)
I decided against introducing a node type for this. In the end it
would require special handling anyway.
2017-10-25 22:27:29 +02:00
Nikita Popov
001f2d3f76 Release PHP-Parser 4.0 Alpha 1 2017-10-18 18:50:17 +02:00
Nikita Popov
cc600b67f6 Merge branch '3.x'
Conflicts:
	lib/PhpParser/Parser/Php5.php
	lib/PhpParser/Parser/Php7.php
2017-10-01 16:55:54 +02:00
Nikita Popov
d418bf3951 Preserve comments on empty blocks (#382) 2017-10-01 16:54:43 +02:00
Nikita Popov
4b1d9667af Add constant expression evaluator (#402) 2017-09-30 18:56:44 +02:00
Nikita Popov
403a7c5315 Update changelog 2017-09-29 17:41:19 +02:00
Nikita Popov
5cfdc2e0a7 Merge branch '3.x'
Conflicts:
	lib/PhpParser/Parser/Php5.php
	lib/PhpParser/Parser/Php7.php
	test/PhpParser/ParserTest.php
2017-09-26 18:46:44 +02:00
Nikita Popov
5a9fbca54a Add attribute for namespace kinds (#417)
One of KIND_SEMICOLON or KIND_BRACED.
2017-09-26 18:45:05 +02:00
Nikita Popov
829c6c3c71 Add initial changelog for version 4.0 2017-09-02 20:03:10 +02:00
Nikita Popov
a1e8e1a30e Release PHP-Parser 3.1.1 2017-09-02 19:10:46 +02:00
Nikita Popov
d77e6cd6e9 Allow TraitUse statements in trait builder
Fixes #413.
2017-08-29 23:18:59 +02:00
Nikita Popov
a10780ca0d Handle Nop statement after brace-style namespace
Fixes #412.
2017-08-29 23:14:27 +02:00
Nikita Popov
4d4896e553 Release PHP-Parser 3.1.0 2017-07-28 16:45:09 +02:00
Nikita Popov
4a7d011317 Add support for object type 2017-06-28 23:12:13 +02:00
Nikita Popov
7f862ac21c Add support for trailing comma in group use 2017-06-28 23:05:28 +02:00
Nikita Popov
0808939f81 Release PHP-Parser 3.0.6 2017-06-28 22:53:48 +02:00
Nikita Popov
3da86df48f Deprecate Node::setLine() 2017-04-29 12:58:35 +02:00
Nikita Popov
2b9e2f71b7 Release PHP-Parser 3.0.5 2017-03-05 19:23:57 +01:00
Nikita Popov
0bf561dfe7 Release PHP-Parser 3.0.4 2017-02-10 21:20:03 +01:00
Nikita Popov
62877b5d14 Recover from missing semicolons on statements 2017-02-05 17:47:56 +01:00
Nikita Popov
5b8182cc0a Release PHP-Parser 3.0.3 2017-02-03 22:57:31 +01:00
Nikita Popov
af8b17bd75 Update changelog 2017-02-03 22:56:55 +01:00
Felix Becker
3e8c8d248d Add originalName attribute in NameResolver
For now gated behind a preserveOriginalNames option.
2016-12-22 20:25:02 +01:00
Nikita Popov
58970e2a37 Improve LNumber/DNumber pretty printing
* Support PHP_INT_MIN
* Support negative binary/octal/hex numbers
* Support INF/-INF/NAN in namespaces
2016-12-11 16:31:59 +01:00
Nikita Popov
c1e0bab4f8 Add support for negative interpolated offsets
A late addition to PHP 7.1 which I missed.
2016-12-11 13:44:17 +01:00
Nikita Popov
70319e27ee Parse 0 in "$a[0]" as LNumber (#325) 2016-12-07 20:24:00 +01:00
Nikita Popov
adf44419c0 Release PHP-Parser 3.0.2 2016-12-06 12:30:35 +01:00
Nikita Popov
aa6aec90e1 Release PHP-Parser 3.0.1 2016-12-01 13:37:30 +01:00
Nikita Popov
68973aed1e Release PHP-Parser 3.0 2016-11-30 19:20:29 +01:00
Nikita Popov
6db8d9d5a5 Release PHP-Parser 3.0.0-beta2 2016-10-29 13:39:27 +02:00
Nikita Popov
71438559ae Update docs 2016-10-29 13:37:47 +02:00
Nikita Popov
7672b974ff Remove Name::append() and Name::prepend() 2016-10-22 00:25:15 +02:00
Nikita Popov
8489364528 Update changelog and upgrading guide 2016-10-21 23:26:51 +02:00
Nikita Popov
0d0accfa9f Add setDocComment() to Node interface
Previously it was only part of NodeAbstract.
2016-10-21 23:26:51 +02:00
Nikita Popov
ea47b6e0d6 Add NodeAbstract::setDocComment() 2016-09-17 20:51:22 +02:00
Nikita Popov
f5d334d9bf Release PHP-Parser 3.0.0 beta 1 2016-09-16 14:18:19 +02:00
Nikita Popov
f03823cde5 Merge branch '2.x'
Conflicts:
	CHANGELOG.md
2016-09-16 14:08:58 +02:00
Nikita Popov
4dd659edad Release PHP-Parser 2.1.1 2016-09-16 14:04:44 +02:00
Nikita Popov
ec614c95dd Add hasLeadingNewline attribute to InlineHTML
Use this attribute to not print an extra newline if the original
code did not have it.
2016-07-25 16:44:25 +02:00
Nikita Popov
21b18eb294 Release version 3.0.0 alpha 1 2016-07-25 15:16:35 +02:00
Nikita Popov
faa09884db Add upgrading information 2016-07-25 15:09:21 +02:00
Nikita Popov
b740076ab1 Remove deprecated Name::set*() methods 2016-07-25 14:50:37 +02:00
Nikita Popov
818ef2e692 Make PrettyPrinter\Standard methods protected
I'm not sure how these ever ended up being public.
2016-07-25 14:27:03 +02:00
Nikita Popov
5f97b12576 Introduce explicit Finally node 2016-07-25 14:25:04 +02:00
Nikita Popov
18129480ae Rename $type subnode to $flags
Type makes it sound like a type-hint, and on a number of other nodes
$type is used for exactly that. Use $flags to hold modifiers instead.
2016-07-25 13:33:19 +02:00
Nikita Popov
1b1ff8995b Update some PHP version numbers 2016-07-22 17:07:56 +02:00
Nikita Popov
867ae5148d Bring Trait constructor in line with Class/interface 2016-07-22 17:01:51 +02:00
Nikita Popov
72e91845e4 Update changelog 2016-07-22 16:55:17 +02:00
Nikita Popov
225804c147 Targeting PHP-Parser 3.0 2016-07-05 22:24:52 +02:00
Nikita Popov
47b254ea51 Release PHP-Parser 2.1.0 2016-04-19 15:41:41 +02:00
Nikita Popov
9897fa8819 Update CHANGELOG 2016-04-19 15:32:57 +02:00
Nikita Popov
d5cbf79f2f Mark 1.x as unsupported 2016-02-28 21:01:06 +01:00
Nikita Popov
ce5be709d5 Release PHP-Parser 2.0.1 2016-02-28 20:48:28 +01:00
Nikita Popov
c542e5d86a Release PHP-Parser 2.0.0 2015-12-04 16:28:43 +01:00
Nikita Popov
a9074c7444 Introduce Scalar\EncapsedStringPart 2015-12-03 22:55:07 +01:00
Nikita Popov
33602889c1 Release version 2.0.0 beta 1 2015-10-21 20:30:17 +02:00
Nikita Popov
e0a75ededa Release PHP-Parser 2.0 Alpha 1 2015-07-14 21:13:42 +02:00
Nikita Popov
2496cd38ad Various docs fixes 2015-07-14 21:11:54 +02:00
Nikita Popov
965e53a164 Update changelog 2015-07-14 20:13:26 +02:00
Nikita Popov
dc85742034 Merge branch '1.x'
Conflicts:
	CHANGELOG.md
	composer.json
	test/PhpParser/ParserTest.php
2015-07-14 19:43:49 +02:00
Nikita Popov
196f177cfe Prepare PHP-Parser 1.4.0 release 2015-07-14 19:31:05 +02:00
Nikita Popov
6b4a17b3e0 Set version to 2.0-dev. Drop PHP 5.3 support 2015-05-02 22:08:03 +02:00