Skip to content

UN-OCHA/response-site

Repository files navigation

Reliefweb Response

Drupal 10

Download and enable https://www.drupal.org/project/flexible_permissions before updating!

Issues

Manual updates

  • composer require 'drupal/dynamic_entity_reference:^3.0' is D10 only
  • group and subgroup needs to be updated to at least 2.x

Testing

Intergration tests using existing site/config.

XDEBUG_MODE=coverage ./vendor/bin/phpunit --testsuite Existing --verbose

Local development

For local development, see the stack repository.

Add this line to settings.local.php: $config['config_split.config_split.config_dev']['status'] = TRUE; to enable config_split and install the development modules.

After importing a fresh database, run drush cim to enable devel, database log and stage_file_proxy.

Add the following to your settings.php to eliminate absolute links to production:

$settings['env_link_fixer_custom_mappings'] = [
  'response-site.docksal.site' => 'response.reliefweb.int',
];

Drupal check

php vendor/bin/drupal-check -ad -e *Widget.php  html/modules/custom/hr_paragraphs/src

Conventional changelog

  • composer run changelog to create changelog
  • composer run release to create new release
  • composer run release:patch to create new release and bump patch version
  • composer run release:minor to create new release and bump minor version
  • composer run release:major to create new release and bump major version

New release

On develop branch run the following

git fetch --all
today=$(date +%d-%m-%Y)
git checkout -b $today-prep-release
composer run release:patch
composer update
git add composer.json
git add CHANGELOG.md
git commit -m "chore: $today prep release"
git push origin $today-prep-release
gh_pr

Commit messages

Full info availabel at https://www.conventionalcommits.org/en/v1.0.0/

Example

fix|feat|BREAKING CHANGE|docs|chore<optional>(scope)</optional>: <short title>

<optional>more information</optional>

Refs: #issue_number
<optional>BREAKING CHANGE: what will be broken by new feature</optional>

.