Composer (Dependency Manager) for concrete5 Marketplace

Permalink
To make things clear: I'm talking about the Dependency Manager http://getcomposer.org/ here, not the Composer feature of concrete5.

We're using Composer to load dependencies to PHP libraries for a website we're building with concrete5 and would like to load concrete5 add-ons with Composer as well.

Update: The official Composer installer now supports concrete5: https://github.com/composer/installers/pull/104...

What's missing now is a Composer repository which lists all add-ons available in the concrete5 Marketplace. I've come up with a quick workaround by crawling the Marketplace API and building my own packages.json:https://gist.github.com/fabian/7005017...

However this could be much improved if the packages.json would be provided by the concrete5 website itself according to the Composer documentation:http://getcomposer.org/doc/05-repositories.md#composer...

So, any webmaster of the concrete5 website interested in implementing this? I could provide some help with the packages.json format.

fabianvogler
View Replies:
Remo replied on at Permalink Reply
Remo
See my post on github about the package installer and my concrete5 packages on packagist.https://github.com/concrete5/concrete5/issues/1638#issuecomment-3626...

No surprise, I'm 100% for composer, we're using it to manage all our projects, add-ons and I would never ever switch back to something else. It was a perfect match for our requirements.

Since we're using a custom patched concrete5 version since 5.1, I never cared much about whether there's a composer.json in the main repository, but I definitely support the idea as I'm sure it would add some value to a couple of pro developers.
razorcommerce replied on at Permalink Reply
razorcommerce
Good idea Fabian. Would be great if every free package automatically had a packagist url and we could easily load up a dozen packages on install. Is that the case you had planned to use it for?

Right now we're trying to figure out how to load individual composer packages into our C5 package (razorcommerce). Tried just adding a new composer.json file to the root of our package and found that does nothing. Have you tried that in a custom package to load a library?
Remo replied on at Permalink Reply
Remo
We've got a few 5.7 packages with a custom composer.json in the root of the package. Imho it's completely wrong, but so far the only way we could get it working is to include the autoloader created within your package.