cancel
Showing results for 
Search instead for 
Did you mean: 

Do I have to install composer?

Do I have to install composer?

Hi all,

 

I'm new to Magento platform, so excuse me if the question is silly.

The download page for M2 states that:

 

    For the first time, the Magento software uses Composer for dependency management.

 

However, the installation guide says that I have an option to install M2 from a zip archive by uploading it to the server, and:

 

    Composer is required for developers who want to contribute to codebase,or develop extensions.

 

I'm a bit confused. Do I actually have to install composer in order to install M2 shop? I'm not planning to develop extensions. All I need is a demo shop to play with and see if it's suitable for our business.

 

Thanks.

 

P.S. My environment: Ubuntu 14.04; PHP 5.5; MySQL 5.6; Apache 2.4.

4 REPLIES

Re: Do I have to install composer?

There are 3 different ways to get Magento2 , via git, using composer create-project and downloading the zip from magento.com. The first 2 methods require that composer is installed. Using the zip does not require composer for core Magento. However, if you plan to add extensions and want to manage them, you will have to install composer in this case too.

Re: Do I have to install composer?

Thank you for the prompt reply.

 

I guess I will need extensions. We need Alipay gateway and Chinese translation for the front end. I noticed that M2 provides Chinese language pack out of the box, but no Alipay module.

 

I have two additional questions:

  1. If we want to use different theme for the front end, does it require an extension (and Composer)?
  2. If we use different theme, does it require a new translation for that theme or we can use existing language pack?
  3. Which of the following character sets does default Chinese language pack include: Traditional, Simplified? I couldn't find a list of available translations in the documentation.

Thank you.

Re: Do I have to install composer?

In theory you don't need composer as you can copy your files into the server filesystem. However installing extensions & themes in Magento 2 is more involved in Magento 2 and does require command line access.

 

Everything, including themes are now treated as Magento Modules. The files are all held in a single directory rather than distributed in various directories on the server as used to be the case with Magento 1. So your theme or extension would go in the vendor directory where each module producer has their own sub-directory, that each of their modules has a directory within.

 

For example you would create a directory under vendor with your company name and then the name of the theme., e.g...

vendor/mycompany/mymodule

Every module is now registered and version controlled. If you create a new theme there are two files that are required to install the module...

etc/module.xml
registration.php

The module is enable in the command line using ....

bin/magento module:enable mycompany_mymodule 

 

Re: Do I have to install composer?

Hi Darren,

 

Thanks for the elaborate reply. We don't plan to develop themes ourselves. We don't have manpower and expertise to do this. Most likely we'll just buy something off the shelve. It also depends on how customizable the default theme is. If we can tweak it, then maybe we don't even need a 3rd party theme.

 

It seems that installing Composer in unavoidable. Would you suggest to install Composer first and then create M2 project with it, or to start with M2 zip file and install composer in parallel? BTW, how does M2 locate Composer? Should Composer be in the system $PATH?

 

If I understand it correctly, installing Composer and then pulling all required components is akin to pulling RPM packages from centralised repo, so I don't need to upload M2 zip file to the server. Is it correct?