Deprecation of tag()

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Deprecation of tag()

Post by cmb » Fri May 01, 2015 2:41 pm

Hi everybody!

We have voted on removing the xhtml_endtags setting and related functionality, and this has already been implemented. Amongst the changes is the deprecation of function tag(), which now triggers a deprecation notice (E_USER_DEPRECATED). I have already pointed out that this may not be the best solution in the other thread:
cmb wrote:And, well, maybe the deprecation notice of tag() might be removed again (and applied for XH 1.8). As it is now, it would be hard to write notice free code that is supposed to run under XH 1.7 as well as former versions.
An additional argument would be that probably many plugins will take a while to be adjusted.

Therefore I propose to deprecate tag() for XH 1.7 only per documentation, but not to emit a deprecation notice everytime the function is called, as that could easily lead to endless debug output, and so more important messages might be overlooked. The deprecation notice should be added in XH 1.8 or maybe a later version.

The patch (for the sake of completeness):

Code: Select all

Index: cmsimple/functions.php
===================================================================
--- cmsimple/functions.php	(revision 1584)
+++ cmsimple/functions.php	(working copy)
@@ -1145,8 +1145,6 @@
  */
 function tag($s)
 {
-    trigger_error('Function tag() is deprecated', E_USER_DEPRECATED);
-
     return '<' . $s . '>';
 }
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Deprecation of tag()

Post by cmb » Mon Jun 01, 2015 12:35 am

Done (r1617).
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply