File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
Step/Deploy/PreDeploy/ConfigUpdate
Test/Unit/Config/Validator/Deploy Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ public function validate(): Validator\ResultInterface
81
81
);
82
82
}
83
83
84
- if (!$ this ->magentoVersion ->satisfies ( ' >= 2.4.7 ' )) {
84
+ if (!$ this ->magentoVersion ->isGreaterOrEqual ( ' 2.4.7 ' )) {
85
85
$ variables = [
86
86
DeployInterface::VAR_USE_LUA ,
87
87
DeployInterface::VAR_LUA_KEY ,
Original file line number Diff line number Diff line change @@ -131,8 +131,13 @@ public function execute()
131
131
$ config ['cache ' ]['graphql ' ] = $ graphqlConfig ;
132
132
}
133
133
134
- $ config ['cache ' ]['frontend ' ]['default ' ]['backend_options ' ]['_useLua ' ] = $ luaConfigKey ;
135
- $ config ['cache ' ]['frontend ' ]['default ' ]['backend_options ' ]['use_lua ' ] = $ luaConfig ;
134
+ if (!empty ($ luaConfigKey )) {
135
+ $ config ['cache ' ]['frontend ' ]['default ' ]['backend_options ' ]['_useLua ' ] = $ luaConfigKey ;
136
+ }
137
+
138
+ if (!empty ($ luaConfig )) {
139
+ $ config ['cache ' ]['frontend ' ]['default ' ]['backend_options ' ]['use_lua ' ] = $ luaConfig ;
140
+ }
136
141
$ this ->configWriter ->create ($ config );
137
142
} catch (FileSystemException $ e ) {
138
143
throw new StepException ($ e ->getMessage (), Error::DEPLOY_ENV_PHP_IS_NOT_WRITABLE );
Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ public function testValidateVersionGreaterTwoDotTwo()
66
66
->method ('isGreaterOrEqual ' )
67
67
->with ('2.2 ' )
68
68
->willReturn (true );
69
+ $ this ->magentoVersion ->expects ($ this ->once ())
70
+ ->method ('isGreaterOrEqual ' )
71
+ ->with ('2.4.7 ' )
72
+ ->willReturn (true );
69
73
$ this ->magentoVersion ->expects ($ this ->once ())
70
74
->method ('satisfies ' )
71
75
->willReturn (true );
@@ -81,6 +85,10 @@ public function testValidateVersionTwoDotOneAndVariablesNotConfigured()
81
85
->method ('isGreaterOrEqual ' )
82
86
->with ('2.2 ' )
83
87
->willReturn (false );
88
+ $ this ->magentoVersion ->expects ($ this ->once ())
89
+ ->method ('isGreaterOrEqual ' )
90
+ ->with ('2.4.7 ' )
91
+ ->willReturn (false );
84
92
$ this ->magentoVersion ->expects ($ this ->once ())
85
93
->method ('satisfies ' )
86
94
->willReturn (false );
@@ -97,6 +105,10 @@ public function testValidateVersionTwoDotOneAndAllVariablesAreConfigured()
97
105
->method ('isGreaterOrEqual ' )
98
106
->with ('2.2 ' )
99
107
->willReturn (false );
108
+ $ this ->magentoVersion ->expects ($ this ->once ())
109
+ ->method ('isGreaterOrEqual ' )
110
+ ->with ('2.4.7 ' )
111
+ ->willReturn (false );
100
112
$ this ->magentoVersion ->expects ($ this ->once ())
101
113
->method ('satisfies ' )
102
114
->willReturn (false );
You can’t perform that action at this time.
0 commit comments