magento-hackathon / magento-composer-installer

Composer installer for Magento modules
210 stars 154 forks source link

Core installer #100

Closed bragento closed 10 years ago

bragento commented 10 years ago

I've added the magento-core package type with installation and update routines, allowing you to set up the whole project with composer.

Using either https://github.com/bragento/magento-core or http://packages.firegento.com (as soon as my pull request for the magento/core repo gets through) you can now require "magento/core" which has the "magento-core" compoyser package-type.

The added pre/post Install/Update routines for this package type allow for a fully automated Magento Installation and seamless Update processes.

  1. Installation:
    • Require magento/core
    • If no magento-root-dir defined you are prompted to define one
    • If your magento-root-dir is missing, you are prompted if you want to have one created automatically
    • You can have your composer root file require any magento-module packages besides the core
    • During the installation the root-dir is emptied in order to bypass possible filesystem hickups with symlinks
    • After the core installation -- the magento-modules which may have been installed up to that point are redeployed with the configured deploy strategy -- the folder rights required by the Magento core are set (by default [app/etc, media, var])
  2. Update:
    • While updating certain files and folders need to be persistent to guarantee a seamless upgrade without data loss (by default [app/etc/local.xml, media, var])
    • During the update process a tmp root dir is created where a fresh core is installed first
    • Afterwards the modules get redeployed there again
    • Finally the folder rights are set again
    • The persistent folders are moved into the updated core
    • The "var/cache" folder is cleared
    • You are prompted and get a final chance to check if any files in the original root dir need to be transferred to the updated root
    • The backup dir gets cleaned up

My first tests were very promising. Now I would like to involve the community to round things up.

sylvainraye commented 10 years ago

@Flyingmana any chance to be merged? I find interesting

Flyingmana commented 10 years ago

will get merged, but need a bit time to test and refactor a few things

tkdb commented 10 years ago

@Flyingmana : I find this interesting as well, however I would for the first version opinion against the automatic magento-dir creation and the automatic clean (removal) of the root directory. Just my 2 cents. Ping me if you like to test something.

Flyingmana commented 10 years ago

please test if still everything works :+1: