qossmic / deprecation-detector

MIT License
390 stars 40 forks source link

False positives on PHP4 constructor for namespaced classes #133

Closed jcchavezs closed 7 years ago

jcchavezs commented 7 years ago

At the moment, a class including a method having the same name as the class is being considered as a warning as the tool marks it as a PHP4 style constructor however, if a class includes a namespace this won't work as a constructor and it is quite sure that the method having the same name as the class is not a constructor either (it is a very often pattern when using Value Objects) causing false positives and limiting the developers by avoiding them to use the same name for the method.