magento-hackathon / magento-composer-installer

Composer installer for Magento modules
210 stars 156 forks source link

How to deploy magento-core package into magento-root-dir #103

Closed sebastianwagner closed 10 years ago

sebastianwagner commented 10 years ago

When trying to use the installer for deploying only packages of the type magento-module are copied into the magento-root-dir. How can i force magento-core packes as seen in magento/core to be copied as well?

{
    "require": {
        "magento/core": "1.9.0.1",
        "magento-hackathon/hackathon_magemonitoring": "*"
    },
    ...
    "extra":{
        "magento-root-dir": "htdocs/",
        "magento-deploystrategy": "copy"
    }
    ...
}
Flyingmana commented 10 years ago

do you use the current beta release of the installer?

sebastianwagner commented 10 years ago

No, i was using the 1.3.2, but even after changing the required version, the magento-core is not copied into vendor/htdocs.

Here is the change i made to my composer.json in order to force the install in beta version:

{
    "require": {
        "magento-hackathon/magento-composer-installer": "@beta",
        "magento/core": "1.9.0.1",
        "magento-hackathon/hackathon_magemonitoring": "*"
    },
    ...
}

I wonder how a minimal composer.json would look like that places all files into one directory after deploying?

davidverholen commented 10 years ago

did you include the packages.firegento.com repository?

there was a working magento-composer-installer package on packagist.org, but right now, i cant even find it there. And even the installer gets installed, it doesnt deploy the magento core.

So this should work to install the magento core into ./htdocs/:

{
    "require": {
        "magento/core": "1.9.0.1"
    },
    "extra": {
        "magento-root-dir": "htdocs"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "http://packages.firegento.com"
        }
    ]
}
Flyingmana commented 10 years ago

did you check which version of the composer installer got installed? please try again with "2.0.0" (we did now a "stable" release)

sebastianwagner commented 10 years ago

It now seems to work when using the 2.0.0 branch. I got it running with my own composer.json.

Flyingmana commented 10 years ago

so can I close this ticket? Or is there any problem left?

alecbedzir commented 10 years ago

Hi. Facing the same problem for already quite a while. Have tried all the suggestions in this thread: 2.0.0 installer, ensuring "http://packages.firegento.com" is used etc. For me example provided via link composer.json doesn't work. What else can be checked to finally get the magento/core "symlinked" or copied to htdocs folder?

alecbedzir commented 10 years ago

Guys, here is the answer for my own question as it will save time for others, probably. If you have the issue like this one, then:

1) as mentioned before - no outdated version should be installed (e.g. 1.4). Version 2.0.0 and higher is totally ok. 2) check whether you have the up-to-date version of composer 2) check whether cache of composer is cleaned (rm -rf ~/.composer/cache) 3) check whether you don't have any custom configuration in ~/.composer/config.json (e.g. which overlaps with your per-project configuration or blocks packagist ("packagist": false) or sets repository of "type": "composer" to smth custom)

davidverholen commented 10 years ago

-> the repositories can be configured only in the root package. Means the firegento Repository must be defined in the root composer.json, otherwise the installer will be installed from the broken repo on packagist.org

Flyingmana commented 10 years ago

the special part about the "magento/core" got removed from the installer in newer releases now.

please use https://github.com/bragento/bragento-composer-installer if you want to continue to use this feature