Skip to content

Instantly share code, notes, and snippets.

@jamescowie
Last active August 29, 2015 14:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamescowie/c6c32050fba621840f15 to your computer and use it in GitHub Desktop.
Save jamescowie/c6c32050fba621840f15 to your computer and use it in GitHub Desktop.
Installing Magento 2 / Magento 2 module workflow.

Installing Magento 2

Im exploring the different ways that can be used to install Magento 2 both locally for extension development and then how this could be deployed into production.

Warning this will be a evolving living gist as I have time to play around.

Using composer to create the project

I found that I could run:

composer create project magento/project-community-edition=dev-master magento2

This creates the folder magento2 and will clone the magento/project-community-edition repository with branch master version can be specified via the = when running this as a single command.

Once this operation has completed. Note there may be instances where you need to install more system packages. I had missing requirements for php-intl and php-mcrypt that had to be resolved before this would complete. You then need to mvoe into the magento 2 directory and run composer install to install all the required magento 2 dependencies.

Running notes / Ideas

Could extensions be loaded from the vendor directory ?

Is there a need to use the composer-hackathon-module to clone into vendor and then move into the app/code/Magento directory ? Is there any real speed / performance / general reason to do this... First thoughts are that its less "Non owned by me" code to be contained within the repository. Vendor is never part of my repo and is pinned via composer...

@nevvermind
Copy link

@alankent - while I don't completely disagree with having vendor committed to the repo, having your own Composer server proxy might help (like Toran). That server can keep your packages indefinitely, regardless of Packagist or other VCS platforms (github, bitbucket etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment