Skip to content

Error messages encountered #8792

Answered by samsonasik
des2013 asked this question in Q&A
Aug 15, 2024 · 3 comments · 2 replies
Discussion options

You must be logged in to vote
  1. rector is not error handler, so that's expected, ensure that your code is valid before run it, using parallel-lint can help.
  2. It apply type declaration step by step, use level 0 for the beginning, and move forward
  3. we use nikic/php-parser to print code, if you have some mix spaces, that's can happen, see known drawback https://github.com/rectorphp/rector?tab=readme-ov-file#known-drawbacks

I suggest to being slow, step by step, fix the code first, fix spacing (use coding standard tool or right IDE should can handle that), ensure autoload correctly setup, then try with simple rule one rule at a time so that you can easy to check and review, and fix edge cases.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@des2013
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@des2013
Comment options

Answer selected by samsonasik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants