@@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9090 }
9191
9292 $ useBuildDir = $ realBuildDir !== $ realCacheDir ;
93- $ oldBuildDir = substr ($ realBuildDir , 0 , -1 ).(' ~ ' === substr ($ realBuildDir , - 1 ) ? '+ ' : '~ ' );
93+ $ oldBuildDir = substr ($ realBuildDir , 0 , -1 ).(str_ends_with ($ realBuildDir , ' ~ ' ) ? '+ ' : '~ ' );
9494 if ($ useBuildDir ) {
9595 $ fs ->remove ($ oldBuildDir );
9696
@@ -120,7 +120,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
120120
121121 // the warmup cache dir name must have the same length as the real one
122122 // to avoid the many problems in serialized resources files
123- $ warmupDir = substr ($ realBuildDir , 0 , -1 ).(' _ ' === substr ($ realBuildDir , - 1 ) ? '- ' : '_ ' );
123+ $ warmupDir = substr ($ realBuildDir , 0 , -1 ).(str_ends_with ($ realBuildDir , ' _ ' ) ? '- ' : '_ ' );
124124
125125 if ($ output ->isVerbose () && $ fs ->exists ($ warmupDir )) {
126126 $ io ->comment ('Clearing outdated warmup directory... ' );
@@ -217,7 +217,7 @@ private function isNfs(string $dir): bool
217217 }
218218 }
219219 foreach ($ mounts as $ mount ) {
220- if (0 === strpos ($ dir , $ mount )) {
220+ if (str_starts_with ($ dir , $ mount )) {
221221 return true ;
222222 }
223223 }
0 commit comments