If framework is installed without recipe-core, when it attempts to find the version of that package an OutOfBoundsException is thrown by Composer’s InstalledVersions::getPrettyVersion() as the package isn’t installed.
The old code would quietly skip the package if it wasn’t installed (it’d never be encountered in the loop):
Module version(s) affected
5.2.0
Description
Appears to be a regression from https://github.com/silverstripe/silverstripe-framework/pull/11157
If framework is installed without recipe-core, when it attempts to find the version of that package an
OutOfBoundsException
is thrown by Composer’sInstalledVersions::getPrettyVersion()
as the package isn’t installed.The old code would quietly skip the package if it wasn’t installed (it’d never be encountered in the loop):
https://github.com/silverstripe/silverstripe-framework/blob/cca2f7059bc572497a8ed80f2d35e12a94984683/src/Core/Manifest/VersionProvider.php#L191-L195
Suggest we just add an
if (InstalledVersions::isInstalled($module))
check to the new code before trying to fetch the pretty version:https://github.com/silverstripe/silverstripe-framework/blob/97a8da8c7d223da9a4824e328cbeba92e7e83398/src/Core/Manifest/VersionProvider.php#L191-L193
How to reproduce
Install 5.2 without using recipe-core
Possible Solution
No response
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)PRs