I know there are nice ways to install Magento Modules (from Connect) and from GitHub (if composer.json is provided).
(as described in http://magebase.com/magento-tutorials/composer-with-magento/)
Is it possible also to install the basic Magento package (for example CE 1.7.0.2) using Composer?
Did anybody already try that? (if successfully or not)
-
Check out my new blogpost razbakov.com/blog/install-magento-via-composer. We finally have firegento/magento repo and use it as frequently synced magento-mirror-repo.Aleksey Razbakov– Aleksey Razbakov2015年08月07日 15:46:57 +00:00Commented Aug 7, 2015 at 15:46
4 Answers 4
Currently it can only be installed using
$ composer create-project "kylecannon/magento" -s dev
The package of course could be replaced with any other trustworthy Magento package of your choice.
Of course that's not satisfactory, since it can't simply be installed by adding it as a requirement in the composer.json.
The magento-composer-installer project currently doesn't support installing Mage_Core_Latest due to missing dependencies. If nobody else fixes that in the http://packages.firegento.com build script, I want to do it at the next hackathon at the latest.
-
is there any GitHub issue for that?Alex– Alex2013年06月05日 21:01:41 +00:00Commented Jun 5, 2013 at 21:01
-
Yes, but somehow I closed it: github.com/magento-hackathon/magento-composer-installer/issues/… (just reopened)Vinai– Vinai2013年06月06日 05:26:06 +00:00Commented Jun 6, 2013 at 5:26
If you use the alternative composer installers by AOE, you can add a composer package of type magento-source as dependency and specify where the code should be placed:
"extra":{
"installer-paths": {
"www/" : [ "type:magento-source" ],
".modman/{$vendor}_{$name}/" : [ "type:magento-module" ]
},
For the Magento core you will need a repository with a composer.json as follows:
{
"name": "magento/ce",
"description": "Magento Repository",
"type": "magento-source",
"require": {}
}
We use separate branches for each 1.x.x version and apply patches on each branch. To be compatible with composer's version constraints, tags are added like this: 1.9.1.0-patch6285
This strategy works well if you consequently use modman to link any custom files into the Magento root directory and don't add files directly. Then you can decide if you want to add the whole www directory with the symlinks to Git or exclude it.
In the example above, the AOE installers are configured to put Magento modules directly into the .modman directory, so that you can create the symlinks with a single modman deploy-all. You can make use of composer scripts to trigger it automatically after composer install and composer update:
"scripts":{
"post-install-cmd": [
"modman deploy-all --force"
],
"post-update-cmd": [
"modman deploy-all --force"
]
}
I'm working now on creating ready-to-go development package for magento. It will include vagrant box with puppet configuration and magento as dependency in composer.
You can use my latest Magento as Composer Dependency
-
the link is sadly invalid, can you fix this?Fabian Blechschmidt– Fabian Blechschmidt2015年02月24日 10:37:32 +00:00Commented Feb 24, 2015 at 10:37
I stumbled over this article: http://magebase.com/magento-tutorials/composer-with-magento/ — maybe it has the answer you're looking for?
-
Thanks, I know this article and edited my question to refer to it. I think it "only" covers installing modules - but not the Magento base installation.Alex– Alex2013年06月12日 12:05:50 +00:00Commented Jun 12, 2013 at 12:05
-
Correct, only modules, not base MagentoVinai– Vinai2013年06月12日 12:24:59 +00:00Commented Jun 12, 2013 at 12:24