Re: Re: cvs: pear /Validate package_AT.xml /Validate/Validate AT.php /Validate/tests validate_AT.phpt

From: Date: Thu, 23 Aug 2007 22:46:57 +0000
Subject: Re: Re: cvs: pear /Validate package_AT.xml /Validate/Validate AT.php /Validate/tests validate_AT.phpt
References: 1 2 3 4 5 6 7  Groups: php.pear.cvs php.pear.qa 
Request: Send a blank email to pear-qa+get-4497@lists.php.net to get a copy of this message
On 8/23/07, Hannes Magnusson <hannes.magnusson@gmail.com> wrote: > > On 8/23/07, Helgi Þormar Þorbjörnsson <helgith@gmail.com> wrote: > > Well I've talked this over with Ken on irc but well, why tailor dozen of > > packages to one application instead of the reverse ? > > Because it makes for simpler development cycle. > > > > On 8/23/07, Hannes Magnusson <hannes.magnusson@gmail.com> wrote: > > > You two are three weeks to late with your complaints. > > > He mailed -dev and -qa with a list of things he had planned, which > > > included fixing the tests to work with this new test suite. > > > > Well not my fault I still haven't caught up on all my emails :-) > > > > > Best practice or not, I hate the fact I need to *reinstall* the > > > package just to run the tests to see if anything failed, I really > > > appreciate these fixes. > > > > Well just look at it this way, you have to recompile C code when you > want to > > test it, why is this any different ? :-) > > Because I'm not using C. I am using PHP. KISS. > > > > If you don't want it then don't use any replacement constant, then you > don't > > have to install the packege. > > I *need* to use them. Hardcoding the /path/to/data/file/on/my/box is > hardly portable, is it? > > Ken; Please don't revert your changes to IS. I like them and I want them > there. Well then I'm throwing in the towel, seems the Validate leads don't have as much leverage as before we moved the locales outside of Validate and thus we can't guarantee that they'll all work the same. Either the locale people have to make sure that every locale behaves the same by appointing someone that might be responsible to make sure of that (IMHO) or we must accept that Validate locale packages might drift apart and not work the same way, at least I'm done with the locales. - Helgi > > > - Helgi > > > > > -Hannes > > > > > > On 8/22/07, Helgi Þormar Þorbjörnsson < helgith@gmail.com> wrote: > > > > Hello, > > > > > > > > Well the test suite should be adapted to work with CVS instead of > via > > versa, > > > > if you've done this fix in any other Validate package then please > revert > > it, > > > > adding extra code so external tools can do some fluffy stuff to the > > package > > > > (even in this case where the tool is extremely useful) is not good > > practice. > > > > > > > > - Helgi > > > > > > > > On 8/22/07, Ken Guest < kguest@php.net> wrote: > > > > > > > > > > On Tue, Aug 21, 2007 at 11:26:15PM -0500, Gregory Beaver wrote: > > > > > > Ken Guest wrote: > > > > > > > kguest Tue Aug 21 23:01:09 2007 UTC > > > > > > > > > > > > > > Modified files: > > > > > > > /pear/Validate package_AT.xml > > > > > > > /pear/Validate/Validate AT.php > > > > > > > /pear/Validate/tests validate_AT.phpt > > > > > > > Log: > > > > > > > Bug #11885 coding standard errors plus DATADIR reference > won't > > work > > > > > when testing from CVS > > > > > > > > > > > > [snip] > > > > > > > > > > > > > - $file = > > '@DATADIR@/Validate_AT/AT_postcodes.txt'; > > > > > > > + if ($dataDir != null && > > > > > > > (is_file($dataDir .. > > > > > '/AT_postcodes.txt'))) { > > > > > > > + $file = $dataDir . > > > > > > > '/AT_postcodes.txt'; > > > > > > > + } else { > > > > > > > + $file = > > '@DATADIR@/Validate_AT/AT_postcodes.txt'; > > > > > > > + } > > > > > > > $postcodes = array_map('trim', > > > > > > > file($file)); > > > > > > > > > > > > Hi Ken, > > > > > > > > > > > > This is not the best practice. When testing code from CVS, the > best > > way > > > > > > to do it is have a console window open (or dos box on windows) > in > > which > > > > > > you have typed: > > > > > > > > > > > > pear up -f package_AT.xml > > > > > > > > > > > > in the Validate CVS checkout directory. Then, when you make a > > change, > > > > > > hit <up arrow> <enter> and run your examples after your > Validate_AT > > has > > > > > > updated. With these two additional keystrokes per edit, you can > > both > > > > > > ensure your package.xml is valid and that it works as expected > from > > > > > > installation, and remove debugging hacks like the thing above. > > > > > > > > > > This is for the PEAR-wide unit test suite that is directly run > from > > cvs; > > > > > unless > > > > > the test suite is adapted to install each package, test it and > then > > > > > uninstall > > > > > the package there is probably no option but to have solutions like > > this in > > > > > place. > > > > > > > > > > > Ask on irc if you want more detailed tips on this - I think it's > > > > > > probably the most important thing I've learned while working in > > PEAR. > > > > > > Never run a package off of CVS unless you also intend users to > run > > it > > > > > > from an unzip-and-go, then you should test both ways when making > a > > > > > change. > > > > > > > > > > Thanks for your advice Greg - I hope there is a faq [or some other > > stable > > > > > form of knowledge repository] of these tips rather than having to > > rely > > > > > on IRC and all that it entails. > > > > > > > > > > > > > > > k. > > > > > > > > > > -- > > > > > Ken Guest > > > > > Mobile: +353 86 8252 141 > > > > > http://blogs.linux.ie/kenguest/ > > > > > Irish PHP Users Group > > > > > http://www.php.ie > > > > > > > > > > -----BEGIN PGP SIGNATURE----- > > > > > Version: GnuPG v1.4.2.2 (GNU/Linux) > > > > > > > > > > > > iD8DBQFGy+/qigdNTD9+4fIRAsASAJ0chYiFAJyfIkrIHRkGtQ4ijsxahgCdEwcJ > > > > > t/3qYCBxuCKLTSosIk314Bk= > > > > > =Qgq7 > > > > > -----END PGP SIGNATURE----- > > > > > > > > > > > > > > > > > > > > > >

« previous php.pear.qa (#4497) next »