Forcing Composer to Install the Latest Dev Version
Now, even though installing Pathauto without specifying a version number installed the dev release, that won't always be the case. I'll install admin_toolbar without specifying a version, and then show you how to specifically install the latest dev.
composer require drupal/admin_toolbar
When that's done, we'll see that the version pattern used is "^1.17", so we'll get the latest release as long as it's greater than or equal to 8.x-1.17. And if we look at the modules page in Drupal, that's exactly what is installed.
We can override that for this package by including "-dev" in the version pattern.
composer require "drupal/admin_toolbar:1.x-dev"
Now, we see that we have version "dev-1.x df14154" installed. The last part of that is the commit hash. If you're familiar with Git, you'll recognize that as a specific commit or version. Using this version pattern, when another commit is made, and we run "composer update" we'll always have the absolute latest code, for better or for worse.