[pkg-php-pear] tests in composer packages (was: Re: ITP: php-symfony-process -- Symfony PHP Framework - Process component)

andrea rota a at xelera.eu
Fri Jun 28 17:50:16 UTC 2013


On Fri, Jun 28, 2013 at 01:49:48PM +0800, Thomas Goirand wrote:
[...]
> Last, something I didn't see at first: there's a Tests folder, which is
> meant to be used with phpunit. If possible, it'd be nice to launch the
> unit testings at build time. This might need phpunit 3.7, in which case
> we should work on it (Parch: what's the status with that?).

from a couple of composer-only (i.e. no PEAR distribution available from
upstream) packages i'm working on, phpunit=3.6.10-1 works fine as far as
i can tell. however, running phpunit in the build folder just shows a
message asking to install (via composer) the dependencies of the code
being tested/packaged: this could either be achieved via a system-wide
composer install (on which i'm working), but i'm not sure whether
phpunit should rely on system-wide library installs (i.e. packaged in
Debian) or if it would be best to let the system-wide composer binary
work as a per-project installer, creating a 'vendor' folder in the build
directory, downloading the required dependencies and installing them in
'vendor', creating the autoloader code - again, in 'vendor' - and
running tests there.

an alternative (not sure how kosher) would be to add a precompiled
composer.phar binary to pkg-php-tools, to be used just for tests so that
everything is self-contained at build time and doesn't depend on any
Debian package of PHP libraries.

i think either way has pros and cons depending on use cases. anyway,
it's early times for this since i need to get composer to work as
system-wide install first, but wanted to flag this up in the meanwhile.

best,
andrea

-- 
andrea rota

Xelera - IT infrastructures
http://xelera.eu/contact-us/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1530 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-pear/attachments/20130628/4fe02506/attachment.sig>


More information about the pkg-php-pear mailing list