>Hey, > >This is something I've come across several times before when deprecating >functions: people want different behaviour with regard to the warnings they get. >Typically what people want can be split into two groups: > >Weak deprecation: The function is documented as being deprecated but no >wfDeprecated is put in > > ... > >Strong deprecation: The function is documented as being deprecated and >wfDeprecated is put in. > > ... > >It's clear each that for different people the same approach might not be >preferred. Discussion arises when some people do not want something to be >strongly deprecated. What about introducing a soft deprecation function (ie >wfSoftDeprecated) that calls wfDeprecated with an additional argument >specifying it's a soft deprecation call, which by default does not result in any >warnings or notices, but can by means of some setting be turned on by those that >want to get them? Such a setting could either be a boolean, int (ie show >warnings above this level) or some whitelist of softly deprecated functions one >wants to get warnings for. Seems to be pretty trivial to accommodate both groups >here, and get rid of the silly discussions. > >Any thoughts? > >Cheers
Definitely think this is a good idea. We could name the option $wfShowSoftDeprecated or something similar, but not nearly as long. I noticed that we have a $wgDebugLogFile configuration option. Right now, from what I can tell, it appears to only log SQL errors. I wonder if it might be a good idea to log both soft and hard deprecated warnings there as well. Thank you, Derric Atzrott _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
