How can I install a beta version of a module? Now, a good amount of modules do not yet have a stable version, for example, webform. composer require drupal/webform says:


  Could not find package drupal/webform at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability


If I try composer require --minimum-stability=beta drupal/webform, I get:


  The "--minimum-stability" option does not exist.


drush dl gives:


  This codebase is assembled with Composer instead of Drush. Use composer update and composer require instead of drush pm-updatecode and drush pm-download.


Note that due to the special versioning of Drupal this is not a generic composer question but a Drupal specific one. Ie. webform today is 8.x-5.0-beta12, how do I install the latest in the 8.x-5.0 series...? Now, composer doesn't understand or use 8.x-5.0 but uses somethting else, but what and how does that work for betas? This needs documentation somewhere because it currently does not exist. I would be the happiest person if this didn't need an answer, but alas, despite having perfectly fine working tools to build sites, with Drupal 8 we need to use composer and most modules are in beta.
This installs the latest beta-12 for me:

composer require drupal/webform:5.0.*@dev


You need to do a bit of translation from the Drupal version number. From Using Composer to manage Drupal site dependencies:


  Specifying a version you can specify a version from the command line with:

 $ composer require drupal/&lt;modulename&gt;:&lt;version&gt; 

  
  For example:

 $ composer require drupal/ctools:3.0.0-alpha26
 $ composer require drupal/token:1.x-dev 

  
  In these examples, the composer version 3.0.0-alpha26 maps to the drupal.org version 8.x-3.0-alpha26 and 1.x-dev maps to 8.x-1.x branch on drupal.org.
  
  If you specify a branch, such as 1.x you must add -dev to the end of the version.


Hence for Webform, 8.5 becomes 5.0.x, and that's what you need to use to identify the package correctly.