I would like to know how to specify a patch inside a module's composer file.
The scenario is like this:
On my Drupal 9 site, I want to run the command composer require module. The module composer file, has dependencies and 2 modules specified there, are not yet ported to Drupal 9 but there have been patches created (not sure if the modules will be ported soon since they kind of seem a bit abandoned).
What I did, I modified the composer file of the module I want to install to look like this:
But, the patches do not apply so when I run the command composer require module I get told that google_analytics_reports is not D9 compatible. I am 100% sure that the patch I am trying to apply makes it compatible. Not sure what I've been missing. If I apply the patch in the Drupal's composer, it works, but I want a standalone module.
If it helps, the error is just the generic one: module requires drupal/google_analytics_reports 3.0.0-beta3 -> satisfiable by drupal/google_analytics_reports[3.0.0-beta3]. (which requires D8 and so on)