├── README.md └── composer.json /README.md: -------------------------------------------------------------------------------- 1 | # Magento 2 standard installation using composer 2 | 3 | --- 4 | 5 | *__Official installation note__: Since Magento released officialy version 2.0.0, they added the `composer project-create` command in the documentation. You can find more information here: * 6 | 7 | --- 8 | 9 | ![Version of Magento](https://img.shields.io/badge/Version%20of%20Magento%20installed%20by%20this%20project-2.0.4-green.svg) 10 | 11 | As you probably know, Composer is used in Magento 2. 12 | One of the fine part is that Magento 2 can be totally (ok, almost) included in the `vendor` directory. 13 | 14 | ## Use it (aka Install Magento 2 using composer) 15 | 16 | It is really easy to use. **But please read the Requirements** part below before trying to install Magento 2 as a composer dependency. 17 | 18 | The `create-project` command accepts multiple arguments like: 19 | 20 | * `-s dev`: set the stability to `dev` 21 | * `--ignore-platform-reqs`: ignore the platform requirements (version of PHP…) 22 | * `--prefer-source`: use git clone instead of using the cache if you have one for the dependencies 23 | 24 | According to this if we are on the machine where you want to run Magento 2, you just have to run: 25 | 26 | composer create-project magento-hackathon/magento2-standard destination 27 | 28 | Replace the `destination` with the name of the directory where you want to put Magento 2. 29 | 30 | If you are, like me, on your own machine and you don't have all the dependencies for Magento (because you use virtual machines): 31 | 32 | composer create-project --ignore-platform-reqs magento-hackathon/magento2-standard destination 33 | 34 | ## Demos 35 | 36 | [![Video on Toutube](https://i.ytimg.com/vi/gmz9h8g6Gk8/maxresdefault.jpg)](https://www.youtube.com/watch?v=gmz9h8g6Gk8) 37 | 38 | [![Example with asciicast](https://asciinema.org/a/30082.png)](https://asciinema.org/a/30082) 39 | 40 | ## What does it do? 41 | 42 | It's really simple in fact. We just say to composer that Magento 2 is a dependency and we update the autoload to make the setup wizard work. 43 | 44 | No big deal. Just the time to find out how it works. 45 | 46 | ## Requirements 47 | 48 | This repository isn't on packagist yet. And because of that you can't run the `create-project` command of composer with this beautiful code. 49 | 50 | You have to add this repository into your composer global configuration. 51 | 52 | Please run this command in your console: (or your VM, or your server…): 53 | 54 | composer config -g repositories.magento2-standard vcs https://github.com/magento-hackathon/magento2-standard 55 | 56 | ## Questions & Answers 57 | 58 | * **I use a VM and I want to clone Magento 2 directly in my computer but some requirements are missing. How can I do?** 59 | 60 | If like me you want to use the performance of the IO of your own machine and probably use your personnal token on github you can ask to composer to not check on the platform requirements: 61 | 62 | You just have to use the command line option `--ignore-platform-reqs` in your composer command. 63 | 64 | See the [create-project command][create-project-command]. 65 | 66 | ## How to contribute 67 | 68 | Feel free to send pull requests. 69 | 70 | If you want to use your own repository and use the last commit for your tests, you have to use the `-s dev` argument in your composer command, like: 71 | 72 | composer create-project -s dev magento-hackathon/magento2-standard destination 73 | 74 | ## Contributors 75 | 76 | * Jacques Bodin-Hullin ([@jacquesbh](https://github.com/jacquesbh) / [jacquesbh](http://twitter.com/jacquesbh)), Author & Maintainer 77 | 78 | 79 | [create-project-command]: https://getcomposer.org/doc/03-cli.md#create-project 80 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "magento-hackathon/magento2-standard", 3 | "license": [ 4 | "OSL-3.0", 5 | "AFL-3.0" 6 | ], 7 | "type": "project", 8 | "description": "The \"Magento 2 Community Edition\" distribution", 9 | "authors": [ 10 | { 11 | "name": "Jacques Bodin-Hullin", 12 | "email": "j.bodinhullin@monsieurbiz.com", 13 | "homepage": "http://monsieurbiz.com/", 14 | "role": "Maintainer" 15 | } 16 | ], 17 | "repositories": [ 18 | { 19 | "type": "composer", 20 | "url": "https://repo.magento.com/" 21 | } 22 | ], 23 | "require": { 24 | "magento/product-community-edition": "2.0.4" 25 | }, 26 | "autoload": { 27 | "psr-4": { 28 | "Magento\\Framework\\": "lib/internal/Magento/Framework/", 29 | "Magento\\Setup\\": "setup/src/Magento/Setup/", 30 | "Magento\\": "app/code/Magento/" 31 | }, 32 | "psr-0": { 33 | "": "app/code/" 34 | }, 35 | "files": [ 36 | "app/etc/NonComposerComponentRegistration.php" 37 | ] 38 | }, 39 | "scripts": { 40 | "post-install-cmd": [ 41 | "chmod ug+x bin/magento" 42 | ] 43 | }, 44 | "minimum-stability": "dev", 45 | "prefer-stable": true 46 | } 47 | 48 | --------------------------------------------------------------------------------