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!

CommentFileSizeAuthor
#7 version-requirement-2887588-7.patch319 bytesgabe-morales
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maxplus created an issue. See original summary.

joelpittet’s picture

Sorry I wish I knew why that would happen in composer. I'll gladly add anything to help you with this.

TynanFox’s picture

Component: Documentation » Code
Category: Support request » Bug report

The 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?

gabe-morales’s picture

While 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.

jkuma’s picture

Hello 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.

jkuma’s picture

Assigned: Unassigned » jkuma
gabe-morales’s picture

Great!

In the meantime, here's the temporary fix proposed by TynanFox.

gabe-morales’s picture

Hmm, 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.

joelpittet’s picture

TynanFox’s picture

Title: Composer requires drupal/inline_conditions ^1.0.1-alpha4 » inline_conditions.info does not list a version, preventing install of Commerce Discount
Version: 7.x-1.0-alpha7 » 7.x-1.0-rc1
Related issues: +#2860678: [Commerce Discount] Composer repository has invalid package information

Okay, 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.

TynanFox’s picture

Status: Active » Fixed

NEVERMIND
Stupid me forgot to actually delete/reinstall Inline Conditions. *eyeroll*
Version information was added appropriately on reinstall.
Sorry. Thanks for working on this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.