How to install drupal 8 with composer now that drupal 9 is the recommended version

Jun
2020
17
I have some projects in drupal 8 that need to test some modules and functionality but i do not want to run the tests on the actual websites. So now that composer create-project downloads the drupal 9 version by default this is the composer create you need to type to install the drupal 8 (8.9.0) version of drupal
composer create-project drupal/recommended-project:8.9.0 d8test
For drush use
composer require drush/drush;
vendor/bin/drush site-install --site-name=d8test
Tags: 
Cats: 
this is an arrow pointing back to the top of the page