-
Notifications
You must be signed in to change notification settings - Fork 142
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
composer vs. git submodules issue #65
Comments
I'm not a composer expert but credis itself is a composer module so perhaps it can be added as a dependency in the composer file? Feel free to open a PR. :) On February 24, 2014 8:04:36 PM EST, Cyrill Schumacher [email protected] wrote:
Sent from my Android phone with K-9 Mail. Please excuse my brevity. |
Yes you can add Credis as a composer required package ... but then you need to hack the Magento AutoLoader to load form the vendor folder. So my only solution which comes into my mind is remove the .gitmodules file and add Credis files directly. (which I have already done in my fork :-) ). I have no idea if this is in your philosophy :-) |
Copying files into multiple repos is definitely not my philosophy.. It seems lack of support for git submodules is a glaring omission that shouldn't be too hard to fix in composer. Save for that I would probably favor using subtree merge. I'm not entirely opposed to using subtree merge in this repo and in Cm_RedisSession, but I think that is an ugly hack for a shortcoming of composer. |
A composer dev states: "the lack of submodule support is by design." But it is still a hack and not everybody is aware of this work around. |
I saw that after my comment. I disagree that they should not be supported, especially when there is a workaround that can be injected into the composer file so easily, so which is messier? lol Would you mind trying the "scripts" method and submitting a PR if it works well?
|
Thanks for the explanation. Seems like there is no great solution since composer guys won't support submodules, so I'll just happily continue using modman. :) |
Modman is a great tool. Kudos! 👍 |
I've just run our build process and the submodules confuses and broke the process ... so I removed everything and created my own fork of Cm_Cache_Backend_Redis and replaced the submodule. |
I've setup large projects (up to 23 repositories) with it in different environments (multi-node clusters, development, staging, etc).. I'd be curious to know specifically what shortcoming it has to make you say otherwise? Here is a good method that lets you pull in the files into your repo while still being able to easily track upstream changes: http://stackoverflow.com/a/8396318/187780 |
Wow Thanks for that! I will have a look and play around with it :-) |
"post-update-cmd" do not git pull the lib/Credis if using the installer "Cotya/magento-composer-installer |
I am not familiar with composer enough to determine what is the best way for this issue to be resolved and don't have time to setup test environments and play around with it. It seems it would make sense for Cm_Cache_Backend_Redis to have a composer dependency on Credis, but I have yet to see a PR that solves the issue without breaking the original install method of using modman. I would love to merge a PR that does this though. |
There was some good discussion over on #70 but it never was resolved, in case you hadn't seen that PR already. |
hey,
composer does not support submodules as your modman app therefore the Credis lib folder will stay empty.
Any other solution except forking and copying the Credis class into the lib folder?
Also adding the Credis module to a projects root composer.json is not an option...
Thanks!
The text was updated successfully, but these errors were encountered: