Allow all sub-modules to be compatible with next_major
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3414505. -->
Reported by: [jonathan1055](https://www.drupal.org/user/92645)
Related to !240
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The work in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3396106" title="Status: Closed (fixed)">#3396106: Allow modules to opt in to testing against Drupal 11 even before they support it</a></span> allows a contrib module to opt in to testing at the <strong>Next Major</strong> core level, even before it declares compatibility. This is done by modifying the modue's own .info.yml file</p>
<p><code>grep -q "\^11" *.info.yml || (grep -q "\^10" *.info.yml && sed -i "s/\^10/\^10 \|\| ^11/" *.info.yml)</code></p>
<p>If the module has dependencies they need to be allowed to appear compatible by adding the names to </p>
<pre>composer (next major):<br> variables:<br> LENIENT_ALLOW_LIST: devel,devel_generate,commerce,entity,address</pre><p>This allows the corresponding Composer job to run sucessfully, which in turn allows PHPStan to run. </p>
<p>However, all the PHPunit jobs will fail because the required dependency modules cannot be installed. Every test gives, for example:</p>
<pre>1) Drupal\Tests\scheduler\Functional\SchedulerEventsTest::testNodeEvents<br>Unable to install modules: module 'commerce_product' is incompatible with this version of Drupal core.</pre><p>
So phpunit testing with Next Major does not run and gives no helpful information at all. </p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p><del>It would be possible to use the $LENIENT_ALLOW_LIST list of modules, and make a similar change to each of those .info.yml files, so that they can be installed and phpunits run.<br>
</del><br>
Extend the exitsing grep+sed to cover all sub-modules within the project.<br>
There is no need to change test modules that have <code>package: Testing</code>.<br>
Also no changes to third-party dependency modules.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Discuss if this this is worth it, before I start on any work. </p>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
> Related issue: [Issue #3230209](https://www.drupal.org/node/3230209)
> Related issue: [Issue #3096609](https://www.drupal.org/node/3096609)
> Related issue: [Issue #3387322](https://www.drupal.org/node/3387322)
issue