Skip to content

Commit 0cba7d1

Browse files
committed
ACP2E-2102: No Export VCL for Varnish 7 button in admin panel
- changes requested to CR
1 parent fe92b56 commit 0cba7d1

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

app/code/Magento/PageCache/Block/System/Config/Form/Field/Export/Varnish7.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
namespace Magento\PageCache\Block\System\Config\Form\Field\Export;
99

10-
/**
11-
* Class Export
12-
*/
1310
class Varnish7 extends \Magento\PageCache\Block\System\Config\Form\Field\Export
1411
{
1512
/**

app/code/Magento/PageCache/Model/Varnish/VclTemplateLocator.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Framework\Module\Dir;
1111
use Magento\Framework\Module\Dir\Reader;
1212
use Magento\Framework\Filesystem\Directory\ReadFactory;
13+
use Magento\PageCache\Model\Config;
1314
use Magento\PageCache\Model\VclTemplateLocatorInterface;
1415
use Magento\PageCache\Exception\UnsupportedVarnishVersion;
1516

@@ -18,11 +19,6 @@
1819
*/
1920
class VclTemplateLocator implements VclTemplateLocatorInterface
2021
{
21-
/**
22-
* XML path to Varnish 7 config template path
23-
*/
24-
public const VARNISH_7_CONFIGURATION_PATH = 'system/full_page_cache/varnish7/path';
25-
2622
/**
2723
* XML path to Varnish 6 config template path
2824
*/
@@ -65,7 +61,7 @@ class VclTemplateLocator implements VclTemplateLocatorInterface
6561
self::VARNISH_SUPPORTED_VERSION_4 => self::VARNISH_4_CONFIGURATION_PATH,
6662
self::VARNISH_SUPPORTED_VERSION_5 => self::VARNISH_5_CONFIGURATION_PATH,
6763
self::VARNISH_SUPPORTED_VERSION_6 => self::VARNISH_6_CONFIGURATION_PATH,
68-
self::VARNISH_SUPPORTED_VERSION_7 => self::VARNISH_7_CONFIGURATION_PATH,
64+
self::VARNISH_SUPPORTED_VERSION_7 => Config::VARNISH_7_CONFIGURATION_PATH,
6965
];
7066

7167
/**

dev/tests/integration/testsuite/Magento/PageCache/Model/Varnish/VclGeneratorTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ public function setUp(): void
2626
$vclGeneratorParams = [
2727
'backendHost' => 'example.com',
2828
'backendPort' => '8080',
29-
'accessList' => explode(',', '127.0.0.1,192.168.0.1,127.0.0.2'),
30-
'designExceptions' => json_decode('{"_":{"regexp":"\/firefox\/i","value":"Magento\/blank"}}', true),
29+
'accessList' => ['127.0.0.1', '192.168.0.1', '127.0.0.2'],
30+
'designExceptions' => ['_' => [
31+
'regexp' => '/firefox/i',
32+
'value' => 'Magento/blank'
33+
]],
3134
'sslOffloadedHeader' => 'X-Forwarded-Proto',
3235
'gracePeriod' => 1234
3336
];

0 commit comments

Comments
 (0)