0

While installing Magento 2 (the recent stable version is Magento 2.0.7), I used different ways except archive/download.

The first used is Git clone:

$ git clone -b 2.0 [email protected]:magento/magento2.git

Then, another one is Composer

$ composer create-project --repository-url=https://repo.magento.com/magento/project-community-edition magento2

Then, the rest of the installation procedures are the same. And both ways could setup Magento 2 properly.

Whey use "git clone..." created the app/code/Magento, but compare with "composer create-project..." the app/code is empty?

Is "app/code/Magento" does not exist won't affect any other procedures? Such as installing 3rd party module or self created module in "app/code/Custom_module"?

2 Answers 2

4

When you create the project with composer all modules placed in vendor directory.

Pay attention then you should use git clone only in case you have to contribute to Magento project.

Empty app/code should not affect any processes.

1
  • Understand, so, composer create-project is like using the distribution version, vs the git clone is getting source code from Magento 2. Therefore, the git clone put all Magento 2 modules under "app/code" folder for contributors. The "app/code" folder is the place to put my own modules. Commented Jun 24, 2016 at 17:50
0

Magento2 is using composer and all modules are separate entity this time.
They are separately developed and get updates, modules for 2.0 which are available will also be downloaded in vendor folder which is the standard way of code sharing. You can find then in packagist.
Composer is a dependency manager for php development.
You will only have your code in app/code directory. All community code will be in vendor directory.
For better understanding with this and why we in Magento using this, You should read PHP Standards Recommendations

2
  • Thank you for your reference links to packagist and psr. They are helpful for me, as a front-end developer to understand further PHP standard. Commented Jun 24, 2016 at 17:30
  • you can accept the answer if you found this helpful for you. Commented Jun 24, 2016 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.