File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -378,19 +378,18 @@ public static function createToolsFromComposer(
378378 );
379379 } catch (Throwable ) {
380380 [$ group , $ name ] = self ::getGroupAndName ($ packageName );
381+ /** @psalm-suppress RiskyTruthyFalsyComparison -- false positive - see the `?: ''` */
382+ $ version = $ versionOverride ?? (trim (
383+ // Try sibling of (global) installation
384+ // !! Don't refer to the `vendor` dir, it is a configurable and might be called differently !!
385+ @file_get_contents (\dirname (__DIR__ , 4 )."/ $ group/ $ name/semver.txt " )
386+ ?: // fallback: empty string
387+ ''
388+ ) ?: null );
381389 yield (new Models \Tool ())
382390 ->setName ($ name )
383391 ->setVendor ($ group )
384- ->setVersion (
385- $ versionOverride
386- ?? (trim (
387- // try sibling of (global) installation
388- // !! dont refer to the `vendor` dir, it is a configurable and might be called differently !!
389- @file_get_contents (\dirname (__DIR__ , 4 )."/ $ group/ $ name/semver.txt " )
390- ?: // fallback: empty string
391- ''
392- ) ?: null )
393- );
392+ ->setVersion ($ version );
394393 }
395394 }
396395 }
Original file line number Diff line number Diff line change 33 "type" : " metapackage" ,
44 "description" : " psalm and plugins" ,
55 "require-dev" : {
6- "vimeo/psalm" : " 5.16 .0" ,
6+ "vimeo/psalm" : " 6.0 .0" ,
77 "roave/security-advisories" : " dev-latest"
88 },
99 "config" : {
You can’t perform that action at this time.
0 commit comments