From 32421cae695aa2801c03c2648438ed2ba9e0014c Mon Sep 17 00:00:00 2001 From: Andy Thompson Date: Wed, 24 Jul 2024 10:36:35 +0100 Subject: [PATCH] feat(magento): use symfony/var-exporter magento:config-dump for modern php export --- .../application/skeleton/app/etc/config.php | 56 +++++++++---------- .../application/skeleton/composer.json.twig | 3 +- .../console/root/usr/bin/strip-magento-config | 13 ++++- 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/src/magento2/application/skeleton/app/etc/config.php b/src/magento2/application/skeleton/app/etc/config.php index f05b6fcfe..9bb27c5da 100644 --- a/src/magento2/application/skeleton/app/etc/config.php +++ b/src/magento2/application/skeleton/app/etc/config.php @@ -453,7 +453,7 @@ 'Magento_GiftCardGraphQl' => 1, 'PayPal_Braintree' => 1, 'PayPal_BraintreeGraphQl' => 1, - 'Temando_ShippingRemover' => 1 + 'Temando_ShippingRemover' => 1, ], 'scopes' => [ 'websites' => [ @@ -463,7 +463,7 @@ 'name' => 'Admin', 'sort_order' => '0', 'default_group_id' => '0', - 'is_default' => '0' + 'is_default' => '0', ], 'base' => [ 'website_id' => '1', @@ -471,8 +471,8 @@ 'name' => 'Main Website', 'sort_order' => '0', 'default_group_id' => '1', - 'is_default' => '1' - ] + 'is_default' => '1', + ], ], 'groups' => [ [ @@ -481,7 +481,7 @@ 'name' => 'Default', 'root_category_id' => '0', 'default_store_id' => '0', - 'code' => 'default' + 'code' => 'default', ], [ 'group_id' => '1', @@ -489,8 +489,8 @@ 'name' => 'Main Website Store', 'root_category_id' => '2', 'default_store_id' => '1', - 'code' => 'main_website_store' - ] + 'code' => 'main_website_store', + ], ], 'stores' => [ 'admin' => [ @@ -500,7 +500,7 @@ 'group_id' => '0', 'name' => 'Admin', 'sort_order' => '0', - 'is_active' => '1' + 'is_active' => '1', ], 'default' => [ 'store_id' => '1', @@ -509,16 +509,16 @@ 'group_id' => '1', 'name' => 'Default Store View', 'sort_order' => '0', - 'is_active' => '1' - ] - ] + 'is_active' => '1', + ], + ], ], 'system' => [ 'default' => [ 'general' => [ 'locale' => [ - 'code' => 'en_GB' - ] + 'code' => 'en_GB', + ], ], 'dev' => [ 'js' => [ @@ -526,24 +526,24 @@ 'minify_files' => '0', 'minify_exclude' => [ 'tiny_mce' => '/tiny_mce/', - 'cardinal_commerce' => '/v1/songbird' - ] + 'cardinal_commerce' => '/v1/songbird', + ], ], 'css' => [ 'minify_files' => '0', 'minify_exclude' => [ - 'tiny_mce' => '/tiny_mce/' + 'tiny_mce' => '/tiny_mce/', ], - 'use_css_critical_path' => '0' + 'use_css_critical_path' => '0', ], 'static' => [ - 'sign' => '1' + 'sign' => '1', ], 'template' => [ - 'minify_html' => '0' - ] - ] - ] + 'minify_html' => '0', + ], + ], + ], ], 'themes' => [ 'frontend/Magento/blank' => [ @@ -553,7 +553,7 @@ 'is_featured' => '0', 'area' => 'frontend', 'type' => '0', - 'code' => 'Magento/blank' + 'code' => 'Magento/blank', ], 'adminhtml/Magento/backend' => [ 'parent_id' => null, @@ -562,7 +562,7 @@ 'is_featured' => '0', 'area' => 'adminhtml', 'type' => '0', - 'code' => 'Magento/backend' + 'code' => 'Magento/backend', ], 'frontend/Magento/luma' => [ 'parent_id' => 'Magento/blank', @@ -571,7 +571,7 @@ 'is_featured' => '0', 'area' => 'frontend', 'type' => '0', - 'code' => 'Magento/luma' + 'code' => 'Magento/luma', ], 'adminhtml/Magento/spectrum' => [ 'parent_id' => 'Magento/backend', @@ -580,8 +580,8 @@ 'is_featured' => '0', 'area' => 'adminhtml', 'type' => '0', - 'code' => 'Magento/spectrum' - ] + 'code' => 'Magento/spectrum', + ], ], - 'i18n' => [] + 'i18n' => [], ]; diff --git a/src/magento2/application/skeleton/composer.json.twig b/src/magento2/application/skeleton/composer.json.twig index 1ca53b3eb..5e00e9451 100644 --- a/src/magento2/application/skeleton/composer.json.twig +++ b/src/magento2/application/skeleton/composer.json.twig @@ -24,7 +24,8 @@ "squizlabs/php_codesniffer": "^3.8", "symfony/config": "^5.4", "symfony/dependency-injection": "^5.4", - "symfony/http-client": "^4.4 || ^5.0 || ^6.0 || ^7.0" + "symfony/http-client": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/var-exporter": "^7.0" }, "config": { "bin-dir": "bin", diff --git a/src/magento2/docker/image/console/root/usr/bin/strip-magento-config b/src/magento2/docker/image/console/root/usr/bin/strip-magento-config index 95bd27f6e..9445217a9 100755 --- a/src/magento2/docker/image/console/root/usr/bin/strip-magento-config +++ b/src/magento2/docker/image/console/root/usr/bin/strip-magento-config @@ -1,6 +1,10 @@ #!/usr/bin/env php