Bump to phpdoc-parser 1.23 and fill construct() attributes#4590
Bump to phpdoc-parser 1.23 and fill construct() attributes#4590samsonasik merged 7 commits intomainfrom
Conversation
| // usedAttributes | ||
| ['lines' => true, 'indexes' => true], |
There was a problem hiding this comment.
this is based on @ondrejmirtes suggestion at rectorphp/rector#7959 (comment)
There was a problem hiding this comment.
Make sure to pass the same array also to other classes that use it - ConstExprParser, TypeParser, PhpDocParser.
There was a problem hiding this comment.
@ondrejmirtes I updated TypeParser and ConstExprParser usedAttributes 41a727a
| // textBetweenTagsBelongsToDescription, default to false, exists since 1.23.0 | ||
| // should be can used for | ||
| // @param int $a | ||
| // paramA description | ||
| true |
There was a problem hiding this comment.
this exist since phpdoc-parser 1.23.0 that may be used for drupal use case
There was a problem hiding this comment.
@TomasVotruba it seems working to preserve next line text part of @param d401cc6 👍
There was a problem hiding this comment.
@ondrejmirtes the spaced new line empty seems cause indentation gone, given the following code:
class Foo extends FooBar
{
/**
* @param \DateTime $foo
*
* Storage here is Foo\Storage. Not \Storage.
* @return Storage
*/
public function bar($foo){}
}it goes:
class Foo extends FooBar
{
/**
- * @param DateTime $foo
- *
- * Storage here is Foo\Storage. Not \Storage.
- * @return Storage
- */
+ * @param DateTime $foo
+
+ Storage here is Foo\Storage. Not \Storage.
+ * @return Storage
+ */There was a problem hiding this comment.
@samsonasik Please report this properly in phpstan/phpdoc-parser, ideally with a failing test. I can't debug this through rector-src.
There was a problem hiding this comment.
@ondrejmirtes thank you, I will try when I have a chance to reproduce a failing test case on phpstan/phpdoc-parser, I will set to default false for now.
There was a problem hiding this comment.
@TomasVotruba I reverted to false for now :), marked as @todo until it has solution for above empty line use case 2270001
|
All checks have passed 🎉 @TomasVotruba I think it is ready. |
|
@TomasVotruba let's merge it ;) |
No description provided.