Update PHPUnit jobs to new driver when D11 "current" is W3C-compliant
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3514999. -->
Reported by: [jonathan1055](https://www.drupal.org/user/92645)
Related to !340
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>This is a follow-up to <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3475581" title="Status: Closed (fixed)">#3475581: Update Nightwatch jobs to new driver when D11 "current" uses Nightwatch 3</a></span> for making the similar changes to the PHPUnit jobs.</p>
<p>The changes here relate to the variable <code>MINK_DRIVER_ARGS_WEBDRIVER</code></p>
<p><code>.test-variables</code> has the definitions for the two variables <a href="https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.main.yml#L46-47">MINK_DRIVER_ARGS_WEBDRIVER and MINK_DRIVER_ARGS_WEBDRIVER_LEGACY</a></p>
<p>Currently, in the committed repo, the phpunit 'current' job has an override to use the legacy value <code>MINK_DRIVER_ARGS_WEBDRIVER: $MINK_DRIVER_ARGS_WEBDRIVER_LEGACY</code> so all the variants would use this value, as they all extend from 'phpunit' (not '.phpunit-base').</p>
<p>However, the two 'next' variants contain</p>
<pre>MINK_DRIVER_ARGS_WEBDRIVER:<br> !reference [.test-variables, variables, MINK_DRIVER_ARGS_WEBDRIVER]</pre><p>
meaning that they use the new value not the legacy one.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>The new w3c driver should now be used for the 'current' and 'max PHP' variants as these run Drupal 11.1. Only the 'previous minor' 11.0 and 'previous major' 10.4 need to use the legacy value.</p>
<p>Specifying the values within the job variant is not entirely reliable, as the core version could be customised. It also leaves future work to be done when 'previous minor' becomes 11.1. So the proposal is to use the actual Drupal Core version being tested to determine whether to use the new or legacy value.</p>
<p>This will be done in the Composer job, creating a new derived variable <code>INSTALLED_DRUPAL_VERSION</code> which will be avilable for use in all subsequent jobs. </p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
> Related issue: [Issue #3475581](https://www.drupal.org/node/3475581)
> Related issue: [Issue #2829040](https://www.drupal.org/node/2829040)
issue