[development] Coding Standards / Hook_requirements

Gábor Hojtsy gabor at hojtsy.hu
Mon May 19 13:35:33 UTC 2008


On Mon, May 19, 2008 at 3:14 PM, Nancy Wichmann <nan_wich at bellsouth.net> wrote:
> I've just taken another quick run through the Coding standards because of a
> module I looked at last night. The new module states right on its project
> page that it requires PHP 5 (as more and more modules are doing). Yet, in
> looking through the code, it does not include a hook_requirements. I propose
> adding to the Coding Standards:
>
> "Any module that has requirements over and above base Drupal standards (e.g.
> PHP 5 vs. 4.3.5 for D6) must include a hook_requirements implementation to
> verify and/or warn users of this requirement."
>
> Unfortunately, I don't think Coder would be able to check this.

Drupal 6+ modules can depend on PHP 5 with their .info file (I think
"php = 5.x"), so there is no need for actual coding.

Gabor


More information about the development mailing list