File tree Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Expand file tree Collapse file tree 3 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1616 "php" : " >=8.1" ,
1717 "doctrine/inflector" : " ^2.0" ,
1818 "nikic/php-parser" : " ^4.18|^5.0" ,
19- "php-cs-fixer/shim" : " ^v3.59.3 " ,
19+ "php-cs-fixer/shim" : " ^v3.64 " ,
2020 "symfony/config" : " ^6.4|^7.0" ,
2121 "symfony/console" : " ^6.4|^7.0" ,
2222 "symfony/dependency-injection" : " ^6.4|^7.0" ,
Original file line number Diff line number Diff line change @@ -94,19 +94,14 @@ public function writeLinterMessage(OutputInterface $output): void
9494
9595 private function setBinary (): void
9696 {
97- // Use Bundled PHP-CS-Fixer
97+ // Use Bundled (shim) PHP-CS-Fixer
9898 if (null === $ this ->phpCsFixerBinaryPath ) {
99- $ pathCandidates = [
100- __DIR__ .'/../../vendor/php-cs-fixer/shim/php-cs-fixer ' ,
101- __DIR__ .'/../../../php-cs-fixer/shim/php-cs-fixer ' ,
102- ];
99+ $ shimLocation = \sprintf ('%s/vendor/bin/php-cs-fixer ' , \dirname (__DIR__ , 2 ));
103100
104- foreach ($ pathCandidates as $ pathCandidate ) {
105- if (is_file ($ pathCandidate )) {
106- $ this ->phpCsFixerBinaryPath = $ pathCandidate ;
101+ if (is_file ($ shimLocation )) {
102+ $ this ->phpCsFixerBinaryPath = $ shimLocation ;
107103
108- return ;
109- }
104+ return ;
110105 }
111106
112107 return ;
Original file line number Diff line number Diff line change @@ -46,7 +46,9 @@ public function testPhpCsFixerVersion(): void
4646 }
4747
4848 $ fixerPath = __DIR__ .'/../../vendor/php-cs-fixer/shim/php-cs-fixer ' ;
49- $ expectedVersion = InstalledVersions::getVersion ('php-cs-fixer/shim ' );
49+
50+ // Get the installed version and remove the preceding "v"
51+ $ expectedVersion = ltrim (InstalledVersions::getPrettyVersion ('php-cs-fixer/shim ' ), 'v ' );
5052
5153 $ process = Process::fromShellCommandline (sprintf ('%s -V ' , $ fixerPath ));
5254
You can’t perform that action at this time.
0 commit comments