Skip to content

[StmtsAware] Add Declare_ to NodeGroup::STMTS_AWARE to allow process its stmts - #7791

Merged
TomasVotruba merged 3 commits into
mainfrom
dead-code
Jan 2, 2026
Merged

[StmtsAware] Add Declare_ to NodeGroup::STMTS_AWARE to allow process its stmts#7791
TomasVotruba merged 3 commits into
mainfrom
dead-code

Conversation

@samsonasik

@samsonasik samsonasik commented Jan 2, 2026

Copy link
Copy Markdown
Member

declare() can have its stmts property filled with array of stmts, eg:

declare(ticks=1) {
    echo 'test';
    die;

    echo 'unreachable';
}

this currently skipped on loop of stmts, for example on RemoveUnreachableStatementRector

see example:

This PR add Declare_ to NodeGroup::STMTS_AWARE so it can properly processed.

@samsonasik

Copy link
Copy Markdown
Member Author

@TomasVotruba ready 👍

@samsonasik samsonasik changed the title [StmtsAware] Add Declare_ to NodeGroup::STMTS_AWARE to allow remove Declare_ stmts [StmtsAware] Add Declare_ to NodeGroup::STMTS_AWARE to allow process its stmts Jan 2, 2026
@TomasVotruba
TomasVotruba merged commit 9116b3e into main Jan 2, 2026
58 checks passed
@TomasVotruba
TomasVotruba deleted the dead-code branch January 2, 2026 12:40
@TomasVotruba

Copy link
Copy Markdown
Member

LGTM 👍

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants