Skip to content

Conversation

@Soean
Copy link

@Soean Soean commented Feb 13, 2026

This pull request extends the TernaryToNullCoalescingRector to support converting ternary expressions using is_null and its negation to the null coalescing operator (??).

Fixes: rectorphp/rector#9648

@samsonasik
Copy link
Member

This can wait for PR:

to be merged first and need sync to add check parentheses fixture on the right side of ternary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support is_null() in TernaryToNullCoalescingRector

2 participants