[Kolab-devel] PHP composer and packaging

Jeroen van Meeuwen (Kolab Systems) vanmeeuwen at kolabsys.com
Fri Feb 7 09:41:04 CET 2014


On 2014-02-07 09:23, Thomas Brüderli wrote:
> 1. Create a package with composer and its autoloading magic and install
> it in a global location like /usr/share/php:
> 
> 2. Create individual packages for composer-based libraries and install
> them to /usr/share/php/vendor/. e.g.
> 
> 3. After installing a package, execute
> 
> 4. When packaging projects like iRony or Roundcube which may use
> composer, use the composer.json file as a human readable source of
> dependency definitions and create a symlink for the vendor directory:
> 

The problem with autoloading is that developers start omitting the 
require_once() calls, and the problem with composer is the facilitation 
of multiple versions of a library potentially being vendorized (one per 
application / suite though).

Packagers, distributors and regulatory compliance usually require one 
system-wide version of a particular library or capability, however.

>   <project-dir>/vendor -> /usr/share/php/vendor
> 
> That way, developers can keep on using composer.json to define
> dependencies and can use composer to install them for their local
> project-related development environment and when distributed with the
> php-composer distribution packages, autoloading still works as 
> expected.
> 

You are aware using composer (to pull stuff in) during the build process 
is not possible? We have to pull stuff in during the composition of the 
.tar.gz, which usually does not happen on the build target stack.

Kind regards,

Jeroen van Meeuwen

-- 
Systems Architect, Kolab Systems AG

e: vanmeeuwen at kolabsys.com
m: +44 74 2516 3817
w: http://www.kolabsys.com

pgp: 9342 BF08


More information about the devel mailing list