Re: [PEAR-QA] is_a() and the need for improved testing
[email protected] (Alan Knowles) Mon, 29 Aug 2011 10:01:54 +0800
| Newsgroups | php.pear.qa |
|---|---|
| Message-ID | <[email protected]> |
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< > [email protected]> 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: >> 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=2 >> >> Un-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=2 >> I'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. >> >> > 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"? >