Abdul Malik Ikhsan
Abdul Malik Ikhsan
imo, this should be marked as autoloaded already, as just defined in the target file, in 1.8.3, it works ok.
@TomasVotruba just for note: we have custom node: `FileWithoutNamespace` that is `StmtsAwareInterface` instance, so that need update, if this is accepted, we need to have keep compat of `StmtsAwareInterface` to...
@TomasVotruba imo, `ClassMethod` should implements `Node\ContainsStmts` as well, otherwise, we need to patch our `getNodeTypes()` to include `ClassMethod` as well in Rector classes to use: ```diff public function getNodeTypes(): array...
@TomasVotruba `ArrowFunction` imo is not needed, as it actually just single Expr, and no real Stmt there, we then also need tweak everywhere for `ArrowFunction` instance, avoid append/add/remove real stmt.
@TomasVotruba imo, `getStmts()` should only be used for verification/check/search that so null/cast check is no longer needed. For apply change, use direct `->stmts` instead, and the property itself is `public`....
Looks good to me 👍
@TomasVotruba looking at `Declare_` behaviour, declare can have its stmts ```php declare(ticks=1) { echo 'test'; } ``` see https://3v4l.org/QmPYL#v8.0.26 . that's why it has the `stmts` property https://github.com/nikic/PHP-Parser/blob/e4810261db718545ed1a64d021dc9ecba3dbd68d/lib/PhpParser/Node/Stmt/Declare_.php#L8-L12 It likely...
seems can't be reproduced at https://getrector.com/demo/b467dd86-42a5-40cb-87de-4cbe9de84c1b you may need some rules to reproduce it, check collection of rules half by half.
Could you create simple reproducible repo we can clone and verify? Thank you
Ready to merge 👍