Skip to content

Rectorphp silently exits before completing the run #8894

Description

@christopherowen

Rector 1.2.10, php 8.3.13, MacOS Sequoia (latest)

When running rectorphp on a reasonably-sized code base, it will reach a percentage less than 100% and exit. The exit code is successful. This is problematic for because:

  • I am expecting the code to be well-formatted during a php version update and am depending on rectorphp, and the exit code suggests the code is well-formatted (it is not)
  • I am wiring this to a CI/CD, and the successful exit code suggests deployments should continue (it should not)
  • I suspect there may be some bad code which could lead to this, and I would like to identify it in order to improve it
% vendor/bin/rector process --clear-cache --memory-limit=512M
 144/160 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░]  90%

                                                                                                                        
 [OK] Rector is done! 
 
% echo $?                                            
 0

How can I debug this or otherwise make rectorphp return the error that it is experiencing?

This could be a display bug, but running the files individually discovered extra edits recommended by rectorphp:

find . -name "*php" | while read line; do vendor/bin/rector process --clear-cache $line; done

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions