Articles in this series

  • Composer with Magento

Author - Vinai Kopp

I work for Magento Inc. as manager of developer education since October 2011. Before that I worked as a freelancer doing Magento development and developer trainings. Also, I'm the co-author of the German Magento Developer Handbook published by O'reilly.

More Info » Follow me on Twitter »

Reader Comments (15)

  1. Luis Tineo
    January 29, 2013 at 5:37 pm /

    Vinai,

    This is awesome – easy to read and follow

    Thanks for sharing it

    Regards,

    Luis

    Reply
  2. Alex
    January 29, 2013 at 10:11 pm /

    Nice article Vinai!
    As composer seems to become the new de-facto standard for package-management within the PHP world, I couldn’t wait for this to reach the Magento-hemisphere :)

    Cheers,
    Alex

    Reply
  3. Andreas von Studnitz
    January 29, 2013 at 11:52 pm /

    Great post, thank you! Looking forward to try that in practice (on Windows… which does support symlinks, but not the way Linux/MacOS does :-) )

    Reply
  4. Matthias
    February 2, 2013 at 7:10 pm /

    Hi Vinai,
    thanks to you I finally tried composer!

    A few things I had to change to make it work on my Debian test system:

    * replace “curl –O http://getcomposer.org/composer.phar” with “curl -s https://getcomposer.org/installer | php”
    * composer.json: replace line
    “twig/twig”:”v1.11.2″
    with
    “twig/twig”:”v1.12.1″,
    (v1.11.2 doesn’t exist, trailing comma missing)
    * composer.json: replace line
    “fbrnc/aoe_templatehints”:”dev-master”,
    with
    “fbrnc/aoe_templatehints”:”dev-master”
    (remove trailing comma)

    Reply
  5. Matthias
    February 2, 2013 at 8:40 pm /

    One more note:
    “n98/magerun”:”*”
    will install a pretty old version of n98-magerun (1.28.0).
    Replace this with
    “n98/magerun”:”dev-master”
    and you get the current version from GitHub (1.51.1 as of now).

    Reply
  6. Volodymyr Dubyna
    Volodymyr Dubyna
    February 5, 2013 at 2:28 pm /

    That is not so easy to use when you try to make a real package manager like packagist.org
    Sure, satis is really simple and easy to start but after half year usage I’ve faced with lot of problems, like: how to update information by commit?
    So, now I’m using https://github.com/composer/packagist
    But for the quick start – Satis is what you need. And thanx author for the great job.
    Composer should be a standard for php libs/extensions/modules/applications.

    Reply
  7. Yevgeniy V.
    February 6, 2013 at 2:03 am /

    Vinai, sorry, I don’t know how much you’re worked with PEAR, but the assumption the PEAR was build with assumption, that PHP library components would be installed system-wide isn’t quite right, at least according my experience. The PEAR is pretty flexible and configurable, even the version that was included with previous versions of magento was smart enought to not interfere with system wide extensions.

    Composer has quite different purpose: “Composer solves the PHP code-sharing problem”, worth reading: http://bergie.iki.fi/blog/composer_solves_the_php_code-sharing_problem/

    In other words “magento-deploystrategy”:”copy” is anti-composer concept which demonstrating the root problem of magento ;) IMHO, it’s time to refactor magento stack to support self containing extensions for easiest distribution and sharing.

    Reply
  8. Artjom Kurapov
    February 13, 2013 at 9:05 pm /

    Could not parse version constraint v1.11.2.*: Invalid version string “v1.11.2.*”

    Reply
  9. Kalen
    Kalen
    February 14, 2013 at 8:58 am /

    Thanks Vinai! This is amazing, I love it. Love that it has an uninstall as well. #thisisgonnachangeverything

    Reply

Add a Comment & Join the Discussion

Insert small snippets of code by using [code]{your_code_here}[/code]
For larger code blocks please use http://pastebin.com and paste your link.

You may also use the following HTML in your comment: <a href="" title=""> <abbr title="">
<acronym title=""> <blockquote cite=""> <cite> <em> <strike> <strong>