What slips through?
bbrala opened this issue · comments
Hi,
Awesome tool, using it right now to have a look at about 200 sites and their possible issues
Just a little question. Any idea what kind of errors this tool would miss? I would assume wrong Exception handling since errors now also throw their an Error, but do you know of any other specifics that you know it will miss?
Regards,
Bjorn.
Hello, Bjorn.
I think it would miss a lot of errors actually. It only covers the simpliest cases, and many hard to detect or less frequent errors will probably remain unnoticed.
Here is a non-exhaustive list of things that php7cc
will surely miss:
- Exceptions that can be thrown by constructors of some internal classes (see: https://wiki.php.net/rfc/internal_constructor_behaviour)
- Different sorting algorithm implementations (see: https://bugs.php.net/bug.php?id=69158)
- Incorrect type hints for
set_exception_handler
(see: http://php.net/manual/ru/migration70.incompatible.php#migration70.incompatible.error-handling.set-exception-handler) break
/continue
statements not in the loop or switch context (see: #89). I had implemented a check for this, but it looked like it was still failing in some cases, although I could not come up with a failing test case.
Hello,
Thanks for the awnser, a few of those I did know about, tho the sorting is a bit scary since if there are bugs because of that those would be extremely hard to find.
Ah well, I guess i'll become an expert while doing the upgrades. Hopefully there aren't an extreme amount of edge cases.
Thanks again, if you like i can let you know how things go ;) Might be able to find a few extra checks that a feasable to do along the way.
if you like i can let you know how things go
Sure, any input will be highly appreciated. I'll also think about other possible edge cases and will add them to the documentation to let the users know what to look out for.