Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Bug #17975 Validate E_STRICT incompatibility
Submitted: 2010-10-19 19:04 UTC
From: jdolecek Assigned:
Status: Open Package: Validate (version 0.8.4)
PHP Version: 5.3.3 OS: MacOS
Roadmaps: (Not assigned)    
Subscription  


 [2010-10-19 19:04 UTC] jdolecek (Jaromír Dole?ek)
Description: ------------ Package is not compatible with running under E_STRICT - methods are not marked as static, so one gets warning when calling e.g. Validate::uri() from other code (such as Services_Facebook). It would be cool to mark all functions as static and private/public as appropriate, to make it possible to run Validate with E_STRICT.

Comments

 [2010-10-20 12:27 UTC] jdolecek (Jaromír Dole?ek)
 [2010-10-20 16:31 UTC] doconnor (Daniel O'Connor)
Hi Jaromir, Thanks for the patch; but it's unlikely to apply to Validate - we want to maintain php4 compatability for this particular package. That being said, proposals for Validate2 would be more than welcome - this kind of proposal would mean we just push everything up to PHP5 comptability. That being said; I would encourage you to consider a different API approach to avoid "static cling" where possible: making it easy for others to mock out a validate object by avoiding static methods.
 [2010-10-20 16:54 UTC] jdolecek (Jaromir Dolecek)
I've encountered a package using the static call (Services_Facebook), that's why I made this patch - so you basically consider this bad practice and do not intend Validate (or Validate2) to be called statically?