phpunit-all-in-one icon indicating copy to clipboard operation
phpunit-all-in-one copied to clipboard

Define the metadata in composer.json rather than VCS'ing whole projects?

Open patcon opened this issue 12 years ago • 3 comments

I'm still new to composer, but it was my understanding that you could just build out a really big composer.json file that would build all of this on the fly.

This was the tutorial I used: http://burgiblog.com/2012/03/08/depending-on-packages-without-composer-json-in-composer-php-dependency-manager/

And for another example, this was the project I did it in (in-progress): https://github.com/myplanetdigital/drupalcs/blob/drush-command-composer/composer.json

I think you can easily map tags to versions too, although I haven't dealt with that personally.

The types "package" and "pear" are likely most useful to you, if this will work. PEAR is PSR-0 compatible, as I learned in IRC today, so it doesn't need any help autoloading, but if you're using git repos, you'll need to tell it where the directory with the classmap file is. (I'm parroting things I don't totally understand right now :)

patcon avatar Apr 27 '12 01:04 patcon

I completly agree to patcon. The idea of this package is great, but i really don't need another finder or class loader, i already use this two. But as since 22 days nothing happend in this repository...

Please tell us, if you want to make this change or not.

rejinka avatar May 18 '12 13:05 rejinka

I tried to mount a composer.json pointing to the GitHub PHPUnit, but due to some peculiarities in the autoloader PHPUnit this was not possible (I did not have enough knowledge to do it).

Another strategy would be to simply map packages pear / composer. I'm trying to do this in http://github.com/eher/pear-phpunit In this case one would lose in download speed (PEAR is slower than Git), but otherwise, we would always have an updated version that is the same as PHPUnit distribute.

My attempt with the current project is to create a proof of concept and recruit people who believe it is simpler to maintain a project / deploy in composer than pear.

Still do not discount the suggestion of Patcon and agreed that it would be the best option efeiciente. Extract each of the dependencies of PHPUnit (each in a package Composer) is the best scenario in my opinion.

Now that there is a version of PHPUnit that can be installed via Composer (albeit in a not so elegant), we gain time to try again this idea.

EHER avatar May 19 '12 13:05 EHER

The mapping of pear packages to git repositories (with a composer.json) should be easily done by a script. That should do the job for a while.

Furthermore, i found something interesting in 1: In the current alpha, it should be possible to map pear repositories. I will investigate in this in 2.

rejinka avatar May 19 '12 16:05 rejinka