Sometimes you need to check a Composer package’s version at runtime, e.g., for backward compatibility or feature flags.
Using InstalledVersions
Composer 2’s built-in InstalledVersions class can query the version of any installed package:
| |
Sometimes you need to check a Composer package’s version at runtime, e.g., for backward compatibility or feature flags.
Composer 2’s built-in InstalledVersions class can query the version of any installed package:
| |