Skip to content

Keep empty php code as is#3395

Merged
TomasVotruba merged 1 commit intorectorphp:masterfrom
shaal:do-not-remove-empty-php-code
May 20, 2020
Merged

Keep empty php code as is#3395
TomasVotruba merged 1 commit intorectorphp:masterfrom
shaal:do-not-remove-empty-php-code

Conversation

@shaal
Copy link
Copy Markdown
Contributor

@shaal shaal commented May 20, 2020

(Resolving the same type of issue as in #3394)
To maintain the assumption, that rector would only change what it was instructed to, when there's an empty php code <?php ?>, we want to preserve it.
You can see an example of when it's necessary here: #3352 (comment)

Removing empty php code should be a specific Rector rule that people can opt-in to run, instead of automatically being removed every time Rector runs.

@TomasVotruba
Copy link
Copy Markdown
Member

Just for reference: it was added for CakePHP to Symfony rules, that are no longer present: 81531b2#diff-560bcf8e3b306989b3cb6718d0403d0c

Thanks 👍

@TomasVotruba TomasVotruba merged commit 9d2a0c1 into rectorphp:master May 20, 2020
@shaal
Copy link
Copy Markdown
Contributor Author

shaal commented May 21, 2020

@TomasVotruba It seems that this PR is not merged yet to master, due to:
kodiakhq: status 🛑 cannot merge (missing automerge_label: 'automerge')
https://github.com/rectorphp/rector/runs/694553608

@TomasVotruba
Copy link
Copy Markdown
Member

Why do you think so?

I see it right there:

image

Also commit is in the master
b01eb49

@shaal
Copy link
Copy Markdown
Contributor Author

shaal commented May 21, 2020

Sorry, must be something in my internet connection :(

It kept showing me master without this PR merged to it, but now I see the latest master with this PR merged. All good now :)

@shaal
Copy link
Copy Markdown
Contributor Author

shaal commented May 29, 2020

Closes #3352

TomasVotruba added a commit that referenced this pull request Feb 21, 2023
rectorphp/rector-src@f9f4217 [e2e] [printer] Fix short open tag mixed php+html cause surplus <?php  (#3395)
TomasVotruba added a commit that referenced this pull request Feb 21, 2023
rectorphp/rector-src@f9f4217 [e2e] [printer] Fix short open tag mixed php+html cause surplus <?php  (#3395)
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