From 94da66d1d74ba78c39e19b2b607e9b4c98290545 Mon Sep 17 00:00:00 2001 From: Xiao Hu Tai Date: Thu, 26 Oct 2023 14:20:29 +0200 Subject: [PATCH 1/4] Add YAML Migrations --- config/bolt/config.yaml | 4 ++-- yaml-migrations/m_2023-10-26-config.yaml | 13 +++++++++++++ yaml-migrations/m_2023-10-26-config2.yaml | 9 +++++++++ yaml-migrations/m_2023-10-26-services_bolt.yaml | 10 ++++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 yaml-migrations/m_2023-10-26-config.yaml create mode 100644 yaml-migrations/m_2023-10-26-config2.yaml create mode 100644 yaml-migrations/m_2023-10-26-services_bolt.yaml diff --git a/config/bolt/config.yaml b/config/bolt/config.yaml index bbe187332..ffe19e6d3 100644 --- a/config/bolt/config.yaml +++ b/config/bolt/config.yaml @@ -30,7 +30,7 @@ caching: backend_menu: ~ files_index: ~ list_format: false # Run `bin/console cache:list-format; bin/console bolt:update-list-format` to clear and rebuild these - + # The theme to use. # # Dont edit the provided templates directly, because they _will_ get updated @@ -65,7 +65,7 @@ headers: # canonical, so its clear which is the primary address of the site. # # If you include `https://`, it will be included in the canonical urls. -canonical: https://example.org +#canonical: https://example.org # If you want to override the canonical template, from the theme: #canonical_template: 'partials/_canonical.html.twig' diff --git a/yaml-migrations/m_2023-10-26-config.yaml b/yaml-migrations/m_2023-10-26-config.yaml new file mode 100644 index 000000000..764ff91d1 --- /dev/null +++ b/yaml-migrations/m_2023-10-26-config.yaml @@ -0,0 +1,13 @@ +# Add/Overwrite new configuration options +# See: https://github.com/bolt/core/commit/7f1347a21d99c06dae157204ebadd4cbabf94b55 +# See: https://github.com/bolt/core/commit/2c0f4b18c576927a28f0db6c73732d2dc63b6d65 +# See: https://github.com/bolt/core/commit/9aebe9c472e94a0eed64eb4643f82c7057d614b4 + +file: bolt/config.yaml +since: 5.2.0 + +add: + caching: + list_format: false + maximum_listing_select: 50000 + ajaxy_saving: false diff --git a/yaml-migrations/m_2023-10-26-config2.yaml b/yaml-migrations/m_2023-10-26-config2.yaml new file mode 100644 index 000000000..b18ed1c2b --- /dev/null +++ b/yaml-migrations/m_2023-10-26-config2.yaml @@ -0,0 +1,9 @@ +# Remove `allow_upscale` +# See: https://github.com/bolt/core/pull/3383 + +file: bolt/config.yaml +since: 5.2.0 + +remove: + thumbnails: + allow_upscale: ~ diff --git a/yaml-migrations/m_2023-10-26-services_bolt.yaml b/yaml-migrations/m_2023-10-26-services_bolt.yaml new file mode 100644 index 000000000..a86d007b6 --- /dev/null +++ b/yaml-migrations/m_2023-10-26-services_bolt.yaml @@ -0,0 +1,10 @@ +# Add `bind` +# See: https://github.com/bolt/core/commit/a5ffe5df95cac71faa76a95eca1a7720c40532ed + +file: services_bolt.yaml +since: 5.2.0 + +add: + services: + _defaults: + bind: { } From 9e1105ab17e4525f97910859941d0f479b150b0b Mon Sep 17 00:00:00 2001 From: Xiao Hu Tai Date: Fri, 27 Oct 2023 16:17:43 +0200 Subject: [PATCH 2/4] Remove `config.yaml` migrations as it will destroy comments and more --- yaml-migrations/m_2023-10-26-config.yaml | 13 ------------- yaml-migrations/m_2023-10-26-config2.yaml | 9 --------- 2 files changed, 22 deletions(-) delete mode 100644 yaml-migrations/m_2023-10-26-config.yaml delete mode 100644 yaml-migrations/m_2023-10-26-config2.yaml diff --git a/yaml-migrations/m_2023-10-26-config.yaml b/yaml-migrations/m_2023-10-26-config.yaml deleted file mode 100644 index 764ff91d1..000000000 --- a/yaml-migrations/m_2023-10-26-config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Add/Overwrite new configuration options -# See: https://github.com/bolt/core/commit/7f1347a21d99c06dae157204ebadd4cbabf94b55 -# See: https://github.com/bolt/core/commit/2c0f4b18c576927a28f0db6c73732d2dc63b6d65 -# See: https://github.com/bolt/core/commit/9aebe9c472e94a0eed64eb4643f82c7057d614b4 - -file: bolt/config.yaml -since: 5.2.0 - -add: - caching: - list_format: false - maximum_listing_select: 50000 - ajaxy_saving: false diff --git a/yaml-migrations/m_2023-10-26-config2.yaml b/yaml-migrations/m_2023-10-26-config2.yaml deleted file mode 100644 index b18ed1c2b..000000000 --- a/yaml-migrations/m_2023-10-26-config2.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Remove `allow_upscale` -# See: https://github.com/bolt/core/pull/3383 - -file: bolt/config.yaml -since: 5.2.0 - -remove: - thumbnails: - allow_upscale: ~ From 4bb1394a2767bb5472fc762f640191c5c6ccc0a8 Mon Sep 17 00:00:00 2001 From: Xiao Hu Tai Date: Mon, 30 Oct 2023 12:23:02 +0100 Subject: [PATCH 3/4] Add YAML migration for doctirne --- yaml-migrations/m_2022-03-23-doctrine.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 yaml-migrations/m_2022-03-23-doctrine.yaml diff --git a/yaml-migrations/m_2022-03-23-doctrine.yaml b/yaml-migrations/m_2022-03-23-doctrine.yaml new file mode 100644 index 000000000..a0c82188f --- /dev/null +++ b/yaml-migrations/m_2022-03-23-doctrine.yaml @@ -0,0 +1,12 @@ +# Adding JSON_VALUE, see https://github.com/bolt/core/pull/3135 +# From: https://github.com/bolt/core/issues/2088#issuecomment-1076232230 + +file: packages/doctrine.yaml +since: 5.1.6 + +add: + doctrine: + orm: + dql: + string_functions: + JSON_VALUE: Bolt\Doctrine\Functions\JsonValue From ea372632fe457b32a6f599564c911089c37602a0 Mon Sep 17 00:00:00 2001 From: Xiao Hu Tai Date: Mon, 30 Oct 2023 12:30:18 +0100 Subject: [PATCH 4/4] Add YAML migrations for `packages/prod/doctrine.yaml` --- config/packages/prod/doctrine.yaml | 2 +- yaml-migrations/m_2023-10-26-prod-doctrine.yaml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 yaml-migrations/m_2023-10-26-prod-doctrine.yaml diff --git a/config/packages/prod/doctrine.yaml b/config/packages/prod/doctrine.yaml index 2f16f0fde..1c812e552 100644 --- a/config/packages/prod/doctrine.yaml +++ b/config/packages/prod/doctrine.yaml @@ -28,4 +28,4 @@ framework: doctrine.result_cache_pool: adapter: cache.app doctrine.system_cache_pool: - adapter: cache.system + adapter: cache.app diff --git a/yaml-migrations/m_2023-10-26-prod-doctrine.yaml b/yaml-migrations/m_2023-10-26-prod-doctrine.yaml new file mode 100644 index 000000000..8586f4da2 --- /dev/null +++ b/yaml-migrations/m_2023-10-26-prod-doctrine.yaml @@ -0,0 +1,11 @@ +# See: https://github.com/bolt/project/commit/f33248d487b5b6a09a38224f890d259f9ea07003#diff-79c1dc283ac8f8d1d02991db661137a22a20b13cd277962eae1d0dbfb2d96467 + +file: packages/prod/doctrine.yaml +since: 5.2.0 + +add: + framework: + cache: + pools: + doctrine.system_cache_pool: + adapter: cache.app