Thursday, April 10, 2014

Current use of deprecated in docblocks of 2.x is misleading.

Hi guys,

I am having some concerns on the current use of the @deprecated tag in the docblocks of several Cake 2.x methods.

As the current Controller::disableCache() method states, it is deprecated (http://api.cakephp.org/2.4/source-class-Controller.html#978-987) but that is not true. It is still a valid method in CakePHP 2.x and as the comment on this tag states: it will be removed in 3.0. So, as long as you are developing in 2.x, this will never become a problem. It is "going to" become a problem, but only if you update to 3.x which I guess is not going to be the preferred option for every Cake developer that has a zillion lines of code.

The reason I am having my concerns on the use of the tag, is that is misleading. Because, when I use the Controller::disableCache() method in my project, it is going to strike through the method and show a warning that it is deprecated, but after inspection of the docblock, it is not and it never will be in the 2.x releases. At least, that is what the comment states.

I sincerely hope you understand my point of view on this subject and I would love to get a discussion started, because as far as I'm concerned, it's just throwing warnings that aren't really there and thus are messing up the view on the code.

This issue exists for ~70 methods/functions in the current CakePHP library (source: find all "@deprecated" and scan globally for anything that says "3.0" in lib/Cake/)

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: