Closed andrey-bublik closed 9 years ago
:+1: Time to time have same issue!
can you try it with
"extra": {
"magento-root-dir": "magento/",
"magento-deploystrategy": "copy",
"magento-force": "override"
}
i did not look into the code yet, but that's basically what the exception says
@davidverholen according to FAQ and documentation - magento-force is the boolean option. Anyway, it doesn't work neither with "magento-force": "override", nor with "magento-force": true.
can't reproduce this on linux with php 5.6.4 (same composer build)
seems like isForced() for some reason returns false here:
ok it's a bug in the core Installer. The isForced property is not passed to the deployStrategy in the Core Installer.
The weird thing is, that there should not be any file that is overwritten by the core installer, since we don't change magento core files, or do we? ;P
I tried the following:
"extra": {
"magento-root-dir": "magento/",
"magento-deploystrategy": "copy",
"magento-force": true,
"magento-deploystrategy-overwrite": {
"magento/core": "none"
},
"magento-deploy-ignore": {
"magento/core": ["*.*"]
}
}
It also doesn't work, exception is the same:
Generating autoload files
start magento core deploy via deployManager
start magento deploy for magento/core
[ErrorException]
Target app/design/adminhtml/default/default/template/rating/options.phtml already exists (set extra.magento-force to override)
So, I'm really confused with this situation. Some explanation: I have git repository with my project, "vendor" dir added to .gitignore. Every time when I do git clone && composer install (to obtain vendor dir again with packages version from lockfile, and do composer update after install), I see the exception above, because in fact - there are files in magento root directory, and magento-installer tries to copy them again, totally ignoring magento-deploy-ignore, magento-deploystrategy-overwrite and magento-force.
you could also just remove magento/core from your composer.json.
The Installer does not consider that there are already magento core files in the root dir. Surely it would be a good idea to fix this so that the magento-force property also works with the magento core installer, but this problem also should not exist in an organized project.
You should either have the core in the git repository (which in my opinion is the worse solution) or install it with composer. It looks like your trying to do both, which causes the Problem, that there are already files where they should not be.
app/design/adminhtml/default/default/template/rating/options.phtml
fix already got merged, so issue closed :)
:+1:
I got the following exception doing composer install:
Here is a part of my composer.json
I have magento-force in composer.json, but seems it doesn't work. Packages version:
Any suggestions? Thanks in advance.