Installing module with composer won't work:
Could not load package drupal/campaignmonitor in https://packages.drupal.org/8: [UnexpectedValueException] Could not parse version constraint {version}: Invalid version string "{version}"

reason in composer.json
"campaignmonitor/createsend-php": "{version}"

CommentFileSizeAuthor
#3 error_in_composer_json_file-2887580-3.patch320 bytesznak

Comments

michiellucas created an issue. See original summary.

znak’s picture

Assigned: Unassigned » znak
znak’s picture

Assigned: znak » Unassigned
Status: Active » Needs review
StatusFileSize
new320 bytes

Added patch

  • New Zeal committed 1d1db8c on 8.x-1.x authored by Znak
    Issue #2887580 by Znak: Error in composer.json file
    
NewZeal’s picture

I actually added this patch on June 30 but appear to have gone no further. Now it is pushed to dev. I'll put together a new release with it today.

NewZeal’s picture

Patch added for beta3

NewZeal’s picture

Status: Needs review » Fixed
plopesc’s picture

Status: Fixed » Needs work

Hello,

I'm trying to install this module through composer today and I'm not able to do it.

 $ composer require drupal/campaignmonitor:dev-1.x
./composer.json has been updated
Gathering patches from patch file.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)

Installation failed, reverting ./composer.json to its original content.

                                                                                                                                                     
  [RuntimeException]                                                                                                                                 
  Could not load package drupal/campaignmonitor in https://packages.drupal.org/8: [UnexpectedValueException] Could not parse version constraint {ve  
  rsion}: Invalid version string "{version}"                                                                                                         
                                                                                                                                                     

                                                                                    
  [UnexpectedValueException]                                                        
  Could not parse version constraint {version}: Invalid version string "{version}"  
                                                                                    

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

I'm trying to install both latest dev & beta3 versions with no luck.

Thank you for your efforts in this module.

Regards

  • New Zeal committed ce6c8ef on 8.x-1.x authored by Znak
    Issue #2887580 by Znak: Error in composer.json file
    
NewZeal’s picture

I've reapplied the original patch and pushed to dev. Please test.

jeroendegloire’s picture

I still can't install this module with composer..
I used: composer require drupal/campaignmonitor
composer require drupal/campaignmonitor:1.x
composer require drupal/campaignmonitor:1.x-dev

"drupal/campaignmonitor": "^1.0@beta"

[UnexpectedValueException]
Could not parse version constraint {version}: Invalid version string "{version}"

NewZeal’s picture

It looks like the correction we made to the composer file has not been taken by packagist.

I've posted a ticket in the issue queue.

jeroendegloire’s picture

@new-zeal I see you have made a ticket for drupal 7 version. I have this issue with drupal 8.

NewZeal’s picture

Heh, they don't seem to have a Drupal 8 option in their ticket create form...

NewZeal’s picture

A Drupal engineer has had a go at fixing it. Please try again.

jeroendegloire’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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