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

Request #14010 #13111 Breaks Backwards Compatibility
Submitted: 2008-05-29 03:21 UTC
From: ahayes Assigned:
Status: Wont fix Package: Validate_AU (version 0.1.1)
PHP Version: 5.2.6 OS: CentOs
Roadmaps: (Not assigned)    
Subscription  


 [2008-05-29 03:21 UTC] ahayes (Alex Hayes)
Description: ------------ While bug #13111 does add support for various numbers, it breaks backwards compatibility in the changes made to the API, there is also no logical requirement for the changes. The changes referred to are that which changes the second parameter to Validate_AU::phoneNumber. Previously input for this second parameter was performed by using the VALIDATE_AU_PHONENUMBER_* constants, however this functionality was removed and now phoneNumber expects an array with key value pairs to be passed in. The reason for this doesn't really make sense, using the constants is much less typing and there are (at least last time I checked) many other packages in PEAR and indeed PHP itself that support this method of defining flags for a method/function call. I have attached a patch to this report which maintains the functionality that #13111 but changes the API back to use constants. I have also added the following constants; - VALIDATE_AU_PHONENUMBER_PREMIUMSMS - VALIDATE_AU_PHONENUMBER_VOIP - VALIDATE_AU_PHONENUMBER_TESTING - VALIDATE_AU_PHONENUMBER_FINDANYWHERE - VALIDATE_AU_PHONENUMBER_DATAACCESS - VALIDATE_AU_PHONENUMBER_OTHER - combines VALIDATE_AU_PHONENUMBER_PREMIUMSMS, VALIDATE_AU_PHONENUMBER_PREMIUMSMS, VALIDATE_AU_PHONENUMBER_VOIP, VALIDATE_AU_PHONENUMBER_TESTING, VALIDATE_AU_PHONENUMBER_FINDANYWHERE & VALIDATE_AU_PHONENUMBER_DATAACCESS - VALIDATE_AU_PHONENUMBER_ALL - combines VALIDATE_AU_PHONENUMBER_NATIONAL, VALIDATE_AU_PHONENUMBER_INDIAL, VALIDATE_AU_PHONENUMBER_INTERNATIONAL and VALIDATE_AU_PHONENUMBER_OTHER A decision needs to be made by all maintainers whether or not we will continue to support the current API or whether or not it will be modified back to the original. Test script: --------------- - Expected result: ---------------- - Actual result: -------------- -

Comments

 [2009-05-23 23:56 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Wont fix