Re: [development] module_exist() / module_exists()
Well, the bad thing about wrapper functions is that people won't change them if it is not necessary. If we take the wrapper function out after the next release, we will face the same problem. 2006/8/31, John VanDyk <jvandyk@iastate.edu>:
From http://drupal.org/node/64279#module-exists :
"module_exist() is now module_exists() For consistency with PHP function_exists, file_exists, etc. That's about all there is to say about that. :)"
From my local copy of cvs:
$ cd /cvs/contributions/modules $ grep -r module_exist\( . | wc -l 630
It would be nice to have a wrapper function in for one release cycle.
On 8/31/06, Konstantin Käfer <kkaefer@gmail.com> wrote:
Well, the bad thing about wrapper functions is that people won't change them if it is not necessary. If we take the wrapper function out after the next release, we will face the same problem.
I don't have a strong feeling one way or another, but it's common for a deprecated wrapper to log the fact that it is deprecated to motivate people to fix the problems. A module_exist() that does a watchdog and then proceeds would be a little slower and annoying, so it would motivate people. Regards, Greg -- Greg Knaddison | Growing Venture Solutions Denver, CO | http://growingventuresolutions.com Technology Solutions for Communities, Individuals, and Small Businesses
I'd say, forget the wrapper function. So much changes between each Drupal release cycle, as long as this is well documented in the upgrading handbook, a simple find and replace will do it. Rob Roy Barreca Founder and COO Electronic Insight Corporation http://www.electronicinsight.com rob@electronicinsight.com Greg Knaddison - GVS wrote:
On 8/31/06, Konstantin Käfer <kkaefer@gmail.com> wrote:
Well, the bad thing about wrapper functions is that people won't change them if it is not necessary. If we take the wrapper function out after the next release, we will face the same problem.
I don't have a strong feeling one way or another, but it's common for a deprecated wrapper to log the fact that it is deprecated to motivate people to fix the problems.
A module_exist() that does a watchdog and then proceeds would be a little slower and annoying, so it would motivate people.
Regards, Greg
For this particular change, a global search and replace will do it, so it is simple enough. There are a LOT of other major changes in 4.8/5.0 that will need to addressed by far more work ... That said, I agree with John VanDyk that wrappers are a good idea. That was the original plan of FAPI vs. old form_*() functions from 4.6 to 4.7.
participants (4)
-
Greg Knaddison - GVS -
Khalid B -
Konstantin Käfer -
Rob Barreca