Re: is_a() and the need for improved testing
| From: | Alan Knowles | Date: | Mon, 29 Aug 2011 02:01:54 +0000 |
| Subject: | Re: is_a() and the need for improved testing | ||
| References: | 1 2 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-5895@lists.php.net to get a copy of this message | ||
Something like this,
grep -n is_a\( * -R | grep -v is_object | grep -v is_a\(\$this | grep -v '\->is_a'
Then eyeball the results and remove them in a text editor
Regards
Alan
On Monday, August 29, 2011 09:04 AM, Daniel O'Connor wrote:
On Sat, Aug 27, 2011 at 9:44 AM, Daniel Convissor< danielc@analysisandsolutions.com> wrote:Hi Folks: As you may have noticed or heard about, is_a() was modified in 5.3.7. One issue was adding a warning if the first argument wasn't an object, though that was removed before 5.3.7 went out the door. Another issue is autoload being called if the first argument is a string:I'll add to the script producing http://test.pear.php.net/unit-test-results/deprecated.txt shortly. Alan; what's your method? Grep for all instances of is_a("*"), is_a('*')? What other patterns are clearly "wrong"?https://bugs.php.net/bug.php?id=55475 http://marc.info/?t=131399222400001&r=1&w=2 http://marc.info/?l=php-internals&m=131415106807521&w=2Un-reverting the fix for PEAR bug 18656 (done in r313340) (or something along those lines) PLUS fixing the other uses of is_a() througout pear-core and getting a new release out the door seems prudent. Then Alan provided a list of all uses of is_a() in all PEAR packages:http://marc.info/?l=php-internals&m=131432741919689&w=2I've take care of the is_a() usage in DB and XML_RPC and will get releases out soon. That aside, recent discussions on internals are touching on the need to improve testing of PHP as it is being developed and released. To that end, I figured I'd take a look at PEAR's automated testing to ensure PEAR::DB's tests were working properly. They were not, so I adjusted them.