Skip to content

Commit ae4b181

Browse files
committed
Thanks to Derek Cardinell for finding and helping fix #59
1 parent 12c1513 commit ae4b181

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

Helper/Data.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Magento\Store\Model\ScopeInterface;
1212
use Magento\Store\Model\StoreManagerInterface;
1313
use Magento\PageCache\Model\Cache\Server;
14-
use Magento\Framework\Module\ModuleListInterface;
1514

1615
/**
1716
* @version 3.0.0
@@ -27,8 +26,8 @@ class Data extends AbstractHelper {
2726
protected $_storeManager;
2827
protected $_http;
2928
protected $_server;
30-
protected $_modules;
3129

30+
const MODULE_VERSION = "3.0.0";
3231
const DEBUG_DISABLED = 1;
3332
const DEBUG_ENABLED = 2;
3433

@@ -37,15 +36,13 @@ public function __construct (
3736
StoreManagerInterface $storeManager,
3837
WriterInterface $configWriter,
3938
Http $http,
40-
Server $server,
41-
ModuleListInterface $modules
39+
Server $server
4240
) {
4341
$this->_configReader = $configReader;
4442
$this->_storeManager = $storeManager;
4543
$this->_configWriter = $configWriter;
4644
$this->_http = $http;
4745
$this->_server = $server;
48-
$this->_modules = $modules;
4946
}
5047

5148
protected function _getConfigValue ( $path, $scope = ScopeInterface::SCOPE_STORE, $storeId = null ) {
@@ -116,7 +113,7 @@ public function isDebugMode () {
116113
}
117114

118115
public function getModuleVersion () {
119-
return $this->_modules->getOne ("JetRails_Varnish") ["setup_version"];
116+
return self::MODULE_VERSION;
120117
}
121118

122119
public function getVarnishServersWithPorts () {

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ bump: ## Bump version in source files based on latest git tag
1515
VERSION=$(VERSION); sed -E -i '' "s/(<version>)(.+)(<\/version>)/\1$$VERSION\3/g" ./etc/config.xml
1616
VERSION=$(VERSION); sed -E -i '' "s/setup_version=\"([^\"]+)\"/setup_version=\"$$VERSION\"/g" ./etc/module.xml
1717
VERSION=$(VERSION); sed -E -i '' "s/schema_version=\"([^\"]+)\"/schema_version=\"$$VERSION\"/g" ./etc/module.xml
18+
VERSION=$(VERSION); sed -E -i '' "s/const MODULE_VERSION = \"([^\"]+)\"/const MODULE_VERSION = \"$$VERSION\"/g" ./Helper/Data.php
1819

1920
deploy: ## Deploy code to public_html directory
2021
NAMESPACE_PATH=$(NAMESPACE_PATH); mkdir -p "./public_html/app/code/$$NAMESPACE_PATH"

default.vcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* looking to customize the config, please look into the 'default.custom.vcl'
66
* file which this config uses to implement it's hooking system.
77
*
8-
* Generated on Magento Community 2.4.2 with JetRails_Varnish@3.0.2
8+
* Generated on Magento Community 2.4.2 with JetRails_Varnish@3.0.0
99
*/
1010

1111
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 6
@@ -38,7 +38,7 @@ acl purge {
3838
sub vcl_recv {
3939
call custom_recv_start;
4040
if (req.method == "GET" && client.ip ~ purge && req.url == "/jetrails/varnish-config/versions") {
41-
return (synth(200, "Magento 2.4.2 / Module 3.0.2"));
41+
return (synth(200, "Magento 2.4.2 / Module 3.0.0"));
4242
}
4343
set req.http.X-Forwarded-For = req.http.CF-Connecting-IP;
4444
if (req.restarts > 0) {

0 commit comments

Comments
 (0)