Articles in this series

  • Composer with Magento

Author - Vinai Kopp

I am a passionate Web Developer and open source enthusiast since 1998. Today my main focus in on Training Developers how to customize Magento.
Since March 2008 I have specialized on the Magento platform, which, at the time, still was in the later Beta stages.
Working as a freelancer for my own clients and in large teams I was able to gather valuable experience in projects ranging from very small to quite large.
This enabled me to move into training Developers how to effectively customize Magento.
Since then I have spent thousands of hours giving trainings, both in-house and open to everybody, in all aspects of the Magento platform.

Since March 2010 I also am a Instructor for the official Magento U developer trainings for Magento.
I spent two years as an employed trainer for Magento, but decided I prefer the freedom to focus on projects I choses myself, and now work as a freelancer again since
January 2014.
I am a member of the Magento Certification Advisory Board and was one of the first to pass the MCD+ exam.
Also, I am an co-author of the German Magento Developer Handbook published by O'Reilly in 2010.

More Info » Follow me on Twitter »

Reader Comments (36)

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


    This is awesome – easy to read and follow

    Thanks for sharing it



  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 🙂


  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 🙂 )

  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” with “curl -s | php”
    * composer.json: replace line
    (v1.11.2 doesn’t exist, trailing comma missing)
    * composer.json: replace line
    (remove trailing comma)

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

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

  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
    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
    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.

  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:

    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.

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

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

  9. 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

  10. Josh Ribakoff
    May 26, 2013 at 12:30 pm /

    My extension is ported to multiple shopping carts, so there is a “core library” that is common to all extensions. That core library which depends on zend framework, and it has it’s own composer.json which includes ZF.

    I was getting errors:
    PHP Fatal error: Cannot redeclare class Zend_Controller_Request_Http in magento/lib/Zend/Controller/Request/Http.php on line 1066

    The fix for this was to change the order of my include paths in a bootstrap file for my extension:

    . PATH_SEPARATOR . get_include_path()

    This ensures that composer’s paths come after Magento’s lib folder, so Magento’s lib folder takes precedence.

    It seems like the reason this hack is needed, is because the ZF that composer installs has the require_once, whereas Magento stripped them out for performance reasons. When the require_once are hit, they are ambiguous because of the multiple instances of ZF on the include path.

  11. Composer with Magento
    July 29, 2013 at 4:30 pm /

    […] Magebase VN:F [1.9.22_1171]please wait…Rating: 0.0/10 (0 votes cast)VN:F [1.9.22_1171]Rating: 0 (from 0 votes)Google+ Filed Under: Magento plugins · Tagged With: Composer, Magento […]

  12. Pete
    March 13, 2014 at 6:32 am /

    HI Vinai,

    Really useful article, I started using composer in all projects and it’s a real time saver. I have 1 question.

    Can i map from the local composer.json file where a module installs its files, for example rather than each module i install with composer putting its theme files in base/default can i set it to mynewtheme/default ?

    Thanks in advance.

  13. Product Import with Magento | integer_net GmbH / EN

    […] and loads the necessary import module with the Magento-Composer-Installer. It is controlled via command line and it gives as a result the measured import […]

  14. Sylvain Raye – about Magento, Composer, and Meet Magento Switzerland | Magentoutvecklare i världen, här får du bra info!

    […] The tutorial from Vinai Kopp: […]

  15. Why modules shouldn’t be installed via Magento Connect Manager | integer_net GmbH / EN

    […] module should be installed on a development or test system first. In the best case, you are using Composer or a similar tool for […]

  16. Best tutorials for Magento | Ken Nguyen

    […] and magento-composer-installer for Dependency […]

  17. Mark
    November 27, 2015 at 7:58 pm /

    Hi! Thank you for this article! I also have one question and hope you will help me!I need to remove completely around 700 products – How to I redirect the URL’s for them – Probably an easy question for experienced folk out there! But it is big trouble for me to find any information via Internet. I looked here but it was unsuccesful!

  18. Brandon
    December 16, 2015 at 5:41 am /

    Problem: Composer clones my repos to the vendor directory, but is not symlinking them into the Magento core files.

    Background: I am using the setup at The modules listed there are correctly symlinking, but the ones I added are not. My composer.json is here:

    Solution: Can you help? 🙂

  19. Francis Kim
    January 17, 2016 at 2:46 am /

    Glad now this is a standard in Magento 2!

  20. jrosell
    March 2, 2016 at 9:35 pm /

    Would like to use composer from my private bitbucket repo. Is that possible in similar way?

  21. Anand
    August 30, 2016 at 7:23 pm /

    Meganto is a huge software and for any software developers.

  22. Printsmash
    September 18, 2016 at 6:58 am /

    HI Vinai,

    Really useful article, I started using composer in all projects and it’s a real time saver. I have 1 question.
    is it has an uninstall as well?

  23. How to make Magento Extensions work with Composer – Tutorials – Magebase

    […] post is about how to make Magento extensions installable wich composer. Please refer to the previous post here on on how to do the other part, namely install Magento extensions with […]

  24. Alex
    June 12, 2017 at 3:26 pm /

    Thanks for sharing, i have another resource from where i get help, i was looking for composer and found it here, , your post is very informative and well explained with step by step guides.


Add a Comment & Join the Discussion

Insert small snippets of code by using [code]{your_code_here}[/code]
For larger code blocks please use 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>


This site uses Akismet to reduce spam. Learn how your comment data is processed.