What is Composer?

Composer is a tool for dependency management in PHP. In short, the Composer is intended to keep code manageable.

When engineers are developing software, they can take advantage of libraries. A library usually contains a piece of functionality, for example:

  • Sending e-mails
  • Compress images
  • Login

Because the functionalities in the Composer libraries are universal, developers can use the same library in different projects. This will save them a lot of time

For more technical information about the Composer:

Magento 1
Magento 1 doesn’t support the Composer tool. In this case developers have to search for suitable libraries, and implement these in their code. The problem is these libraries are usually not universal and thus prone for compatibility problems.

Magento 2
Magento 2 offers out of the box support for the Composer tool. All libraries use a default folder: The Vendor folder. In this Vendor folder you can find all the available libraries in their own folder.

Because of the Composer tool, calling a library in your code is made very easy. Updating libraries is also more manageable.

Extensions can also be called from the Vendor folder. Because of this the versioning in the Magento 2 codebase is very limited. In Magento 1 the extensions needed to be in Magento, in Magento 2 this is not necessary anymore. In short, when updating the libraries in your production environments you are also updating all the extensions in it.

Heeft u feedback? Wij horen het graag op 020-2181001 of per e-mail op support@tig.nl.

  • No labels