I am experimenting with Bootstrap 3 in Drupal 8 and I want to stay on the dev branch of bootstrap.

In my composer.json, I wrote the following line based on Drupal Packagist:

"drupal/bootstrap": "8.3.*@dev",

However, when I run composer update, it downloads 8.3.0-beta2 (2015-Dec-19) instead of the latest dev release (2016-Feb-20).

Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/bootstrap (8.3.0-beta2)
    Downloading: 100%
    Downloading: 100%

To make sure it wasn't some caching issue, I ran:

composer selfupdate
composer clear-cache
composer update

But it did the same thing-- install beta2.

How do I force it to download the dev release instead?

2 Answers 2


While it will install the latest dev release of the Drupal module/theme to simply do the following:

composer require drupal/bootstrap:3.x-dev

I would argue a best practice when installing a dev version of a module is to make sure you are going to get the commit you want (which might not be the latest), so I would do the following:

composer require drupal/bootstrap:3.x-dev#5670922dea05fffb6506a6cd5d53546b9fae8df9

Or you can manually add it to your require in composer.json (as below) and then on the command line run composer install

"drupal/bootstrap": "3.x-dev#5670922dea05fffb6506a6cd5d53546b9fae8df9",

To get the commit you should go to http://cgit.drupalcode.org/bootstrap/log/ and find the commit you want (the commit hash is the id on the commit's page). btw: the above hash is not a real commit on the Bootstrap project


You can keep the original prefer-stable settings. The @dev in 8.3.*@dev is the stability flag for the given package. The easiest way to force a dev-version of a package is to use a different version constraint. Use 8.3.x-dev instead, this version constraint references to a the 8.x-3.x branch and works independently from prefer-stable and minimum-stability.

  • 10
    A composer require command that goes with this would look something like this composer require "drupal/page_manager:1.x-dev"
    – daniels
    Commented Mar 7, 2017 at 22:09
  • 1
    @daniels – You don't need the quotes.
    – leymannx
    Commented Jul 10, 2020 at 16:31
  • So the -dev of the branch is like @dev? Is there a rule for that like git branch + suffix? I've seen it as a prefix or suffix (interchangeably) but I don't see a rule dev-4.x or 4.x-dev or 4.x@dev all of the above?
    – wranvaud
    Commented Jul 18, 2022 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.