From 9594d9d2f023a4f81f95af83169e11e626cf883b Mon Sep 17 00:00:00 2001 From: actions-bot Date: Tue, 20 Jun 2023 13:47:38 +0000 Subject: [PATCH] Update configuration --- composer.lock | 219 ++++++++++++------ ...ity_form_display.media.hel_map.default.yml | 2 + ...ty_form_display.paragraph.hero.default.yml | 9 +- ...form_display.tpr_unit.tpr_unit.default.yml | 46 +--- ...ity_view_display.media.hel_map.default.yml | 4 +- ...ew_display.media.hel_map.media_library.yml | 4 +- ...e.entity_view_display.media.image.hero.yml | 2 +- ...ty_view_display.paragraph.hero.default.yml | 10 +- ...rvice.tpr_service.teaser_search_result.yml | 2 +- ...view_display.tpr_unit.tpr_unit.default.yml | 4 +- ...ield.media.hel_map.field_media_hel_map.yml | 2 + ...eld.paragraph.hero.field_hero_bg_color.yml | 25 -- ...d.field.paragraph.hero.field_hero_desc.yml | 2 +- ...field.paragraph.hero.field_hero_design.yml | 2 +- ....field.paragraph.hero.field_hero_title.yml | 2 +- ...ield.storage.media.field_media_hel_map.yml | 2 + ....storage.paragraph.field_hero_bg_color.yml | 59 ----- ...ld.storage.paragraph.field_hero_design.yml | 2 +- ...eld.storage.paragraph.field_hero_title.yml | 2 +- ...age.paragraph.field_service_list_title.yml | 2 +- ...aragraph.field_unit_search_meta_button.yml | 2 +- ...paragraph.field_unit_search_meta_label.yml | 2 +- ...graph.field_unit_search_meta_placehold.yml | 2 +- ...rage.paragraph.field_unit_search_title.yml | 2 +- ...ity_view_display.media.hel_map.default.yml | 2 +- ...ew_display.media.hel_map.media_library.yml | 2 +- ...view_display.tpr_unit.tpr_unit.default.yml | 2 +- ...eld.paragraph.hero.field_hero_bg_color.yml | 2 - ....storage.paragraph.field_hero_bg_color.yml | 20 -- ...ity_view_display.media.hel_map.default.yml | 2 +- ...ew_display.media.hel_map.media_library.yml | 2 +- ...view_display.tpr_unit.tpr_unit.default.yml | 2 +- ...eld.paragraph.hero.field_hero_bg_color.yml | 1 - conf/cmi/media.type.hel_map.yml | 2 + docker/openshift/entrypoints/20-deploy.sh | 12 +- docker/openshift/notify.php | 111 ++------- 36 files changed, 212 insertions(+), 358 deletions(-) delete mode 100644 conf/cmi/field.field.paragraph.hero.field_hero_bg_color.yml delete mode 100644 conf/cmi/field.storage.paragraph.field_hero_bg_color.yml delete mode 100644 conf/cmi/language/fi/field.field.paragraph.hero.field_hero_bg_color.yml delete mode 100644 conf/cmi/language/fi/field.storage.paragraph.field_hero_bg_color.yml delete mode 100644 conf/cmi/language/sv/field.field.paragraph.hero.field_hero_bg_color.yml diff --git a/composer.lock b/composer.lock index 0ecfc605e..0f851152b 100644 --- a/composer.lock +++ b/composer.lock @@ -1727,26 +1727,26 @@ }, { "name": "drupal/allowed_formats", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/allowed_formats.git", - "reference": "8.x-1.5" + "reference": "2.0.0" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/allowed_formats-8.x-1.5.zip", - "reference": "8.x-1.5", - "shasum": "dbf61bee7aec87beaa2cf307c1d0d9d5b896328c" + "url": "https://ftp.drupal.org/files/projects/allowed_formats-2.0.0.zip", + "reference": "2.0.0", + "shasum": "ac6c6d398f303608ced7e9cd9d4556a728dc41f0" }, "require": { - "drupal/core": "^8.8 || ^9" + "drupal/core": "^9.2 || ^10" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.5", - "datestamp": "1648060331", + "version": "2.0.0", + "datestamp": "1669170410", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3645,21 +3645,23 @@ }, { "name": "drupal/focal_point", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/focal_point.git", - "reference": "8.x-1.5" + "reference": "2.0.0" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/focal_point-8.x-1.5.zip", - "reference": "8.x-1.5", - "shasum": "41198e9220788c3b7d3146b10e5dfd6c73cd4784" + "url": "https://ftp.drupal.org/files/projects/focal_point-2.0.0.zip", + "reference": "2.0.0", + "shasum": "ff677594c632b4b87aaace39a90a8cdf48ec3ed4" }, "require": { - "drupal/core": "^8.8 || ^9", - "drupal/crop": "^1.0 || ^2.0" + "drupal/core": "^9.3 || ^10", + "drupal/crop": "^2.3", + "drupal/jquery_ui": "^1.6", + "drupal/jquery_ui_draggable": "^2.0" }, "require-dev": { "drupal/crop": "*" @@ -3667,8 +3669,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.5", - "datestamp": "1598663903", + "version": "2.0.0", + "datestamp": "1681277837", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3923,16 +3925,16 @@ }, { "name": "drupal/hdbt", - "version": "5.4.2", + "version": "5.4.3", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "48fcb57bbf2ec1d228af3ac56726b5a34d51357a" + "reference": "dda94063c64543f180833d635f8ad7f3e1c6c65c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/48fcb57bbf2ec1d228af3ac56726b5a34d51357a", - "reference": "48fcb57bbf2ec1d228af3ac56726b5a34d51357a", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/dda94063c64543f180833d635f8ad7f3e1c6c65c", + "reference": "dda94063c64543f180833d635f8ad7f3e1c6c65c", "shasum": "" }, "require": { @@ -3950,10 +3952,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.4.2", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/5.4.3", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2023-06-14T13:47:10+00:00" + "time": "2023-06-20T07:37:38+00:00" }, { "name": "drupal/hdbt_admin", @@ -4042,16 +4044,16 @@ }, { "name": "drupal/helfi_api_base", - "version": "2.4.13", + "version": "2.4.14", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base.git", - "reference": "a241d09008b27242533e76d47ee7ea5fa864730a" + "reference": "af41c0842e5a990c258069d10f143eea8e25c604" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/a241d09008b27242533e76d47ee7ea5fa864730a", - "reference": "a241d09008b27242533e76d47ee7ea5fa864730a", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-module-helfi-api-base/zipball/af41c0842e5a990c258069d10f143eea8e25c604", + "reference": "af41c0842e5a990c258069d10f143eea8e25c604", "shasum": "" }, "require": { @@ -4077,10 +4079,10 @@ ], "description": "Helfi - API Base", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.4.13", + "source": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/tree/2.4.14", "issues": "https://github.com/City-of-Helsinki/drupal-module-helfi-api-base/issues" }, - "time": "2023-06-06T02:07:42+00:00" + "time": "2023-06-15T05:52:34+00:00" }, { "name": "drupal/helfi_azure_fs", @@ -4176,21 +4178,21 @@ }, { "name": "drupal/helfi_platform_config", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "0874287b25c8cb2689370123360d6371585f6460" + "reference": "135fb82dd2a27295974f525771455791f11cd15d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/0874287b25c8cb2689370123360d6371585f6460", - "reference": "0874287b25c8cb2689370123360d6371585f6460", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/135fb82dd2a27295974f525771455791f11cd15d", + "reference": "135fb82dd2a27295974f525771455791f11cd15d", "shasum": "" }, "require": { "drupal/admin_toolbar": "^3.0", - "drupal/allowed_formats": "^1.3", + "drupal/allowed_formats": "^2.0", "drupal/config_ignore": "^2.3", "drupal/config_rewrite": "^1.4", "drupal/content_lock": "^2.2", @@ -4205,7 +4207,7 @@ "drupal/eu_cookie_compliance": "^1.24", "drupal/external_entities": "^2.0@alpha", "drupal/field_group": "^3.1", - "drupal/focal_point": "^1.5", + "drupal/focal_point": "^2.0", "drupal/gin_toolbar": "^1.0", "drupal/helfi_api_base": "*", "drupal/helfi_tpr": "*", @@ -4228,8 +4230,8 @@ "drupal/search_api": "^1.0", "drupal/select2": "^1.12", "drupal/simple_sitemap": "^4.1", - "drupal/siteimprove": "^1.11", - "drupal/social_media": "^1.8", + "drupal/siteimprove": "^2.0", + "drupal/social_media": "^2.0", "drupal/token": "^1.9", "drupal/translatable_menu_link_uri": "^2.0", "drupal/view_unpublished": "^1.0", @@ -4285,10 +4287,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.1.0", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/3.1.1", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2023-06-08T13:24:01+00:00" + "time": "2023-06-20T11:34:34+00:00" }, { "name": "drupal/helfi_proxy", @@ -4608,26 +4610,26 @@ }, { "name": "drupal/jquery_ui", - "version": "1.4.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/jquery_ui.git", - "reference": "8.x-1.4" + "reference": "8.x-1.6" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/jquery_ui-8.x-1.4.zip", - "reference": "8.x-1.4", - "shasum": "64c19ecc8902e2b4b1ab0cc5f5fe28dbc83bfebe" + "url": "https://ftp.drupal.org/files/projects/jquery_ui-8.x-1.6.zip", + "reference": "8.x-1.6", + "shasum": "0ddccdcf35a066de1843e1d9670677ee1a2faac0" }, "require": { - "drupal/core": "^8 || ^9" + "drupal/core": "^9.2 || ^10" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.4", - "datestamp": "1582149957", + "version": "8.x-1.6", + "datestamp": "1668521197", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -4640,8 +4642,8 @@ ], "authors": [ { - "name": "RobLoach", - "homepage": "https://www.drupal.org/user/61114" + "name": "bnjmnm", + "homepage": "https://www.drupal.org/user/2369194" }, { "name": "jjeff", @@ -4667,6 +4669,18 @@ "name": "mikelutz", "homepage": "https://www.drupal.org/user/2972409" }, + { + "name": "nod_", + "homepage": "https://www.drupal.org/user/598310" + }, + { + "name": "phenaproxima", + "homepage": "https://www.drupal.org/user/205645" + }, + { + "name": "RobLoach", + "homepage": "https://www.drupal.org/user/61114" + }, { "name": "sun", "homepage": "https://www.drupal.org/user/54136" @@ -4675,6 +4689,10 @@ "name": "webchick", "homepage": "https://www.drupal.org/user/24967" }, + { + "name": "Wim Leers", + "homepage": "https://www.drupal.org/user/99777" + }, { "name": "zrpnr", "homepage": "https://www.drupal.org/user/1448368" @@ -4749,6 +4767,59 @@ "issues": "https://www.drupal.org/project/issues/jquery_ui_datepicker" } }, + { + "name": "drupal/jquery_ui_draggable", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/jquery_ui_draggable.git", + "reference": "2.0.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/jquery_ui_draggable-2.0.0.zip", + "reference": "2.0.0", + "shasum": "13a8f4bf037449cd176ddb967fc9cba9a466a705" + }, + "require": { + "drupal/core": "^9.2 || ^10", + "drupal/jquery_ui": "^1.6" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.0", + "datestamp": "1670871516", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "bnjmnm", + "homepage": "https://www.drupal.org/user/2369194" + }, + { + "name": "lauriii", + "homepage": "https://www.drupal.org/user/1078742" + }, + { + "name": "zrpnr", + "homepage": "https://www.drupal.org/user/1448368" + } + ], + "description": "Provides jQuery UI Draggable library.", + "homepage": "https://www.drupal.org/project/jquery_ui_draggable", + "support": { + "source": "https://git.drupalcode.org/project/jquery_ui_draggable" + } + }, { "name": "drupal/jquery_ui_slider", "version": "1.1.0", @@ -6175,20 +6246,20 @@ }, { "name": "drupal/siteimprove", - "version": "1.12.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/siteimprove.git", - "reference": "8.x-1.12" + "reference": "2.0.0" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/siteimprove-8.x-1.12.zip", - "reference": "8.x-1.12", - "shasum": "1df830298b36cff3201c1aaf0cc1cdec2741a3e9" + "url": "https://ftp.drupal.org/files/projects/siteimprove-2.0.0.zip", + "reference": "2.0.0", + "shasum": "b79c37852d835d97c502615aded96a9855e9f493" }, "require": { - "drupal/core": "^8 || ^9" + "drupal/core": "^9.2 || ^10" }, "require-dev": { "drupal/domain_access": "*" @@ -6196,8 +6267,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.12", - "datestamp": "1646062571", + "version": "2.0.0", + "datestamp": "1671009593", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6250,30 +6321,30 @@ }, { "name": "drupal/social_media", - "version": "1.9.0-rc2", + "version": "2.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/social_media.git", - "reference": "8.x-1.9-rc2" + "reference": "2.0.0" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/social_media-8.x-1.9-rc2.zip", - "reference": "8.x-1.9-rc2", - "shasum": "0ff14957d0b47288c425e5008ac036c16952105d" + "url": "https://ftp.drupal.org/files/projects/social_media-2.0.0.zip", + "reference": "2.0.0", + "shasum": "e4bf23d3de898af949c20a2742c980ee7674d55c" }, "require": { - "drupal/core": "^8.8 || ^9", - "drupal/token": "*" + "drupal/core": "^9 || ^10", + "drupal/token": "^1.0" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.9-rc2", - "datestamp": "1603094978", + "version": "2.0.0", + "datestamp": "1683754691", "security-coverage": { - "status": "not-covered", - "message": "RC releases are not covered by Drupal security advisories." + "status": "covered", + "message": "Covered by Drupal's security advisory policy" } } }, @@ -7545,16 +7616,16 @@ }, { "name": "firebase/php-jwt", - "version": "v6.6.0", + "version": "v6.7.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa" + "reference": "71278f20b0a623389beefe87a641d03948a38870" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/5a9cf79b4a2eb347230384648cc7b0d68cd97faa", - "reference": "5a9cf79b4a2eb347230384648cc7b0d68cd97faa", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/71278f20b0a623389beefe87a641d03948a38870", + "reference": "71278f20b0a623389beefe87a641d03948a38870", "shasum": "" }, "require": { @@ -7602,9 +7673,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.6.0" + "source": "https://github.com/firebase/php-jwt/tree/v6.7.0" }, - "time": "2023-06-13T17:11:06+00:00" + "time": "2023-06-14T15:29:26+00:00" }, { "name": "galbar/jsonpath", diff --git a/conf/cmi/core.entity_form_display.media.hel_map.default.yml b/conf/cmi/core.entity_form_display.media.hel_map.default.yml index ab414a32a..693665784 100644 --- a/conf/cmi/core.entity_form_display.media.hel_map.default.yml +++ b/conf/cmi/core.entity_form_display.media.hel_map.default.yml @@ -8,6 +8,8 @@ dependencies: module: - link - path +_core: + default_config_hash: KoYrc83rhkQSoax9OsIA2u9cRG8e0ZLi1pMQc_S_3Ew id: media.hel_map.default targetEntityType: media bundle: hel_map diff --git a/conf/cmi/core.entity_form_display.paragraph.hero.default.yml b/conf/cmi/core.entity_form_display.paragraph.hero.default.yml index b401835eb..a887c0dee 100644 --- a/conf/cmi/core.entity_form_display.paragraph.hero.default.yml +++ b/conf/cmi/core.entity_form_display.paragraph.hero.default.yml @@ -3,7 +3,6 @@ langcode: en status: true dependencies: config: - - field.field.paragraph.hero.field_hero_bg_color - field.field.paragraph.hero.field_hero_desc - field.field.paragraph.hero.field_hero_design - field.field.paragraph.hero.field_hero_image @@ -16,18 +15,12 @@ dependencies: - media_library - text _core: - default_config_hash: GRujaYo6zwdQ1uTSTDW_tCviosJuWK9RLD9QRmd9iPs + default_config_hash: CvDiqRtujItZjhiR7KUf0a9dQrlgEcmuDDhJHmzUNOw id: paragraph.hero.default targetEntityType: paragraph bundle: hero mode: default content: - field_hero_bg_color: - type: options_select - weight: 1 - region: content - settings: { } - third_party_settings: { } field_hero_desc: type: text_textarea weight: 3 diff --git a/conf/cmi/core.entity_form_display.tpr_unit.tpr_unit.default.yml b/conf/cmi/core.entity_form_display.tpr_unit.tpr_unit.default.yml index 75b4e7eb8..95ae3190f 100644 --- a/conf/cmi/core.entity_form_display.tpr_unit.tpr_unit.default.yml +++ b/conf/cmi/core.entity_form_display.tpr_unit.tpr_unit.default.yml @@ -5,6 +5,7 @@ dependencies: config: - field.field.tpr_unit.tpr_unit.field_categories - field.field.tpr_unit.tpr_unit.field_content + - field.field.tpr_unit.tpr_unit.field_districts - field.field.tpr_unit.tpr_unit.field_hs_front_page - field.field.tpr_unit.tpr_unit.field_lower_content - field.field.tpr_unit.tpr_unit.field_metatags @@ -18,9 +19,8 @@ dependencies: - paragraphs - path - readonly_field_widget - - select2 _core: - default_config_hash: g-ZdiLH0rHr8Mv6vni5A3v5v2UQGRdwiwPxs88WA93E + default_config_hash: cotjiL17Qafj5pirtPax237aflvFs_-3pKHSP6wblrg id: tpr_unit.tpr_unit.default targetEntityType: tpr_unit bundle: tpr_unit @@ -106,16 +106,6 @@ content: formatter_settings: { } show_description: false third_party_settings: { } - field_categories: - type: readonly_field_widget - weight: 39 - region: content - settings: - label: above - formatter_type: null - formatter_settings: { } - show_description: false - third_party_settings: { } field_content: type: paragraphs weight: 27 @@ -135,16 +125,6 @@ content: collapse_edit_all: collapse_edit_all duplicate: duplicate third_party_settings: { } - field_hs_front_page: - type: entity_reference_autocomplete - weight: 29 - region: content - settings: - match_operator: CONTAINS - match_limit: 10 - size: 60 - placeholder: '' - third_party_settings: { } field_lower_content: type: paragraphs weight: 28 @@ -171,16 +151,6 @@ content: settings: sidebar: false third_party_settings: { } - field_study_field: - type: select2_entity_reference - weight: 31 - region: content - settings: - width: 100% - autocomplete: false - match_operator: CONTAINS - match_limit: 10 - third_party_settings: { } field_unit_type: type: entity_reference_autocomplete weight: 28 @@ -191,13 +161,6 @@ content: size: 60 placeholder: '' third_party_settings: { } - hide_description: - type: boolean_checkbox - weight: 16 - region: content - settings: - display_label: true - third_party_settings: { } hide_sidebar_navigation: type: boolean_checkbox weight: 29 @@ -352,5 +315,10 @@ content: third_party_settings: { } hidden: created: true + field_categories: true field_districts: true + field_hs_front_page: true + field_study_field: true + hide_description: true ontologyword_ids: true + show_www: true diff --git a/conf/cmi/core.entity_view_display.media.hel_map.default.yml b/conf/cmi/core.entity_view_display.media.hel_map.default.yml index 8a5206869..9b5cb2c66 100644 --- a/conf/cmi/core.entity_view_display.media.hel_map.default.yml +++ b/conf/cmi/core.entity_view_display.media.hel_map.default.yml @@ -8,7 +8,7 @@ dependencies: module: - helfi_media_map _core: - default_config_hash: xWSewtEWch8WXKgsaRmJi4JxBLjRP0B3hD1JoodX99E + default_config_hash: '-iLfHSAepabVQ6yYeAq_cioOuO-5JsvriQSQENHZG80' id: media.hel_map.default targetEntityType: media bundle: hel_map @@ -18,7 +18,7 @@ content: type: hel_media_map label: hidden settings: - link_title: 'Open map in new window' + link_title: 'Open larger map' third_party_settings: { } weight: 0 region: content diff --git a/conf/cmi/core.entity_view_display.media.hel_map.media_library.yml b/conf/cmi/core.entity_view_display.media.hel_map.media_library.yml index 2b8cb3f18..36bfe895f 100644 --- a/conf/cmi/core.entity_view_display.media.hel_map.media_library.yml +++ b/conf/cmi/core.entity_view_display.media.hel_map.media_library.yml @@ -9,7 +9,7 @@ dependencies: module: - helfi_media_map _core: - default_config_hash: PPY8kAB9w6Y50NI58k4CEZzyHD3iZAJo6jtujL8VG0Y + default_config_hash: BgAdizvooLPfK6uIUYu3Z-02W-SFkGxNpNOwqhF_Kuw id: media.hel_map.media_library targetEntityType: media bundle: hel_map @@ -19,7 +19,7 @@ content: type: hel_media_map label: hidden settings: - link_title: 'Open map in new window' + link_title: 'Open larger map' third_party_settings: { } weight: 0 region: content diff --git a/conf/cmi/core.entity_view_display.media.image.hero.yml b/conf/cmi/core.entity_view_display.media.image.hero.yml index b7a2b9007..891252863 100644 --- a/conf/cmi/core.entity_view_display.media.image.hero.yml +++ b/conf/cmi/core.entity_view_display.media.image.hero.yml @@ -11,7 +11,7 @@ dependencies: module: - responsive_image _core: - default_config_hash: yOUJJysrNA6OZUaL8EmXsFBPwpyOzsnC0fsXT9QGHU4 + default_config_hash: UX2CrJYBdnGTpSaqiYid65d46ihnZEmWEBJbdXJZQ7g id: media.image.hero targetEntityType: media bundle: image diff --git a/conf/cmi/core.entity_view_display.paragraph.hero.default.yml b/conf/cmi/core.entity_view_display.paragraph.hero.default.yml index 7fc790172..c269d60eb 100644 --- a/conf/cmi/core.entity_view_display.paragraph.hero.default.yml +++ b/conf/cmi/core.entity_view_display.paragraph.hero.default.yml @@ -3,7 +3,6 @@ langcode: en status: true dependencies: config: - - field.field.paragraph.hero.field_hero_bg_color - field.field.paragraph.hero.field_hero_desc - field.field.paragraph.hero.field_hero_design - field.field.paragraph.hero.field_hero_image @@ -16,19 +15,12 @@ dependencies: - options - text _core: - default_config_hash: 1S-v2cW15vF64vx-PC3OHbjsxRvtChTWcgepFJ_tKAw + default_config_hash: _cEmb8iIMHW_kmY2nlzrMR-ur24Tc0k7N4FGGAvT03k id: paragraph.hero.default targetEntityType: paragraph bundle: hero mode: default content: - field_hero_bg_color: - type: list_key - label: inline - settings: { } - third_party_settings: { } - weight: 5 - region: content field_hero_desc: type: text_default label: hidden diff --git a/conf/cmi/core.entity_view_display.tpr_service.tpr_service.teaser_search_result.yml b/conf/cmi/core.entity_view_display.tpr_service.tpr_service.teaser_search_result.yml index 026dda5fb..3f1c3d44a 100644 --- a/conf/cmi/core.entity_view_display.tpr_service.tpr_service.teaser_search_result.yml +++ b/conf/cmi/core.entity_view_display.tpr_service.tpr_service.teaser_search_result.yml @@ -12,7 +12,7 @@ dependencies: - helfi_tpr - text _core: - default_config_hash: ujJDnxXZHiN-DByQZHw7_ftiBEHe7NVqg8JElL2XkCw + default_config_hash: xB11NuB4PFanx7E4ETdV0gOTv4_GPPPt-Ix-sw4MKHU id: tpr_service.tpr_service.teaser_search_result targetEntityType: tpr_service bundle: tpr_service diff --git a/conf/cmi/core.entity_view_display.tpr_unit.tpr_unit.default.yml b/conf/cmi/core.entity_view_display.tpr_unit.tpr_unit.default.yml index 49b22ed26..f38455986 100644 --- a/conf/cmi/core.entity_view_display.tpr_unit.tpr_unit.default.yml +++ b/conf/cmi/core.entity_view_display.tpr_unit.tpr_unit.default.yml @@ -23,7 +23,7 @@ dependencies: - telephone - text _core: - default_config_hash: Zg1dRaAcdqWrYdUQPfrE3NjtAFm507U4rg_8LPIPhWA + default_config_hash: eEYHiODeZDTb8z0FJIhd8OeomGNTM2nh51IdmVBQBqc id: tpr_unit.tpr_unit.default targetEntityType: tpr_unit bundle: tpr_unit @@ -195,7 +195,7 @@ content: label: hidden settings: iframe_title: 'Location on map' - link_title: 'Open the map in a new window' + link_title: 'Open larger map' target: true third_party_settings: { } weight: 10 diff --git a/conf/cmi/field.field.media.hel_map.field_media_hel_map.yml b/conf/cmi/field.field.media.hel_map.field_media_hel_map.yml index 25bcc7d9d..cb7f613e8 100644 --- a/conf/cmi/field.field.media.hel_map.field_media_hel_map.yml +++ b/conf/cmi/field.field.media.hel_map.field_media_hel_map.yml @@ -7,6 +7,8 @@ dependencies: - media.type.hel_map module: - link +_core: + default_config_hash: 6R3OIKGnfzbjAT3CeaZRYfjCcaVYoYtLEJY2R4nFSFc id: media.hel_map.field_media_hel_map field_name: field_media_hel_map entity_type: media diff --git a/conf/cmi/field.field.paragraph.hero.field_hero_bg_color.yml b/conf/cmi/field.field.paragraph.hero.field_hero_bg_color.yml deleted file mode 100644 index 9bbdf687a..000000000 --- a/conf/cmi/field.field.paragraph.hero.field_hero_bg_color.yml +++ /dev/null @@ -1,25 +0,0 @@ -uuid: 83f0b191-7eaf-4d94-b5db-97a2655c2e95 -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_hero_bg_color - - paragraphs.paragraphs_type.hero - module: - - options -_core: - default_config_hash: oBcxkQvh42-sDZQOEHuml4LAI9GzDoFVzO7bmbnyVAA -id: paragraph.hero.field_hero_bg_color -field_name: field_hero_bg_color -entity_type: paragraph -bundle: hero -label: 'Background color' -description: 'Choose the background color for the hero element.' -required: true -translatable: false -default_value: - - - value: coat-of-arms -default_value_callback: '' -settings: { } -field_type: list_string diff --git a/conf/cmi/field.field.paragraph.hero.field_hero_desc.yml b/conf/cmi/field.field.paragraph.hero.field_hero_desc.yml index 27d42a465..2052b7162 100644 --- a/conf/cmi/field.field.paragraph.hero.field_hero_desc.yml +++ b/conf/cmi/field.field.paragraph.hero.field_hero_desc.yml @@ -12,7 +12,7 @@ third_party_settings: allowed_formats: allowed_formats: { } _core: - default_config_hash: GnZymgGfpVTqsKATa5zkIXdscsZxW3ZkKMGmL9mDy8g + default_config_hash: 8R816KbWZKNUvPgCHKY1nRR0RRNTUOhsmU9s2eQCy-c id: paragraph.hero.field_hero_desc field_name: field_hero_desc entity_type: paragraph diff --git a/conf/cmi/field.field.paragraph.hero.field_hero_design.yml b/conf/cmi/field.field.paragraph.hero.field_hero_design.yml index 0b270f4df..e591ffaef 100644 --- a/conf/cmi/field.field.paragraph.hero.field_hero_design.yml +++ b/conf/cmi/field.field.paragraph.hero.field_hero_design.yml @@ -8,7 +8,7 @@ dependencies: module: - options _core: - default_config_hash: 9KgNBd64HSwUebcuo0heXEkb24dttr05fyWT52PJfQ0 + default_config_hash: W-Ej7hRIIq05fIx6kriSo9ZN35ZSYAOtMiV44HiPeU4 id: paragraph.hero.field_hero_design field_name: field_hero_design entity_type: paragraph diff --git a/conf/cmi/field.field.paragraph.hero.field_hero_title.yml b/conf/cmi/field.field.paragraph.hero.field_hero_title.yml index f3a50fea2..b4ec42c0a 100644 --- a/conf/cmi/field.field.paragraph.hero.field_hero_title.yml +++ b/conf/cmi/field.field.paragraph.hero.field_hero_title.yml @@ -6,7 +6,7 @@ dependencies: - field.storage.paragraph.field_hero_title - paragraphs.paragraphs_type.hero _core: - default_config_hash: n_OKgQXffc54WxA_XpM58sFr43glNXiQ1Gjz8HunLkM + default_config_hash: gLYsdoK3O4wy9qSBAGlg7miDZAR9oTVXI5jviVKVdqg id: paragraph.hero.field_hero_title field_name: field_hero_title entity_type: paragraph diff --git a/conf/cmi/field.storage.media.field_media_hel_map.yml b/conf/cmi/field.storage.media.field_media_hel_map.yml index ea01e9d79..3fd94f6f9 100644 --- a/conf/cmi/field.storage.media.field_media_hel_map.yml +++ b/conf/cmi/field.storage.media.field_media_hel_map.yml @@ -5,6 +5,8 @@ dependencies: module: - link - media +_core: + default_config_hash: vbleWrj8_V2DjBoBU1oIT_J4TlbrChZzdZOC5glJ54U id: media.field_media_hel_map field_name: field_media_hel_map entity_type: media diff --git a/conf/cmi/field.storage.paragraph.field_hero_bg_color.yml b/conf/cmi/field.storage.paragraph.field_hero_bg_color.yml deleted file mode 100644 index c5d06e72a..000000000 --- a/conf/cmi/field.storage.paragraph.field_hero_bg_color.yml +++ /dev/null @@ -1,59 +0,0 @@ -uuid: e5f4ec85-636f-4bcc-a5ab-f18899467942 -langcode: en -status: true -dependencies: - module: - - options - - paragraphs -_core: - default_config_hash: Adu4C-qILnLCzUa1yRwVCZXjCTWSfExYigCvp7txvG8 -id: paragraph.field_hero_bg_color -field_name: field_hero_bg_color -entity_type: paragraph -type: list_string -settings: - allowed_values: - - - value: coat-of-arms - label: 'Coat of Arms' - - - value: gold - label: Gold - - - value: silver - label: Silver - - - value: brick - label: Brick - - - value: bus - label: Bus - - - value: copper - label: Copper - - - value: engel - label: Engel - - - value: fog - label: Fog - - - value: metro - label: Metro - - - value: summer - label: Summer - - - value: suomenlinna - label: Suomenlinna - - - value: tram - label: Tram - allowed_values_function: '' -module: options -locked: false -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/conf/cmi/field.storage.paragraph.field_hero_design.yml b/conf/cmi/field.storage.paragraph.field_hero_design.yml index c7c7a152f..1c35aa72e 100644 --- a/conf/cmi/field.storage.paragraph.field_hero_design.yml +++ b/conf/cmi/field.storage.paragraph.field_hero_design.yml @@ -6,7 +6,7 @@ dependencies: - options - paragraphs _core: - default_config_hash: qGel2F-fciDzT6Jjy6u0MvZv_ZPV24Q6-q0d42YrxHU + default_config_hash: zZ661kERU722BOWyFdnw3UIzhMePsDzfGXd2TsHAJYc id: paragraph.field_hero_design field_name: field_hero_design entity_type: paragraph diff --git a/conf/cmi/field.storage.paragraph.field_hero_title.yml b/conf/cmi/field.storage.paragraph.field_hero_title.yml index 53907c785..aa47b0751 100644 --- a/conf/cmi/field.storage.paragraph.field_hero_title.yml +++ b/conf/cmi/field.storage.paragraph.field_hero_title.yml @@ -5,7 +5,7 @@ dependencies: module: - paragraphs _core: - default_config_hash: 4dkWCsjvwPFaOtq0ZOyMTT_u2H-miJw3OgMJLl5B_0o + default_config_hash: edfOZRMXbJgAffK9uTaxNuYiN8j9EuG6m-f6CLyYr74 id: paragraph.field_hero_title field_name: field_hero_title entity_type: paragraph diff --git a/conf/cmi/field.storage.paragraph.field_service_list_title.yml b/conf/cmi/field.storage.paragraph.field_service_list_title.yml index 61b45e4f9..47e65f5d7 100644 --- a/conf/cmi/field.storage.paragraph.field_service_list_title.yml +++ b/conf/cmi/field.storage.paragraph.field_service_list_title.yml @@ -5,7 +5,7 @@ dependencies: module: - paragraphs _core: - default_config_hash: '-U-fI1ZKNYIqf3MamunZcYDd_NUf_Phse4D_HdHaSwo' + default_config_hash: YXATV-Cdy2vbtOv6vCpESoo5N8vWgLQpxAZq-RYSGqM id: paragraph.field_service_list_title field_name: field_service_list_title entity_type: paragraph diff --git a/conf/cmi/field.storage.paragraph.field_unit_search_meta_button.yml b/conf/cmi/field.storage.paragraph.field_unit_search_meta_button.yml index df925f5e7..6e4bbbe1f 100644 --- a/conf/cmi/field.storage.paragraph.field_unit_search_meta_button.yml +++ b/conf/cmi/field.storage.paragraph.field_unit_search_meta_button.yml @@ -5,7 +5,7 @@ dependencies: module: - paragraphs _core: - default_config_hash: ihSFCZoZDPamttizr8eq_1_5wDmio8Or0ztqUiaJb3Q + default_config_hash: sHCa_HaR8e4XzaoaxyVmg2ctETPztjDnkT2x4BaCFsI id: paragraph.field_unit_search_meta_button field_name: field_unit_search_meta_button entity_type: paragraph diff --git a/conf/cmi/field.storage.paragraph.field_unit_search_meta_label.yml b/conf/cmi/field.storage.paragraph.field_unit_search_meta_label.yml index 75767c17e..e36bb6336 100644 --- a/conf/cmi/field.storage.paragraph.field_unit_search_meta_label.yml +++ b/conf/cmi/field.storage.paragraph.field_unit_search_meta_label.yml @@ -5,7 +5,7 @@ dependencies: module: - paragraphs _core: - default_config_hash: FBD7g8VZvWYrVhE7_FkloTI3zba8p0YKP9Ny4XrqAOE + default_config_hash: 9ZOaGuu40EJ_NsKwc9hfC5Bk0ICJB-izcewGpRBacbQ id: paragraph.field_unit_search_meta_label field_name: field_unit_search_meta_label entity_type: paragraph diff --git a/conf/cmi/field.storage.paragraph.field_unit_search_meta_placehold.yml b/conf/cmi/field.storage.paragraph.field_unit_search_meta_placehold.yml index 3bc7f59b8..224e0c927 100644 --- a/conf/cmi/field.storage.paragraph.field_unit_search_meta_placehold.yml +++ b/conf/cmi/field.storage.paragraph.field_unit_search_meta_placehold.yml @@ -5,7 +5,7 @@ dependencies: module: - paragraphs _core: - default_config_hash: 5HVsRwA4Apd0OJY0q5ZnF-VDN2gcM8bXyKOMfvBTbUg + default_config_hash: PnYL62styPa1cdIZ0tKa9_ISK89mVySuWCnWcnMN9Hk id: paragraph.field_unit_search_meta_placehold field_name: field_unit_search_meta_placehold entity_type: paragraph diff --git a/conf/cmi/field.storage.paragraph.field_unit_search_title.yml b/conf/cmi/field.storage.paragraph.field_unit_search_title.yml index 0bf052f0d..0d02ed2ef 100644 --- a/conf/cmi/field.storage.paragraph.field_unit_search_title.yml +++ b/conf/cmi/field.storage.paragraph.field_unit_search_title.yml @@ -5,7 +5,7 @@ dependencies: module: - paragraphs _core: - default_config_hash: J-GWO5EBcq_881yD1jMX3zsrR14hw97BvBqi6h5kknE + default_config_hash: eW5p1ZD6tVtX4g1sOMn82P5Ax14Y5YhWvwwa8N3XKSg id: paragraph.field_unit_search_title field_name: field_unit_search_title entity_type: paragraph diff --git a/conf/cmi/language/fi/core.entity_view_display.media.hel_map.default.yml b/conf/cmi/language/fi/core.entity_view_display.media.hel_map.default.yml index 351e7ed1b..b47e23a80 100644 --- a/conf/cmi/language/fi/core.entity_view_display.media.hel_map.default.yml +++ b/conf/cmi/language/fi/core.entity_view_display.media.hel_map.default.yml @@ -1,4 +1,4 @@ content: field_media_hel_map: settings: - link_title: 'Avaa kartta uuteen ikkunaan' + link_title: 'Avaa kartta suurempana' diff --git a/conf/cmi/language/fi/core.entity_view_display.media.hel_map.media_library.yml b/conf/cmi/language/fi/core.entity_view_display.media.hel_map.media_library.yml index 351e7ed1b..b47e23a80 100644 --- a/conf/cmi/language/fi/core.entity_view_display.media.hel_map.media_library.yml +++ b/conf/cmi/language/fi/core.entity_view_display.media.hel_map.media_library.yml @@ -1,4 +1,4 @@ content: field_media_hel_map: settings: - link_title: 'Avaa kartta uuteen ikkunaan' + link_title: 'Avaa kartta suurempana' diff --git a/conf/cmi/language/fi/core.entity_view_display.tpr_unit.tpr_unit.default.yml b/conf/cmi/language/fi/core.entity_view_display.tpr_unit.tpr_unit.default.yml index e718bed23..ef15eed34 100644 --- a/conf/cmi/language/fi/core.entity_view_display.tpr_unit.tpr_unit.default.yml +++ b/conf/cmi/language/fi/core.entity_view_display.tpr_unit.tpr_unit.default.yml @@ -2,4 +2,4 @@ content: service_map_embed: settings: iframe_title: 'Sijainti kartalla' - link_title: 'Avaa kartta uuteen ikkunaan' + link_title: 'Avaa kartta suurempana' diff --git a/conf/cmi/language/fi/field.field.paragraph.hero.field_hero_bg_color.yml b/conf/cmi/language/fi/field.field.paragraph.hero.field_hero_bg_color.yml deleted file mode 100644 index d8fd1f106..000000000 --- a/conf/cmi/language/fi/field.field.paragraph.hero.field_hero_bg_color.yml +++ /dev/null @@ -1,2 +0,0 @@ -label: Taustaväri -description: 'Valitse lohkolle taustaväri.' diff --git a/conf/cmi/language/fi/field.storage.paragraph.field_hero_bg_color.yml b/conf/cmi/language/fi/field.storage.paragraph.field_hero_bg_color.yml deleted file mode 100644 index 28e8686b9..000000000 --- a/conf/cmi/language/fi/field.storage.paragraph.field_hero_bg_color.yml +++ /dev/null @@ -1,20 +0,0 @@ -settings: - allowed_values: - 0: - label: Vaakuna - 1: - label: Kulta - 2: - label: Hopea - 3: - label: Tiili - 4: - label: Bussi - 5: - label: Kupari - 7: - label: Sumu - 9: - label: Kesä - 11: - label: Spåra diff --git a/conf/cmi/language/sv/core.entity_view_display.media.hel_map.default.yml b/conf/cmi/language/sv/core.entity_view_display.media.hel_map.default.yml index abe5d00b6..4af599400 100644 --- a/conf/cmi/language/sv/core.entity_view_display.media.hel_map.default.yml +++ b/conf/cmi/language/sv/core.entity_view_display.media.hel_map.default.yml @@ -1,4 +1,4 @@ content: field_media_hel_map: settings: - link_title: 'Öppna kartan i nytt fönster' + link_title: 'Öppna kartan i större format' diff --git a/conf/cmi/language/sv/core.entity_view_display.media.hel_map.media_library.yml b/conf/cmi/language/sv/core.entity_view_display.media.hel_map.media_library.yml index abe5d00b6..4af599400 100644 --- a/conf/cmi/language/sv/core.entity_view_display.media.hel_map.media_library.yml +++ b/conf/cmi/language/sv/core.entity_view_display.media.hel_map.media_library.yml @@ -1,4 +1,4 @@ content: field_media_hel_map: settings: - link_title: 'Öppna kartan i nytt fönster' + link_title: 'Öppna kartan i större format' diff --git a/conf/cmi/language/sv/core.entity_view_display.tpr_unit.tpr_unit.default.yml b/conf/cmi/language/sv/core.entity_view_display.tpr_unit.tpr_unit.default.yml index d3b91e5d5..a45be1ad3 100644 --- a/conf/cmi/language/sv/core.entity_view_display.tpr_unit.tpr_unit.default.yml +++ b/conf/cmi/language/sv/core.entity_view_display.tpr_unit.tpr_unit.default.yml @@ -2,4 +2,4 @@ content: service_map_embed: settings: iframe_title: 'Plats på kartan' - link_title: 'Öppna kartan i nytt fönster' + link_title: 'Öppna kartan i större format' diff --git a/conf/cmi/language/sv/field.field.paragraph.hero.field_hero_bg_color.yml b/conf/cmi/language/sv/field.field.paragraph.hero.field_hero_bg_color.yml deleted file mode 100644 index c8659e96e..000000000 --- a/conf/cmi/language/sv/field.field.paragraph.hero.field_hero_bg_color.yml +++ /dev/null @@ -1 +0,0 @@ -label: Bakgrundsfärg diff --git a/conf/cmi/media.type.hel_map.yml b/conf/cmi/media.type.hel_map.yml index ed83d97ba..132fdd2a3 100644 --- a/conf/cmi/media.type.hel_map.yml +++ b/conf/cmi/media.type.hel_map.yml @@ -4,6 +4,8 @@ status: true dependencies: module: - helfi_media_map +_core: + default_config_hash: vci0wVeb2hEACGUrti9YuoaMLG5rf64W2aw1B0WAaLs id: hel_map label: 'Map (kartta.hel.fi, palvelukartta.hel.fi)' description: null diff --git a/docker/openshift/entrypoints/20-deploy.sh b/docker/openshift/entrypoints/20-deploy.sh index b4863fb4e..c40512651 100644 --- a/docker/openshift/entrypoints/20-deploy.sh +++ b/docker/openshift/entrypoints/20-deploy.sh @@ -2,19 +2,9 @@ cd /var/www/html/public -# Sends the given message to a Slack channel. -function send_notification { - php ../docker/openshift/notify.php ${1} ${2} || true -} - -function output_message { - echo ${1} - send_notification ${1} -} - function output_error_message { echo ${1} - send_notification ${1} true + php ../docker/openshift/notify.php "${1}" || true } # Make sure we have active Drupal configuration. diff --git a/docker/openshift/notify.php b/docker/openshift/notify.php index d00beac72..f32864bee 100644 --- a/docker/openshift/notify.php +++ b/docker/openshift/notify.php @@ -2,7 +2,7 @@ /** * @file - * A php script to send messages to a configured Slack channel. + * A php script to send alerts from CLI tasks to Sentry. * * This script is called from 'docker/openshift/entrypoints/20-deploy.sh'. * @@ -11,12 +11,10 @@ * In order for this to work, you must define the following environment * variables: * - * - SLACK_CHANNEL_ID - * You can find this value by right-clicking the channel name and selecting - * Copy -> Copy link. The last part of the link should be the channel ID. - * - * - SLACK_AUTHORIZATION - * The authorization token for your Slack application. + * - SENTRY_DSN + * The DSN address to Sentry, something like 'https://xxxx@xxx.hel.fi/xxx'. + * - SENTRY_ENVIRONMENT + * The environment name. * * Usage: * @@ -24,104 +22,47 @@ * * An additional metadata gathered from configured environment variables will * be appended to all messages, such as APP_ENV, OPENSHIFT_BUILD_ID etc. - * - * You can pass an optional boolean argument to this script to highlight - * everyone active in that channel. For example - * - * php notify.php "your message" true - * - * This will, in addition to everything else, notify everyone active in that - * channel. Like `@here your message`. */ declare(strict_types = 1); -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; +use Sentry\ClientInterface; +use Sentry\State\Scope; +use function Sentry\configureScope; +use function Sentry\init; include_once __DIR__ . '/../../vendor/autoload.php'; -/** - * A client to interact with Slack API. - */ -final class SlackApiClient { - - /** - * The HTTP client. - * - * @var \GuzzleHttp\ClientInterface - */ - private ClientInterface $client; - - /** - * Constructs a new instance. - * - * @param string $authorization - * The bearer authorization token. - * @param string $channel - * The channel id. - */ - public function __construct( - private string $authorization, - private string $channel, - ) { - $this->client = new Client(['base_uri' => 'https://slack.com/api/']); - } - - /** - * Sends a Slack message. - * - * @param string $message - * The message to send. - */ - public function send(string $message) : void { - $response = $this->client->request('POST', 'chat.postMessage', [ - 'json' => [ - 'channel' => $this->channel, - 'text' => $message, - 'unfurl_links' => FALSE, - 'unfurl_media' => FALSE , - ], - 'headers' => [ - 'Authorization' => 'Bearer ' . $this->authorization, - ], - ]); - $content = json_decode($response->getBody()->getContents()); - - if (empty($content->ok) || $content->ok !== TRUE) { - $message = $content->error; - - if (isset($content->response_metadata->messages)) { - $message = implode(',', $content->response_metadata->messages); - } - - throw new InvalidArgumentException($message); - } - } +if (!interface_exists(ClientInterface::class)) { + throw new LogicException('Missing "sentry/sdk" dependency.'); +} +class DeploymentException extends \Exception { } $config = [ - 'SLACK_CHANNEL_ID' => NULL, - 'SLACK_AUTHORIZATION' => NULL, + 'SENTRY_DSN' => NULL, + 'SENTRY_ENVIRONMENT' => NULL, ]; foreach ($config as $key => $item) { if (!$value = getenv($key)) { - throw new \InvalidArgumentException(sprintf('Missing required "%s" environment variable.', $key)); + throw new InvalidArgumentException(sprintf('Missing required "%s" environment variable.', $key)); } $config[$key] = getenv($key); } +init(); + if (!isset($argv[1])) { - throw new \InvalidArgumentException('Usage: php slack.php "your message"'); + throw new InvalidArgumentException('Usage: php notify.php "your message"'); } $metadata = [ 'APP_ENV' => 'Environment', 'OPENSHIFT_BUILD_NAMESPACE' => 'Namespace', 'OPENSHIFT_BUILD_NAME' => 'Build name', - 'OPENSHIFT_BUILD_SOURCE' => 'Project' + 'OPENSHIFT_BUILD_SOURCE' => 'Project', ]; $extra = []; @@ -129,12 +70,10 @@ public function send(string $message) : void { if (!$value = getenv($key)) { continue; } - $extra[] = sprintf(">*%s*: %s", $label, $value); + $extra[$label] = $value; } -$client = new SlackApiClient($config['SLACK_AUTHORIZATION'], $config['SLACK_CHANNEL_ID']); -$client->send(vsprintf("%s%s\n\n*Project metadata*: \n\n%s", [ - isset($argv[2]) ? ' ' : '', - $argv[1], - implode("\n", $extra), -])); +if (!empty($extra)) { + configureScope(fn (Scope $scope) => $scope->setContext('meta', $extra)); +} +throw new \DeploymentException($argv[1]);