silverstripe / silverstripe-framework

Silverstripe Framework, the MVC framework that powers Silverstripe CMS
https://www.silverstripe.org
BSD 3-Clause "New" or "Revised" License
721 stars 821 forks source link

Use the Composer Runtime API instead of checking composer.lock for versions #11134

Closed GuySartorelli closed 7 months ago

GuySartorelli commented 7 months ago

SilverStripe\Core\Manifest\VersionProvider currently checks the composer.lock file to see what versions of modules are installed. This is somewhat fragile, and may not support some deployment strategies.

We should use the Composer runtime API for this purpose instead. This API is always available for projects that use the composer autoloader, which is all Silverstripe CMS projects.

PRs

lekoala commented 7 months ago

Additionally, this version provider thing caches a lot of information in cache and I wouldn't be surprised in affects negatively performance per request

image
lekoala commented 7 months ago

Unless i'm missing something, this was really easy to do :-)

GuySartorelli commented 7 months ago

PR merged - leaving this open pending the changelog PR.

GuySartorelli commented 7 months ago

Docs PR merged