33namespace Hypernode \Deploy \Deployer \Task \After ;
44
55use Hypernode \Deploy \Deployer \Task \TaskBase ;
6- use Hypernode \DeployConfiguration \ServerRole ;
7- use Hypernode \Deploy \Deployer \Task \TaskInterface ;
86use Hypernode \DeployConfiguration \Configuration ;
97
108use function Deployer \after ;
@@ -57,7 +55,7 @@ public function configure(Configuration $config): void
5755 run ('curl -L -o cachetool.phar ' . $ this ->getCachetoolUrl ());
5856 $ cachetoolBinary = '{{release_path}}/cachetool.phar ' ;
5957
60- writeln (sprintf ("Downloaded cachetool %s for PHP %d " , $ cachetoolBinary , $ this ->getPhpVersion ()));
58+ writeln (sprintf ("Downloaded cachetool %s for PHP %f " , $ cachetoolBinary , $ this ->getPhpVersion ()));
6159 return $ cachetoolBinary ;
6260 });
6361 return $ cachetoolBinary ;
@@ -98,14 +96,11 @@ public function configure(Configuration $config): void
9896 run ("cd {{release_path}} && {{bin/php}} {{bin/cachetool}} apcu:cache:clear {{cachetool_options}} " );
9997 });
10098
101-
102- $ role = ServerRole::APPLICATION ;
103- task ('cachetool:clear:opcache ' )
104- ->select ("roles= $ role " );
99+ task ('cachetool:clear:opcache ' );
105100
106101 task ('cachetool:cleanup ' , function () {
107102 run ('cd {{deploy_path}} && rm -f current/{{bin/cachetool}} ' );
108- })-> select ( " roles= $ role " ) ;
103+ });
109104 }
110105
111106 protected function getPhpVersion (): float
@@ -121,7 +116,7 @@ public function getCachetoolUrl(): string
121116 }
122117
123118 if ($ phpVersion >= 7.3 ) {
124- return $ this ->versionBinaryMapping [6 ];
119+ return $ this ->versionBinaryMapping [7 ];
125120 }
126121
127122 if ($ phpVersion >= 7.2 ) {
0 commit comments