-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symlink mappings #153
Comments
how does the original modman behave in this case? |
it does map it right to app/code/local/Danslo/ApiImport to code |
Hello, public function getDeployStrategy(PackageInterface $package, $strategy = null)
{
$deployStrategy = new Core($this->getSourceDir($package), $this->getTargetDir());
$deployStrategy->setIgnoredMappings($this->getModuleSpecificDeployIgnores($package));
return $deployStrategy;
} I have changed this code to: public function getDeployStrategy(PackageInterface $package, $strategy = null)
{
$deployStrategy = new Core($this->getSourceDir($package), $this->getTargetDir());
$deployStrategy->setIgnoredMappings($this->getModuleSpecificDeployIgnores($package));
$result = parent::getDeployStrategy($package, $deployStrategy);
return $result;
} and now I can deploy Magento using "symlink" strategy. |
That was the desired behavior. Currently, the Core is also deployed with the normal mappings mechanism. The mappings for the core are on the first directory level of the magento root dir. If you deploy the magento core with symlink strategy and then install a module with symlink strategy, you will end up with nested symlinks which can break the installation. |
Thanks, David. Thanks again. |
yes, because when you symlink the core, there is for example one link from magentoroot/app pointing to vendor/magento/core/app. If you now install a module, the symlink should be pointing from magentoroot/app/code/community/Company/Module to for example vendor/company/module/code since magentoroot/app now points to vendor/magento/core/app, the symlink will be created at vendor/magento/core/app/code/community/Company/Module and it will be linked to ../../../../../vendor/company/module/code. This will be a broken symlink because the directory structure in vendor differs from the directory structure in magento root. I know it's even more difficult if your not that deep into this project ;) But, in short, it will create broken symlinks for magento modules in most cases |
OK, thanks David :) Magento Composer is the great product (y) |
a way to fix this is to deploy everything on file level and don't symlink directories. I'm not sure if @Flyingmana has planned this now for the 3.0 release. I'm currently also trying to achieve that in another Project |
Hey Daniel,
recently I found out that my Installer is not able to map the Danslo Api Import correctly.
bragento/bragento-composer-installer#17
His Mapping in the modman file is:
code app/code/local/Danslo/ApiImport/
The expected behavior for this file defined in the symlink Strategy is:
dir app/etc/ --> link app/etc/dir to dir
So this would be
app/code/local/Danslo/ApiImport/code to code
What apparently is wrong.
But, in the Hackathon Installer it's working. So that leaves 2 options, fix this and make the affected programmers change their mappings, or just change the expected behavior (which might be the much easier way).
I'm not quite sure about this since the expected behavior defined in the symlink strategy seems pretty much orientated at the basic Linux file operations, which seems to be the right way to do this.
The text was updated successfully, but these errors were encountered: