Re: [RFC] PHP_Compatibility

From: Date: Wed, 18 Feb 2004 09:48:15 +0000
Subject: Re: [RFC] PHP_Compatibility
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25684@lists.php.net to get a copy of this message
On 17 Feb 2004 at 21:46, Paul M Jones wrote: > On Feb 17, 2004, at 8:49 PM, Davey wrote: > > > I just wanted to know if some code I came up with > > would be of any use... maybe in PEAR_PackageFileManager > > to automatically detect version and extension dependencies? > > I think it's a great idea, as a standalone if nothing else. At the > very worst, one can test a script, package, or application, and then > explicitly state in the docs that such-and-such is required to run. > > > The code is not available yet cause its *real* rough, and not a > > class yet ;) > > I look forward to seeing the code when it gets class-ified. Yeah, it's quite difficult to exactly say which php-version is needed. An automated task to check this would be nice. However please also note that some functions may have optional parameters that were just introduced starting from a certain PHP-version. So you also need to check the number of parameters and such. It would also be nice to have a possiblity to check because of which commands your script needs a high php-version. Maybe if I change one or two lines (which make it only useable from php 4.3.2 upward) it might be compatible to a lower php-version. For sure the utility can't correctly decide about some special cases - e.g. if you check "is function XX there, then choose this for performance reasons - otherwise choose the other". But maybe you could mark a certain function to be skipped for analysis? Hard work - but it might be worth it. However since it's quite a lot I think it be better to have this class working from a separate application. There was recently a discussion to have a CS-checker for PEAR-scripts. So maybe it could be integrated with that tool? An all- in-all "check my code"-utility? Stefan

« previous php.pear.dev (#25684) next »