[pkg-php-pear] tests in composer packages

andrea rota a at xelera.eu
Tue Jul 2 17:40:45 UTC 2013

Thomas, Mathieu,

thanks for your advice on this:

On Sun, Jun 30, 2013 at 01:05:37AM +0800, Thomas Goirand wrote:
> On 06/29/2013 01:50 AM, andrea rota wrote:
> > 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.
> You should use the system-wide installed library, and Build-Depends: on
> that. That's how all other packages are doing.

ok, i understand.

> You can leave the unit tests aside for the moment though, and add the
> feature later on, if you feel it is more easy to do this way.

definitely - even just for base Composer integration, there is quite
some work to do (i have Composer and its dependencies packaged and
running on my dev systems, but the Composer package is relying on hacks
at the moment), so one step at a time is best.

> Thomas
> P.S: Don't need to CC: me, I'm reading the list. Andrea, do you wish to
> be CC-ed?

i'm reading the list too, so no need to Cc me either. sorry for my
broad cc's and cross-postings these past few days :)

On Sun, Jun 30, 2013 at 05:04:51PM +0200, Mathieu Parent wrote:
> > 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.
> A build should not contact internet in any way. So the solution here
> is to add all the libraries needed for the tests as build-dependencies
> (and they should be packaged first).

yup, as suggested by Thomas too; i'll post back to this thread when i
have some initial code to share on this side.


andrea rota

Xelera - IT infrastructures
-------------- 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/20130702/3d42f743/attachment-0001.sig>

More information about the pkg-php-pear mailing list