magento-hackathon / magento-composer-installer

Composer installer for Magento modules
210 stars 154 forks source link

deploystrategy: none does not actually work #77

Closed CNanninga closed 10 years ago

CNanninga commented 10 years ago

While the documentation indicates that using a value of "none" for extra.magento-deploystrategy will result in the copy/symlink deployment not actually occurring, this does not appear to work. I've looked at the code, and MagentoHackathon\Composer\Magento\Installer::getDeployStrategy does not have a case for "none".

Is it possible this is implemented in a different branch/version? I have a simple wildcard character specified for version in composer.json, and composer.lock shows that the installed version was 1.3.1.

CNanninga commented 10 years ago

I see now that the 1.3.1 release was a while ago, and deploystrategy:none has been implemented in master.

However, in a composer.json where minimum stability is not set to dev, including "" as the version of magento-composer-installer will always result in the latest stable release only, not master. Either "@dev" or "dev-master" would need to be specified explicitly. What is the recommended way of including magento-composer-installer in a project?

Flyingmana commented 10 years ago

Its recommended to use a version marked as stable.

As we did some other changes which cause backwards compatible breaks, and also have a few upcoming, the next release will be a major release (2.x), so you should use 1.*, 1.3.* or ~1.3 or similar. More information to version constraints: https://getcomposer.org/doc/01-basic-usage.md#package-versions Always check if everything works, if you update to a new version,

Flyingmana commented 10 years ago

could you test again with "magento-hackathon/magento-composer-installer": "dev-master@dev", to see, if it works in newest version?

CNanninga commented 10 years ago

Master is the branch that was already being pulled down with composer.json as I had it configured. However, I've made the change you suggested to require it explicitly. The issue still occurs.

Flyingmana commented 10 years ago

ok, I took https://github.com/magento-hackathon/magento-composer-installer/blob/master/tests/FullStackTest/magento-modules/composer_1.json changed the deploy method to "none" and the target directory to "htdocs/".

After running the composer install command the htdocs directory still was empty (besides a generated .gitignore, but thats another bug, but it least shows which would be symlinked/copied)

Can you reproduce this, or is your directory non empty?

The code is at least here: https://github.com/magento-hackathon/magento-composer-installer/blob/master/src/MagentoHackathon/Composer/Magento/Installer.php#L169

If it still does not work for you, could you give me the commit ID of the installer which gets installed?

CNanninga commented 10 years ago

My previous comment was in error. I can verify that deploystrategy:none does work for me if I include master.

The difficulty, of course, is that that requires me to include a dev version instead of the latest stable release. However, I discovered the previous flag that existed for this purpose in 1.3 (skip-package-deployment), so I can use that until the new value makes it to release.