The following document briefly describes what steps you should take, if you want to make sure an internal Ny Media module is compatible with Drupal 10.
Every module we have SHOULD contain a GitHub workflow configured (e.g. commerce_google_shopping) that fires phpcs, phpstan and unit tests for specified PHP and Drupal core version. The workflow should be up-to-date with the one in this repo https://github.com/nymedia/github-actions-run-test-module. It fires tests against PHP 8.2 and D10 version.
We have a separate workflow - Merge upstream to downstream that ensures us the module's workflow is up-to-date. If you have permissions to run it follow the steps below. In the brackets, there are input values valid for the moment of writing this doc.
- Click "Run workflow" dropdown
- In
upstream-repository
field put the name of the "source" repo containing the workflow config we need to update with (nymedia/github-actions-run-test-module
) - In
upstream-branch
field put the name of the main branch on the upstream-repository (1.x
) - In
downstream-repository
field put the name of the module's repo containing the outdated workflow config (for examplenymedia/commerce_google_shopping
) - In
downstream-branch
field put the name of the main branch on the module's repo from pt. 3. (in case of commerce_google_shipping it would be8.x-2.x
) - Click "Run workflow" button and see if it succeeds. If it does, you should have a PR assigned on the module's repo, looking like this
- NEVER EVER SQUASH THE COMMITS IN THE PR.
Once you have the module with workflow up-to-date, and you see te tests failing, make sure they won't. Most common things to check:
- make sure we're not having any deprecations in code
- make sure in composer.json we don't have a dependency requiring PHP 7.3
- if there's
drush/drush
dependency in composer.json, make sure we use allow also "^11.0 || ^12.0" versions - make sure we allow Drupal ^10 in the .info.yml file