Implement CMS/Core template selection with version support
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3567506. -->
Reported by: [littlepixiez](https://www.drupal.org/user/2568718)
>>>
<h3>Problem/Motivation</h3>
<p>Testers need to choose between Drupal Core and Drupal CMS installations, as different testing scenarios require different base installations. This choice affects composer dependencies, default modules, and available features. Additionally, testers need to specify which Drupal version to test against, as bugs can be version-specific.</p>
<p>The selection mechanism needs to work with minimal configuration whilst maintaining compatibility with both DDEV and DrupalPod workflows, following DrupalPod's established patterns for consistency.</p>
<h3>Proposed resolution</h3>
<p>Implement three environment variables for template, version, and profile selection:</p>
<p><strong>DP_STARTER_TEMPLATE</strong> - Template selection:</p>
<ul>
<li><code>cms</code> → installs <code>drupal/cms</code> package (full CMS distribution)</li>
<li><code>core</code> → installs <code>drupal/recommended-project</code> package (minimal Drupal)</li>
<li>Auto-detects from <code>image_tag_suffix</code> in GitHub Actions (e.g., <code>php-8.3-cms</code> → 'cms')</li>
<li>Defaults to 'cms' if not specified</li>
</ul>
<p><strong>DP_VERSION</strong> - Version selection:</p>
<ul>
<li>Empty/not set → latest stable version</li>
<li>CMS versions: <code>1.x</code>, <code>2.x</code>, or specific like <code>1.2.0</code></li>
<li>Core versions: <code>11.x</code>, <code>10.x</code>, <code>11.2.x</code>, or specific like <code>11.2.8</code></li>
<li>Converted to appropriate composer constraints (e.g., <code>.x</code> → <code>-dev</code>, major versions → <code>^</code>)</li>
</ul>
<p><strong>DP_INSTALL_PROFILE</strong> - Install profile:</p>
<ul>
<li>CMS → empty (auto-detects <code>drupal_cms_installer</code>)</li>
<li>Core → <code>standard</code></li>
<li>Note: No longer support the ability for custom profile selection for core. Could change in the future</li>
</ul>
<h3>Remaining tasks</h3>
<ul>
<li>[x] Add <code>DP_STARTER_TEMPLATE</code> variable support to setup scripts/ddev config</li>
<li>[x] Implement auto-detection from <code>image_tag_suffix</code> in workflows</li>
<li>[x] Implement <code>DP_VERSION</code> with composer constraint logic</li>
<li>[x] Implement <code>DP_INSTALL_PROFILE</code> with auto-detection</li>
<li>[x] Test with both 'core' and 'cms' templates and various version combinations</li>
<li>[x] Test with DDEV (using native PHP config)</li>
<li>[x] Test with DrupalPod/DrupalForge</li>
<li>[x] Document in setup scripts</li>
<li>[x] Remove hardcoded version validation (relies on brittle assumptions)</li>
</ul>
<h3>Testing</h3>
<p><strong>DDEV & DrupalPod/DrupalForge:</strong> All CMS/Core and version combinations tested. Verified correct composer project, module presence, and admin login.</p>
> Related issue: [Issue #3561522](https://www.drupal.org/node/3561522)
> Related issue: [Issue #3568041](https://www.drupal.org/node/3568041)
issue