diff --git a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php
index ae2fede3dbc18..1268e19984cd8 100644
--- a/app/code/Magento/CacheInvalidate/Model/PurgeCache.php
+++ b/app/code/Magento/CacheInvalidate/Model/PurgeCache.php
@@ -37,10 +37,10 @@ class PurgeCache
/**
* Batch size of the purge request.
*
- * Based on default Varnish 4 http_req_hdr_len size minus a 512 bytes margin for method,
+ * Based on default Varnish 6 http_req_hdr_len size minus a 512 bytes margin for method,
* header name, line feeds etc.
*
- * @see https://varnish-cache.org/docs/4.1/reference/varnishd.html
+ * @see https://varnish-cache.org/docs/6.0/reference/varnishd.html
*
* @var int
*/
diff --git a/app/code/Magento/PageCache/Block/System/Config/Form/Field/Export/Varnish4.php b/app/code/Magento/PageCache/Block/System/Config/Form/Field/Export/Varnish4.php
deleted file mode 100644
index c6c7766265dd9..0000000000000
--- a/app/code/Magento/PageCache/Block/System/Config/Form/Field/Export/Varnish4.php
+++ /dev/null
@@ -1,22 +0,0 @@
-config->getVclFile(\Magento\PageCache\Model\Config::VARNISH_6_CONFIGURATION_PATH);
break;
- case 5:
- $content = $this->config->getVclFile(\Magento\PageCache\Model\Config::VARNISH_5_CONFIGURATION_PATH);
- break;
default:
- $content = $this->config->getVclFile(\Magento\PageCache\Model\Config::VARNISH_4_CONFIGURATION_PATH);
+ $content = $this->config->getVclFile(\Magento\PageCache\Model\Config::VARNISH_6_CONFIGURATION_PATH);
break;
}
return $this->fileFactory->create($fileName, $content, DirectoryList::VAR_DIR);
diff --git a/app/code/Magento/PageCache/Model/Config.php b/app/code/Magento/PageCache/Model/Config.php
index be011b637dc02..6defbee7b02a3 100644
--- a/app/code/Magento/PageCache/Model/Config.php
+++ b/app/code/Magento/PageCache/Model/Config.php
@@ -57,11 +57,15 @@ class Config
public const VARNISH_6_CONFIGURATION_PATH = 'system/full_page_cache/varnish6/path';
/**
+ * @deprecated Varnish 5 is EOL
+ * @see VARNISH_6_CONFIGURATION_PATH
* XML path to Varnish 5 config template path
*/
public const VARNISH_5_CONFIGURATION_PATH = 'system/full_page_cache/varnish5/path';
/**
+ * @deprecated Varnish 4 is EOL
+ * @see VARNISH_6_CONFIGURATION_PATH
* XML path to Varnish 4 config template path
*/
public const VARNISH_4_CONFIGURATION_PATH = 'system/full_page_cache/varnish4/path';
@@ -140,7 +144,8 @@ public function getTtl()
*
* @param string $vclTemplatePath
* @return string
- * @deprecated 100.2.0 see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
+ * @deprecated 100.2.0
+ * @see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
*/
public function getVclFile($vclTemplatePath)
{
@@ -153,11 +158,8 @@ public function getVclFile($vclTemplatePath)
case self::VARNISH_6_CONFIGURATION_PATH:
$version = 6;
break;
- case self::VARNISH_5_CONFIGURATION_PATH:
- $version = 5;
- break;
default:
- $version = 4;
+ $version = 6;
}
$sslOffloadedHeader = $this->_scopeConfig->getValue(
Request::XML_PATH_OFFLOADER_HEADER
@@ -179,7 +181,8 @@ public function getVclFile($vclTemplatePath)
* Prepare data for VCL config
*
* @return array
- * @deprecated 100.2.0 see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
+ * @deprecated 100.2.0
+ * @see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
*/
protected function _getReplacements()
{
@@ -209,7 +212,8 @@ protected function _getReplacements()
* }
*
* @return mixed|null|string
- * @deprecated 100.2.0 see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
+ * @deprecated 100.2.0
+ * @see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
*/
protected function _getAccessList()
{
@@ -235,7 +239,8 @@ protected function _getAccessList()
* we have to convert "/pattern/iU" into "(?Ui)pattern"
*
* @return string
- * @deprecated 100.2.0 see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
+ * @deprecated 100.2.0
+ * @see \Magento\PageCache\Model\VclGeneratorInterface::generateVcl
*/
protected function _getDesignExceptions()
{
diff --git a/app/code/Magento/PageCache/Model/Varnish/VclTemplateLocator.php b/app/code/Magento/PageCache/Model/Varnish/VclTemplateLocator.php
index 8ad684198f409..68338aa6de510 100644
--- a/app/code/Magento/PageCache/Model/Varnish/VclTemplateLocator.php
+++ b/app/code/Magento/PageCache/Model/Varnish/VclTemplateLocator.php
@@ -19,41 +19,46 @@
class VclTemplateLocator implements VclTemplateLocatorInterface
{
/**
- * XML path to Varnish 5 config template path
+ * XML path to Varnish 6 config template path
*/
- const VARNISH_6_CONFIGURATION_PATH = 'system/full_page_cache/varnish6/path';
+ public const VARNISH_6_CONFIGURATION_PATH = 'system/full_page_cache/varnish6/path';
/**
+ * @deprecated Varnish 5 is EOL
+ * @see VARNISH_6_CONFIGURATION_PATH
* XML path to Varnish 5 config template path
*/
- const VARNISH_5_CONFIGURATION_PATH = 'system/full_page_cache/varnish5/path';
+ public const VARNISH_5_CONFIGURATION_PATH = 'system/full_page_cache/varnish5/path';
/**
+ * @deprecated Varnish 4 is EOL
+ * @see VARNISH_6_CONFIGURATION_PATH
* XML path to Varnish 4 config template path
*/
- const VARNISH_4_CONFIGURATION_PATH = 'system/full_page_cache/varnish4/path';
+ public const VARNISH_4_CONFIGURATION_PATH = 'system/full_page_cache/varnish4/path';
/**
- * Varnish 4 supported version
+ * @deprecated Varnish 4 is EOL
+ * @see VARNISH_SUPPORTED_VERSION_6
*/
- const VARNISH_SUPPORTED_VERSION_4 = '4';
+ public const VARNISH_SUPPORTED_VERSION_4 = '4';
/**
- * Varnish 5 supported version
+ * @deprecated Varnish 5 is EOL
+ * @see VARNISH_SUPPORTED_VERSION_6
*/
- const VARNISH_SUPPORTED_VERSION_5 = '5';
+ public const VARNISH_SUPPORTED_VERSION_5 = '5';
/**
* Varnish 6 supported version
+ * @see VARNISH_SUPPORTED_VERSION_6
*/
- const VARNISH_SUPPORTED_VERSION_6 = '6';
+ public const VARNISH_SUPPORTED_VERSION_6 = '6';
/**
* @var array
*/
private $supportedVarnishVersions = [
- self::VARNISH_SUPPORTED_VERSION_4 => self::VARNISH_4_CONFIGURATION_PATH,
- self::VARNISH_SUPPORTED_VERSION_5 => self::VARNISH_5_CONFIGURATION_PATH,
self::VARNISH_SUPPORTED_VERSION_6 => self::VARNISH_6_CONFIGURATION_PATH,
];
diff --git a/app/code/Magento/PageCache/Test/Unit/Model/ConfigTest.php b/app/code/Magento/PageCache/Test/Unit/Model/ConfigTest.php
index 2eaca6f44d38d..223911716278e 100644
--- a/app/code/Magento/PageCache/Test/Unit/Model/ConfigTest.php
+++ b/app/code/Magento/PageCache/Test/Unit/Model/ConfigTest.php
@@ -183,7 +183,7 @@ public function testGetVcl(): void
->method('unserialize')
->with('serializedConfig')
->willReturn([['regexp' => '(?i)pattern', 'value' => 'value_for_pattern']]);
- $test = $this->config->getVclFile(Config::VARNISH_5_CONFIGURATION_PATH);
+ $test = $this->config->getVclFile(Config::VARNISH_6_CONFIGURATION_PATH);
$this->assertEquals(file_get_contents(__DIR__ . '/_files/result.vcl'), $test);
}
diff --git a/app/code/Magento/PageCache/etc/adminhtml/system.xml b/app/code/Magento/PageCache/etc/adminhtml/system.xml
index 73c8c913ba63c..dae2844e5c849 100644
--- a/app/code/Magento/PageCache/etc/adminhtml/system.xml
+++ b/app/code/Magento/PageCache/etc/adminhtml/system.xml
@@ -49,19 +49,6 @@
1
-
-
- Magento\PageCache\Block\System\Config\Form\Field\Export\Varnish4
-
- 1
-
-
-
- Magento\PageCache\Block\System\Config\Form\Field\Export\Varnish5
-
- 1
-
-
Magento\PageCache\Block\System\Config\Form\Field\Export\Varnish6
diff --git a/app/code/Magento/PageCache/etc/config.xml b/app/code/Magento/PageCache/etc/config.xml
index 7ec052cb065ea..ad712870463f4 100644
--- a/app/code/Magento/PageCache/etc/config.xml
+++ b/app/code/Magento/PageCache/etc/config.xml
@@ -17,12 +17,6 @@
varnish6.vcl
-
- varnish5.vcl
-
-
- varnish4.vcl
-
86400
100
1
diff --git a/dev/tests/integration/testsuite/Magento/PageCache/Block/System/Config/Form/Field/ExportTest.php b/dev/tests/integration/testsuite/Magento/PageCache/Block/System/Config/Form/Field/ExportTest.php
index 5a4d3fcd2d9d2..e17806d33a50a 100644
--- a/dev/tests/integration/testsuite/Magento/PageCache/Block/System/Config/Form/Field/ExportTest.php
+++ b/dev/tests/integration/testsuite/Magento/PageCache/Block/System/Config/Form/Field/ExportTest.php
@@ -13,8 +13,6 @@ class ExportTest extends \Magento\TestFramework\TestCase\AbstractBackendControll
/**
* Check Varnish export buttons
* @covers \Magento\PageCache\Block\System\Config\Form\Field\Export::_getElementHtml
- * @covers \Magento\PageCache\Block\System\Config\Form\Field\Export\Varnish5::getVarnishVersion
- * @covers \Magento\PageCache\Block\System\Config\Form\Field\Export\Varnish4::getVarnishVersion
* @magentoAppIsolation enabled
* @magentoDbIsolation enabled
*/
@@ -22,8 +20,6 @@ public function testExportButtons()
{
$this->dispatch('backend/admin/system_config/edit/section/system/');
$body = $this->getResponse()->getBody();
- $this->assertStringContainsString('system_full_page_cache_varnish_export_button_version4', $body);
- $this->assertStringContainsString('system_full_page_cache_varnish_export_button_version5', $body);
$this->assertStringContainsString('[id^=system_full_page_cache_varnish_export_button_version]', $body);
}
}
diff --git a/dev/tests/integration/testsuite/Magento/PageCache/Model/ConfigTest.php b/dev/tests/integration/testsuite/Magento/PageCache/Model/ConfigTest.php
index e34db62c9adec..b64e6e4e68a33 100644
--- a/dev/tests/integration/testsuite/Magento/PageCache/Model/ConfigTest.php
+++ b/dev/tests/integration/testsuite/Magento/PageCache/Model/ConfigTest.php
@@ -85,7 +85,7 @@ protected function setUp(): void
// @codingStandardsIgnoreEnd
public function testGetVclFile()
{
- $result = $this->config->getVclFile(Config::VARNISH_5_CONFIGURATION_PATH);
+ $result = $this->config->getVclFile(Config::VARNISH_6_CONFIGURATION_PATH);
$this->assertEquals(file_get_contents(__DIR__ . '/_files/result.vcl'), $result);
}
}