I wanted to update my copy of code after #2228345: Add support for drush commands that contain double quotes was committed so I tried:

* composer update
* composer update drupal/drupal-extension

But both times composer said there was nothing to update/install.

I eventually just went to vendor/drupal/drupal-extension/ and did "git fetch origin; git checkout master" and that got me the latest code.

Am I essentially on the "dev" version now? Is there somewhere that you create tagged releases for composer? Is there some way I can specify which version I want in my composer.json file so that I get the current master?

I filed this as a doc issue. I'm happy to help update the README.md to explain what people can do if they want to help.

Comments

jhedstrom’s picture

Status: Active » Fixed

I'm not sure if this is 'the composer way' or not, but I usually just remove the composer.lock file, then re-run composer install if the 'update' option updates too many things.

eliza411’s picture

Assigned: Unassigned » eliza411
Status: Fixed » Needs work

The way composer update works is going to depend on what's in the composer.json.

I'd like to take on sorting this out explicitly and doing rough pass at docs.

eliza411’s picture

I'm not sure I'm fully clear on the goal here, but I tried an upgrade by starting with Version 1 of the Drupal Extension installed with a compser.json like this:

{
  "require": {
    "drupal/drupal-extension": "1.0.*@stable"
  }
}

I changed by composer.json file to point to the master branch as follows:

{
    "repositories": [
        {
            "type": "vcs", 
            "url": "https://github.com/jhedstrom/drupalextension" 
        }
    ],
    "require": {
        "drupal/drupal-extension": "dev-master"
    }
}

(More on VCS and composer at https://getcomposer.org/doc/05-repositories.md#vcs)

composer update pulled master and its related dependencies. Of course, with the switch from 1 to 3 changes the format of the FeatureContext.php file, etc. so if this ticket is about upgrading from 1 to 3, there's more involved to document.

Also, while I'd expect that running compser update would fetch new commits to master, it appears that's not the case: https://github.com/composer/composer/issues/563 You still have to go to vendor/drupal/drupal-extension/ and pull.

eliza411’s picture

Assigned: eliza411 » Unassigned
clemens.tolboom’s picture

Status: Needs work » Closed (outdated)