Skip to content

Rector hang up with the rule IfToSpaceshipRector #7788

@Freespacer

Description

@Freespacer

Bug Report

Subject Details
Rector version 0.15.13

Under certain circumstances Rector hangs up during refactoring of the rule "IfToSpaceshipRector".

Minimal PHP Code Causing Issue

The Rector demo page does not work too.

Hang up example 1:
https://getrector.com/demo/b0b4b1b4-dfd3-4034-a2c7-402b618f56d2

Hang up example 2:
https://getrector.com/demo/46f17241-3a36-4dc1-9ac2-5052c7a05116

Working example 1:
https://getrector.com/demo/2e029aa4-67b2-4e0d-856f-f91d27ab2ef9

Working example 2:
https://getrector.com/demo/db2a2abc-b0f7-4255-a788-e94152c8c978

Expected Behaviour

The expected behavior is that Rector runs through without hangs. Please note the comment in code examples for expected refactored code.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions