How to Install Contributed D8 Module in D9 Using Composer?
Now that Drupal 8 (D8) support is over (link to the article), there are a lot of contributed D8 modules with patches in queue to make them work with Drupal 9 (D9) version. But there is a problem. You can’t
composer require the module until you patch it and you can’t patch it before it is downloaded by Composer.
To solve this, Drupal. org has a lenient Composer endpoint that publishes all modules as D9 compatible whether it is or not. By using the lenient Composer endpoint you can
composer require the module then use
cweagans/composer-patches to apply the needed patch.