brendt / stitcher.io

Source code of stitcher.io
https://stitcher.io
179 stars 135 forks source link

Override article could need some more explanation #250

Open NicoHaase opened 7 months ago

NicoHaase commented 7 months ago

I'm currently upgrading a first application to use PHP 8.3, and Rector recommends to use #[Override]. Gathering some pros and cons about this, I've found your article at https://stitcher.io/blog/override-in-php-83 that states:

I use an IDE that prevents me from making these kinds of mistakes

Can you explain this further? How could your IDE inform you that a parent classes method was renamed and you might consider renaming the method in your own class? How could a static analyzer detect this better?

Jacobs63 commented 6 months ago

The IDE would not really inform you that a method was renamed, however:

In summary, my IDE prevents me making mistakes while also providing me with additional information.