-
Notifications
You must be signed in to change notification settings - Fork 143
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
remove lib/* from modman #68
Comments
I've the same issue with magento-composer-installer. |
@sergis take a look at my repositories: |
@Mkloos or @davidverholen Can you propose a solution that meets the following requirements:
I don't use composer so don't really know the best way to accomplish this. Note, since composer doesn't use submodules I see no harm in keeping the submodules intact for proper modman support. |
the problem is, that the magento composer installer overrides the lib/credis folder with a symlink to an empty folder, because it will not install the submodule (since composer has its own mechanism to require dependencies dynamically, which is way better then using submodules) it should be possible, to use the composer.json map property to make a composer specific mapping, since the magento composer installer from magento-hackathon first looks for this property and only if it is not there it looks for package.xml and finally modman file. Then you could require the credis library in the composer.json. The only Problem left would be, that the credis library could not be loaded, since it would not be deployed to the lib dir. You could solve this, by changing the package type of the credis library to magento-module and add a composer mapping there. Since the magento composer installer class is extended from composers library installer, and there is a fallback to the library installer, it also should not make any difference when the library is installed somewhere, where no magento composer installer is present |
The Credis code is in no way specific to Magento so I'd like to avoid making the composer file depend on magento-composer-installer.. Is there any way to do this? Everyone is always saying that composer is so great at handling dependencies and submodules suck but it seems composer is very limited without the magento-composer-installer... |
it's not composer but magento that makes it so difficult here. Putting the credis library in the core without updating it periodically. Composer is the best thing that could happen to php developers. We use a module for magento that can autoload libraries that are installed by composer. With this module I would just have to delete the credis Library from Magento lib to load the right one (with automatic updates over composer). So it may be possible to keep your modman mapping, so the magento credis library is deleted and then use the hackathon psr0autoloader (for example) to load the credis library over composer. However, I think I will keep using forks to Install this module till magento2 (maybe even you will use composer then? ;) ) |
So can composer be used to map the Credis root to app/code/community/Credis/? This way Magento would use it over the lib/Credis copy. |
yes, but it has to use another installer, since the default installer only creates a copy in the vendor dir. To use another installer you have to change the package type to (for example) magento-module |
I have the same problem with composer and the empty folder in lib/Credis. Could you provide your composer.json how to use the forked fixed version? |
You can add scripts to your main composer.json taking care of submodules:
|
I ended up making a script to sort out the submodule init. If I get bored in the weekend, I might learn how to create a full composer plugin.
EcomDev_PHPUnit also uses submodules. |
Can this finally be fixed? |
@peterjaap Do you have a proposed solution that doesn't break standalone modman installs? I wish it wasn't so hard but with composer using the modman file but only partially supporting modman's functionality there is a catch-22. Modman depends on submodules for dependencies and I don't see any way around that except for perhaps using git subtrees which is also ugly. |
Proposed solution is;
This way, this extension can be used for Magento <1.8 in conjunction with For non-Magento projects, the modman file in |
your right, but the list is not correct ;-)
|
and add a modman script in to this Credis Repository.
so i think it is easier to handle this in projects
The text was updated successfully, but these errors were encountered: