Re: PHPUnit 1.0.0-alpha1

From: Date: Fri, 29 Aug 2003 07:15:28 +0000
Subject: Re: PHPUnit 1.0.0-alpha1
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20803@lists.php.net to get a copy of this message
--- Sebastian Bergmann <sebastian@php.net> wrote: > Yesterday I released the first preview version of the all-new PHPUnit > for PHP 5. > > I marked it as "alpha", but the PEAR Installer install this unstable > version instead of the stable one: It depends on the local configuration, do: $ pear config-show and look at what you got for 'preferred_state', options are devel, alpha, beta, stable (in order of "stability") > sb@wopr-mobile:~/ > pear install PHPUnit > downloading PHPUnit-1.0.0-alpha1.tgz ... > ...done: 20,030 bytes > PHP version >= 5.0.0 is required > PHPUnit: Dependencies failed > > I'm also confused why the dependency check fails since I'm using the > current CVS version of PHP 5: > > sb@wopr-mobile:~/ > php --version > PHP 5.0.0b2-dev (cli) (built: Aug 27 2003 09:29:32) (DEBUG) > Copyright (c) 1997-2003 The PHP Group > Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies Dunno about that. There used to be a similar problem with package version comparisons, nowadays it uses version_compare() which has its own quirks if one is not too familiar with its logic. For example: echo (int) version_compare("5.0.0b2-dev", "5.0.0", "ge")."\n"; echo (int) version_compare("5.0.0b2-dev", "5.0.0")."\n"; prints: 0 -1 Which is consistent w/ dev/alpha/beta releases being less 'mature' than stable releases (5.0.0 is considered stable in this case). Perhaps you may want to change your package.xml to require '5.0.0-dev' instead. The code that does the comparison is the method 'checkPHP()' in PEAR/Dependency.php HTH. ===== -- Jesus M. Castagnetto (jcastagnetto@yahoo.com) Research: http://metallo.scripps.edu/ Personal: http://www.castagnetto.org/ __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

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