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 @@ -95,19 +95,14 @@ public function writeLinterMessage(OutputInterface $output): void
9595
9696 private function setBinary (): void
9797 {
98- // Use Bundled PHP-CS-Fixer
98+ // Use Bundled (shim) PHP-CS-Fixer
9999 if (null === $ this ->phpCsFixerBinaryPath ) {
100- $ pathCandidates = [
101- __DIR__ .'/../../vendor/php-cs-fixer/shim/php-cs-fixer ' ,
102- __DIR__ .'/../../../php-cs-fixer/shim/php-cs-fixer ' ,
103- ];
100+ $ shimLocation = \sprintf ('%s/vendor/bin/php-cs-fixer ' , \dirname (__DIR__ , 2 ));
104101
105- foreach ($ pathCandidates as $ pathCandidate ) {
106- if (is_file ($ pathCandidate )) {
107- $ this ->phpCsFixerBinaryPath = $ pathCandidate ;
102+ if (is_file ($ shimLocation )) {
103+ $ this ->phpCsFixerBinaryPath = $ shimLocation ;
108104
109- return ;
110- }
105+ return ;
111106 }
112107
113108 return ;
Original file line number Diff line number Diff line change @@ -44,7 +44,9 @@ public function testPhpCsFixerVersion(): void
4444 $ this ->markTestSkippedOnWindows ();
4545
4646 $ fixerPath = __DIR__ .'/../../vendor/php-cs-fixer/shim/php-cs-fixer ' ;
47- $ expectedVersion = InstalledVersions::getVersion ('php-cs-fixer/shim ' );
47+
48+ // Get the installed version and remove the preceding "v"
49+ $ expectedVersion = ltrim (InstalledVersions::getPrettyVersion ('php-cs-fixer/shim ' ), 'v ' );
4850
4951 $ process = Process::fromShellCommandline (\sprintf ('%s -V ' , $ fixerPath ));
5052
You can’t perform that action at this time.
0 commit comments