diff --git a/.sonarcloud.properties b/.sonarcloud.properties new file mode 100644 index 00000000..ea01432f --- /dev/null +++ b/.sonarcloud.properties @@ -0,0 +1 @@ +sonar.exclusions=public/modules/custom/**/tests/** diff --git a/composer.lock b/composer.lock index 76e86520..d5f5a026 100644 --- a/composer.lock +++ b/composer.lock @@ -64,16 +64,16 @@ }, { "name": "caxy/php-htmldiff", - "version": "v0.1.15", + "version": "v0.1.16", "source": { "type": "git", "url": "https://github.com/caxy/php-htmldiff.git", - "reference": "6342b02ddb86fd36093ad7e2db2efc21f01ab7cd" + "reference": "5c580b4f09285c078f0c5cb261573412a736a8cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/caxy/php-htmldiff/zipball/6342b02ddb86fd36093ad7e2db2efc21f01ab7cd", - "reference": "6342b02ddb86fd36093ad7e2db2efc21f01ab7cd", + "url": "https://api.github.com/repos/caxy/php-htmldiff/zipball/5c580b4f09285c078f0c5cb261573412a736a8cb", + "reference": "5c580b4f09285c078f0c5cb261573412a736a8cb", "shasum": "" }, "require": { @@ -119,9 +119,9 @@ ], "support": { "issues": "https://github.com/caxy/php-htmldiff/issues", - "source": "https://github.com/caxy/php-htmldiff/tree/v0.1.15" + "source": "https://github.com/caxy/php-htmldiff/tree/v0.1.16" }, - "time": "2023-11-05T23:49:04+00:00" + "time": "2025-01-22T17:03:45+00:00" }, { "name": "chi-teck/drupal-code-generator", @@ -2901,17 +2901,17 @@ }, { "name": "drupal/editoria11y", - "version": "2.2.0", + "version": "2.2.3", "source": { "type": "git", "url": "https://git.drupalcode.org/project/editoria11y.git", - "reference": "2.2.0" + "reference": "2.2.3" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/editoria11y-2.2.0.zip", - "reference": "2.2.0", - "shasum": "fc06c2b27be7432f4692e37c787fa935e9d4f9f7" + "url": "https://ftp.drupal.org/files/projects/editoria11y-2.2.3.zip", + "reference": "2.2.3", + "shasum": "499ef8ff660d233bf52210100361287bcf16550a" }, "require": { "drupal/core": "^9 || ^10 || ^11" @@ -2922,8 +2922,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.2.0", - "datestamp": "1736189388", + "version": "2.2.3", + "datestamp": "1737039431", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -4073,16 +4073,16 @@ }, { "name": "drupal/hdbt", - "version": "6.8.35", + "version": "6.8.38", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "a4afd522f090c7f91e03d58e82e74956ccfbd1e9" + "reference": "22e839a88d73caa447e7d72875a93b8cfdd0a2bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/a4afd522f090c7f91e03d58e82e74956ccfbd1e9", - "reference": "a4afd522f090c7f91e03d58e82e74956ccfbd1e9", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/22e839a88d73caa447e7d72875a93b8cfdd0a2bf", + "reference": "22e839a88d73caa447e7d72875a93b8cfdd0a2bf", "shasum": "" }, "require": { @@ -4101,10 +4101,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.8.35", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.8.38", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2025-01-15T12:38:48+00:00" + "time": "2025-01-23T09:02:32+00:00" }, { "name": "drupal/hdbt_admin", @@ -4410,16 +4410,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "4.12.4", + "version": "4.12.6", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "8daff630f9fe1a8bd1f7769cc74ac44d3900181a" + "reference": "ce61b97dec94500a918447c5b58d08f69f97292c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/8daff630f9fe1a8bd1f7769cc74ac44d3900181a", - "reference": "8daff630f9fe1a8bd1f7769cc74ac44d3900181a", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/ce61b97dec94500a918447c5b58d08f69f97292c", + "reference": "ce61b97dec94500a918447c5b58d08f69f97292c", "shasum": "" }, "require": { @@ -4543,10 +4543,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.12.4", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.12.6", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2025-01-15T12:35:00+00:00" + "time": "2025-01-22T07:18:12+00:00" }, { "name": "drupal/helfi_proxy", @@ -6162,17 +6162,17 @@ }, { "name": "drupal/redirect", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/redirect.git", - "reference": "8.x-1.10" + "reference": "8.x-1.11" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/redirect-8.x-1.10.zip", - "reference": "8.x-1.10", - "shasum": "9d72d7e0717dbdea3ab3306c5d6840da5bd3024c" + "url": "https://ftp.drupal.org/files/projects/redirect-8.x-1.11.zip", + "reference": "8.x-1.11", + "shasum": "7df8b3524bbde07d254216039636947a689140ef" }, "require": { "drupal/core": "^9.2 || ^10 || ^11" @@ -6180,8 +6180,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.10", - "datestamp": "1723277641", + "version": "8.x-1.11", + "datestamp": "1737382886", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7108,26 +7108,26 @@ }, { "name": "drupal/translatable_menu_link_uri", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/translatable_menu_link_uri.git", - "reference": "2.1.0" + "reference": "2.1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/translatable_menu_link_uri-2.1.0.zip", - "reference": "2.1.0", - "shasum": "3bafa0a19761524560a2d232c945f10643e91053" + "url": "https://ftp.drupal.org/files/projects/translatable_menu_link_uri-2.1.1.zip", + "reference": "2.1.1", + "shasum": "862b0f0317ac37f8849d9f3725bcf44940d98dbf" }, "require": { - "drupal/core": "^8 || ^9 || ^10" + "drupal/core": "^8 || ^9 || ^10 || ^11" }, "type": "drupal-module", "extra": { "drupal": { - "version": "2.1.0", - "datestamp": "1694361965", + "version": "2.1.1", + "datestamp": "1737392436", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -8115,16 +8115,16 @@ }, { "name": "firebase/php-jwt", - "version": "v6.10.2", + "version": "v6.11.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b" + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/30c19ed0f3264cb660ea496895cfb6ef7ee3653b", - "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712", "shasum": "" }, "require": { @@ -8172,9 +8172,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.10.2" + "source": "https://github.com/firebase/php-jwt/tree/v6.11.0" }, - "time": "2024-11-24T11:22:49+00:00" + "time": "2025-01-23T05:11:06+00:00" }, { "name": "galbar/jsonpath", diff --git a/conf/cmi/external_entities.external_entity_type.helfi_news.yml b/conf/cmi/external_entities.external_entity_type.helfi_news.yml index 631df85c..c8bc569a 100644 --- a/conf/cmi/external_entities.external_entity_type.helfi_news.yml +++ b/conf/cmi/external_entities.external_entity_type.helfi_news.yml @@ -8,8 +8,8 @@ id: helfi_news label: 'Helfi: News' label_plural: 'Helfi: News' description: '' -read_only: true generate_aliases: false +read_only: true field_mapper_id: jsonpath field_mapper_config: field_mappings: diff --git a/conf/cmi/external_entities.external_entity_type.helfi_news_groups.yml b/conf/cmi/external_entities.external_entity_type.helfi_news_groups.yml index e952b0b0..9d162e5b 100644 --- a/conf/cmi/external_entities.external_entity_type.helfi_news_groups.yml +++ b/conf/cmi/external_entities.external_entity_type.helfi_news_groups.yml @@ -8,8 +8,8 @@ id: helfi_news_groups label: 'Helfi: News groups' label_plural: 'Helfi: News groups' description: 'Retrieves news groups taxonomy terms from Helfi' -read_only: true generate_aliases: null +read_only: true field_mapper_id: jsonpath field_mapper_config: field_mappings: diff --git a/conf/cmi/external_entities.external_entity_type.helfi_news_neighbourhoods.yml b/conf/cmi/external_entities.external_entity_type.helfi_news_neighbourhoods.yml index 7d5b8ac7..8e98d32f 100644 --- a/conf/cmi/external_entities.external_entity_type.helfi_news_neighbourhoods.yml +++ b/conf/cmi/external_entities.external_entity_type.helfi_news_neighbourhoods.yml @@ -3,13 +3,13 @@ langcode: en status: true dependencies: { } _core: - default_config_hash: 5s8g-adBsUuIIMte5BCEwSFlQjxwFJ_Gq2Do7EEwq2E + default_config_hash: 09-lIa9cl9PNPVIBXCVIR8yBfofPifSwhAsD0QVh8l8 id: helfi_news_neighbourhoods label: 'Helfi: News neighbourhoods' label_plural: 'Helfi: News neighbourhoods' description: 'Retrieves news neighbourhoods taxonomy terms from Helfi' -read_only: true generate_aliases: null +read_only: true field_mapper_id: jsonpath field_mapper_config: field_mappings: @@ -21,6 +21,8 @@ field_mapper_config: value: '$._source.name[0]' tid: value: '$._source.tid[0]' + location: + value: $._source.field_location storage_client_id: helfi_news_neighbourhoods storage_client_config: { } persistent_cache_max_age: 86400 diff --git a/conf/cmi/external_entities.external_entity_type.helfi_news_tags.yml b/conf/cmi/external_entities.external_entity_type.helfi_news_tags.yml index ddcaf3f6..f59c27d1 100644 --- a/conf/cmi/external_entities.external_entity_type.helfi_news_tags.yml +++ b/conf/cmi/external_entities.external_entity_type.helfi_news_tags.yml @@ -8,8 +8,8 @@ id: helfi_news_tags label: 'Helfi: News tags' label_plural: 'Helfi: News tags' description: 'Retrieves news tags taxonomy terms from Helfi' -read_only: true generate_aliases: null +read_only: true field_mapper_id: jsonpath field_mapper_config: field_mappings: diff --git a/tools/make/drupal.mk b/tools/make/drupal.mk index 5af190c1..1c4e59b2 100644 --- a/tools/make/drupal.mk +++ b/tools/make/drupal.mk @@ -4,6 +4,8 @@ DRUPAL_CONF_EXISTS := $(shell test -f conf/cmi/core.extension.yml && echo yes || DRUPAL_CREATE_FOLDERS := /app/public/sites/default/files/private DRUPAL_CREATE_FOLDERS += /app/public/sites/default/files/translations +DRUPAL_PROFILE ?= minimal + PHONY += drupal-create-folders drupal-create-folders: $(call step,Create folders for Drupal...\n) @@ -50,6 +52,12 @@ drush-si: ## Site install $(call step,Do Drush site:install...\n) $(call drush,si ${DRUSH_SI}) +PHONY += drush-helfi-enable-modules +drush-helfi-enable-modules: ## Enable modules and base configurations. + $(call step,Install base configurations...) + $(call drush,cr) + $(call drush,en -y helfi_platform_config helfi_platform_config_base) + PHONY += drush-deploy drush-deploy: ## Run Drush deploy $(call step,Run Drush deploy...\n) @@ -87,13 +95,13 @@ DRUPAL_FRESH_TARGETS := up drupal-create-folders composer-install drush-import-d PHONY += fresh fresh: $(DRUPAL_FRESH_TARGETS) ## Build fresh development environment and sync -DRUPAL_NEW_TARGETS := up drupal-create-folders composer-install drush-si $(DRUPAL_POST_INSTALL_TARGETS) +DRUPAL_NEW_TARGETS := up drupal-create-folders composer-install drush-si drush-helfi-enable-modules drush-cr drush-unblock drush-uli PHONY += new new: $(DRUPAL_NEW_TARGETS) ## Create a new empty Drupal installation from configuration dump.sql: @touch /tmp/kube-config - @docker run --network host --env-file .env -it --rm -v /tmp/kube-config:/root/.kube/config -v $(shell pwd):/app --name helfi-oc ghcr.io/city-of-helsinki/drupal-oc-cli:latest sh -c "db-sync" + @docker run --pull=always --env-file .env -it --rm -v /tmp/kube-config:/root/.kube/config -v $(shell pwd):/app --name helfi-oc ghcr.io/city-of-helsinki/drupal-oc-cli:latest sh -c "db-sync" $(call docker_compose_exec,gunzip dump.sql.gz) PHONY += drush-import-dump diff --git a/tools/make/git.mk b/tools/make/git.mk index c598f4d7..aa22a43e 100644 --- a/tools/make/git.mk +++ b/tools/make/git.mk @@ -1,3 +1,3 @@ PHONY += copy-commit-message-script copy-commit-message-script: - @$(foreach name,$(shell find . -type d -name ".git" -exec dirname {} \; 2> /dev/null ),cp tools/commit-msg $(name)/.git/hooks;) + @$(foreach name,$(shell find . -type d -name ".git" -exec dirname {} \; 2> /dev/null ),cp tools/commit-msg $(name)/.git/hooks && chmod +x $(name)/.git/hooks/commit-msg;)