....
  - Installing commerceguys/intl (dev-master d975da2)
    Downloading: 100%         

  - Installing commerceguys/enum (v1.0)
    Downloading: 100%         

  - Installing commerceguys/addressing (dev-master 7bb474f)
    Downloading: 100%         

  - Installing commerceguys/zone (dev-master 1a690b7)
    Downloading: 100%         

commerceguys/addressing suggests installing symfony/form (to generate Symfony address forms)
commerceguys/addressing suggests installing symfony/intl (to use it as the source of country data)
Writing lock file
Generating autoload files
Script Drupal\Core\Composer\Composer::preAutoloadDump handling the pre-autoload-dump event terminated with an exception


                              
  [UnexpectedValueException]  
  Invalid version string ">"  
                              


update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]
  • Composer version 1.0.0-alpha10 2015-04-14 21:18:51
  • PHP 5.6.14
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fizk created an issue. See original summary.

bojanz’s picture

Your error looks like it was introduced by this core issue #2579663: Can't use 'composer install' with missing composer.lock and vendor folder.

But I can't reproduce it on my end. Can you do a "composer self-update" and then retry?

fizk’s picture

Status: Active » Fixed

Thanks, that worked! :)

eiriksm’s picture

Managed to reproduce the issue on your specific version. If you are using "versioned version" of composer, only the latest one (alpha 11) will work. Otherwise a fairly recent dev version should also work.

In other words, to fix your issue, as bojanz suggested, run composer self-update

So the suggested fix is to add this requirement to the README so other people are not running into it. Leaving this open so that it can be closed when the README is updated :)

edit: saw that worked for you, cool!

fizk’s picture

Status: Fixed » Active

Thanks eiriksm :) Yes, I'd also recommend adding it, not only to the README, but also the project page.

eiriksm’s picture

Issue tags: +dcoslo15
themic8’s picture

Comment 1 or 'composer self-update' also fixed the problem for me.

hershey.k’s picture

composer self-update worked for me as well!

Nikolay Borisov’s picture

composer self-update also worked for me! Thanks Bojan!

hass’s picture

I'm getting this on Windows. Latest computer has been installed.

> Drupal\composer_manager\Composer\Command::update
Script Drupal\composer_manager\Composer\Command::update handling the drupal-update event terminated with an exception


  [UnexpectedValueException]
  Could not decode JSON: Syntax error
bojanz’s picture

@hass
Your error sounds unrelated to this issue, can you please open a new one, and paste your root composer.json file? Sounds like it's not generated correctly.

hass’s picture

The root composer.json file is the one that Drupal provides. Aside - composer_manager is crappy and currently broken (gives errors). It is also disabled here for this reason as it crashes my dev site.

bojanz’s picture

@hass
Composer Manager edits the root composer.json, so it might have done something wrong, that's why I asked for the paste.

You've been on drupal.org long enough to know that "crappy and currently broken (gives errors)" provides no way for people to help you.
In any case, composer_manager is optional. You are free to composer require complete modules, which gives you the required libraries as well. http://docs.drupalcommerce.org/v2/install.html has na example of that.

hass’s picture

The init.php has not given any errors. All successful. Errors of this grappy module have only shown in reports.

I checked the json file and there have been some path to composer manager. I can check if i know how it need to look like.

hass’s picture

.

bojanz’s picture

@hass
You keep hijacking an unrelated issue, even though I told you to create a new one. I won't be replying anymore.

hass’s picture

Not really. It is the same issue with the same error when running composer ti install the libs.

fizk’s picture

@hass The error in this issue is:

[UnexpectedValueException]  
  Invalid version string ">" 

but the error in your issue is:

[UnexpectedValueException]
  Could not decode JSON: Syntax error

Those are different error messages. You should open a new issue.

fizk’s picture

Status: Active » Needs review
FileSize
460 bytes

@bojanz Let's add some documentation to the README and close this issue. I've attached a patch.

hass’s picture

Status: Needs review » Needs work

trailing tabs.

hass’s picture

fizk’s picture

Status: Needs work » Needs review
FileSize
456 bytes

Fixed trailing tabs.

hass’s picture

Status: Needs review » Needs work

With #2735977: Rewrite the README, update Composer requirements in mind we need to update the complete readme.

fizk’s picture

Status: Needs work » Needs review

@hass #2735977 is a separate issue and can have it's own commit.

Like bojanz said, please stop hijacking this issue.

hass’s picture

Status: Needs review » Closed (duplicate)
Parent issue: » #2735977: Rewrite the README, update Composer requirements

Integrated your patch

fizk’s picture

Status: Closed (duplicate) » Needs review

@hass I think you're trying to get our attention so we look at #2735977 . If that's your goal, you've achieved it.

Now stop making changes to this issue.

hass’s picture

Status: Needs review » Needs work

I have integrated your patch.

If you'd like to get it reviewed here I will set it to needs work as you have not added the known issues section. Otherwise you could set the other issue RTBC and we are done.

This has nothing to do with attention. This module installation is crappy and if your patch get's committed first I need to change your text again. This is waste of time.

fizk’s picture

Status: Needs work » Needs review
FileSize
555 bytes

Patch update.

You've had enough opportunities to recommend how the patch should be fixed. I won't be updating the patch anymore until bojanz takes a look at this.

If you continue to make changes to this issue, I will undo your changes.

hass’s picture

Status: Needs review » Needs work

Again. The command `composer drupal-update` is INCORRECT!

fizk’s picture

Status: Needs work » Active

So it seems `composer drupal-update` is a command from the Composer Manager module, and not Drupal-core.

Second, according to Composer Manager for Drupal 8:

As of Drupal 8.1, Drupal core directly uses Composer to manage dependencies, which can include Drupal modules. Rather than use Composer Manager, the new recommended workflow for a module with Composer dependencies will be to require the module itself through Composer. For more information, see: Using Composer in a Drupal project, Using Composer to install Drupal packages through Drupal.org.

I believe this means:

1. As of Drupal 8.1, `composer update` is now the proper command.
2. We should not use Composer Manager anymore.

And according to Using Composer in a Drupal project, Drupal.org now has it's own composer repository, which is in Alpha and not ready for production:

https://packages.drupal.org/7
https://packages.drupal.org/8

However, since the Composer Manager module has not been officially closed down, people will continue to use it, thus, continue to use `composer drupal-update`. When they do, they will run into this issue if, as @eiriksm said in #4:

If you are using "versioned version" of composer, only the latest one (alpha 11) will work. Otherwise a fairly recent dev version should also work.

I was using 1.0.0-alpha10 because that was the latest version available in the FreeBSD ports at the time. As of today, the latest package is 1.0.0-alpha11, which should work according to @eiriksm. Also, I've asked the port maintainers to update to 1.1.0, which was committed, and should be available as a package soon.

Where does this leave us?

Since composer 1.0.0-alpha11 was released on November 14, 2015, I doubt many people are still using it. Therefore, we don't need to amend the README.

Alternatively, we could amend the README to mention composer 1.0.0-alpha11+ is required.

Or... we can mention that the new recommended workflow is to use `composer update`, and not to use Composer Manager's `composer drupal-update` command.

hass’s picture

Interresting... but than it still need to be composer update address or composer update drupal/address I think. Only composer update is incorrect as it updates *all* stuff in your installation and than you do not have any longer a stable Drupal core release on your system. That is why I opened #2735977: Rewrite the README, update Composer requirements.

I'm happy to get rid of Composer Manager.

hass’s picture

composer require drupal/address seems to be the right way per https://www.drupal.org/node/2404989

bojanz’s picture

Category: Bug report » Support request
Status: Active » Fixed

Since composer 1.0.0-alpha11 was released on November 14, 2015, I doubt many people are still using it. Therefore, we don't need to amend the README.

Works for me.

I have now officially deprecated composer_manager. Pushing a rewritten Address README.

Status: Fixed » Closed (fixed)

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