Using the Composer API

50 views
Skip to first unread message

nathan

unread,
Sep 24, 2015, 12:36:30 PM9/24/15
to composer-dev

Hi there


I'm trying to write some code that uses the Composer API to check for available updates for my packages.


So I want to use the Composer API in my code, but without going down the normal plugin route with an  ‘activate’ function that gives you your Composer $composer object. 


Is it possible to use the Composer API without making a plugin?

How can I generate a Composer $composer object from a composer.json file?


Thanks


N

David Négrier

unread,
Sep 25, 2015, 7:39:38 AM9/25/15
to composer-dev
Hey Nathan,

You can include "composer/composer" in your composer.json project.

If you want to easily get a "Composer" object, I recommend having a look at Embedded Composer (by Beau Siemensen). 

Beau is doing exactly what you are trying to do in his package.

++
David.
Reply all
Reply to author
Forward
0 new messages