Skip to content

Add failing test fixture for TernaryFalseExpressionToIfRector#3376

Closed
kkmuffme wants to merge 1 commit intorectorphp:mainfrom
kkmuffme:patch-14
Closed

Add failing test fixture for TernaryFalseExpressionToIfRector#3376
kkmuffme wants to merge 1 commit intorectorphp:mainfrom
kkmuffme:patch-14

Conversation

@kkmuffme
Copy link
Copy Markdown
Contributor

Failing Test for TernaryFalseExpressionToIfRector

Based on https://getrector.com/demo/d48f8822-9454-4055-b14c-174a6b4f2ec8

The input code makes no sense (missing echo), but is valid. Rector should not change it to invalid (fatal) code.

Possible sanity check if the change results in ?> ?> or <?php <?php it shouldn't apply the change but report an error right away, to make debugging rector rules faster?

# Failing Test for TernaryFalseExpressionToIfRector

Based on https://getrector.com/demo/d48f8822-9454-4055-b14c-174a6b4f2ec8

The input code makes no sense (missing echo), but is valid. Rector should not change it to invalid (fatal) code.

Possible sanity check if the change results in `?> ?>` or `<?php <?php` it shouldn't apply the change but report an error right away, to make debugging rector rules faster?
@samsonasik
Copy link
Copy Markdown
Member

@kkmuffme I cherry-picked your commit at PR #3382

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.

2 participants