OK, here’s a quick one that got me stuck for some time. I made a change to a file and, you won’t expect it: I made a little boo boo. I didn’t notice it, but our Rector did. It gave me the following error:
[ERROR] Could not process
"path/to/file.php" file,
due to:
"Syntax error, unexpected T_CONSTANT_ENCAPSED_STRING415". On line: 82
Given this error, I started checking the file on line 82. But there was nothing bad there. It all seemed fine. I didn’t understand why Rector was erroring. I made some other changes to the same file, but the error kept occuring on line 82. I was stumped!
Until I noticed the error changing. Not the mentioned line number. But the actual error. The number in T_CONSTANT_ENCAPSED_STRING415
changed. And that’s when it clicked: The number there is the actual offending line number. I suspect the line 82 is the place in the Rector code where the exception is being thrown. The 415
is the actual line number. And indeed, when I checked that line, I immediately saw the boo boo I made.
Leave a Reply