Hi,
for my Drupal7 project, I'm also using Composer to manage them.
Now I have updated commerce_discount to alpha8 and composer is complaining about inline_conditions:
Problem 1
- drupal/commerce_discount 1.0.0-alpha8 requires drupal/inline_conditions ^1.0.1-alpha4 -> satisfiable by drupal/inline_conditions[1.x-dev].
I think there is some kind of version error because inline_conditions 1.0.1-alpha4 does not exist, only 1.0.0-alpha4 or the current 1.0.0-alpha7
When I try to solve this by:
composer require drupal/inline_conditions:1.x-dev
the problem is not solved...
Can anybody advise what to do?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#7 | version-requirement-2887588-7.patch | 319 bytes | gabe-morales |
Comments
Comment #2
joelpittetSorry I wish I knew why that would happen in composer. I'll gladly add anything to help you with this.
Comment #3
TynanFox CreditAttribution: TynanFox as a volunteer commentedThe problem is with the file inline_conditions.info. The metadata listed does not include a version number at all. Perhaps it needs to be run through the d.o "packaging script" to have the correct data added/updated? Not a developer so I don't really know what that is or means.
But either way, adding the line
version = "7.x-1.0.1-alpha4"
to inline_conditions.info solved the problem with composer, etc. for me.Edit: The underlying problem could be that Commerce Discount lists a dependency of version 1.0.1-alpha4 which does not exist....looks like the issue has already been posted to the Commerce Discount issue queue so this may be able to be closed as a duplicate?
Comment #4
gabe-morales CreditAttribution: gabe-morales commentedWhile changing the dependency issue for Commerce Discount does seem to allow you to download any version of Inline Conditions above 1.0.0-alpha4, adding the version line to the Inline Conditions .info file seems to be a must in order to correctly install the module on Drupal and eliminate error messages when running the update script. Otherwise, Drupal will complain about not having the correct version. A patch for this would be nice.
Comment #5
jkuma CreditAttribution: jkuma as a volunteer commentedHello guys,
The correct version should be added by Drupal.org version system. I can make a patch and add version to .info file but it's really weird that drupal.org doesn't handle that... Let me investigate on that, if I don't find a way to add version automatically by drupal package system, I'll add it manually.
Comment #6
jkuma CreditAttribution: jkuma as a volunteer commentedComment #7
gabe-morales CreditAttribution: gabe-morales commentedGreat!
In the meantime, here's the temporary fix proposed by TynanFox.
Comment #8
gabe-morales CreditAttribution: gabe-morales commentedHmm, tried this again today and it looks like the Drupal.org version system worked correctly when installing an official version of the package rather than from the head at the
7.x-1.x
(dev-1.x
) branch, which composer is forced to install from. So it seems, as TynanFox suggested earlier, the error lies in the version requirements of the Commerce Discount module.Comment #9
joelpittetDon't add version manually:
https://www.drupal.org/docs/7/creating-custom-modules/writing-module-inf...
Comment #10
TynanFox CreditAttribution: TynanFox as a volunteer commentedOkay, so Inline Conditions is now correctly installing via a composer dependency from Commerce Discount (composer dependency fixed in this issue). However once downloaded, Commerce Discount still will not enable because there is no Version listed in the .info file, even though it is the correct version. Composer recognizes it as the right version, but Drupal itself (and subsequently, Drush) do not. This blocks Discount and it's related modules from installing due to version incompatibilities.
So....we've fixed the parent issue. Now this one needs a little bit of love and everything will be working properly.
Note: the patch in #7 DOES fix the issue, but as mentioned in #9, this really should not be necessary as this information should be appended to .info automatically. I'm not experienced enough to even know where to begin investigating that one.
Comment #11
TynanFox CreditAttribution: TynanFox as a volunteer commentedNEVERMIND
Stupid me forgot to actually delete/reinstall Inline Conditions. *eyeroll*
Version information was added appropriately on reinstall.
Sorry. Thanks for working on this.