Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GuySartorelli opened this issue Feb 11, 2024 · 4 comments
Closed

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Feb 11, 2024

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
Copy link
Contributor

lekoala commented Feb 16, 2024

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
Copy link
Contributor

lekoala commented Feb 23, 2024

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

@GuySartorelli GuySartorelli self-assigned this Feb 25, 2024
@GuySartorelli
Copy link
Member Author

PR merged - leaving this open pending the changelog PR.

lekoala added a commit to lekoala/developer-docs that referenced this issue Feb 29, 2024
GuySartorelli added a commit to silverstripe/developer-docs that referenced this issue Mar 4, 2024
* Add composer runtime api mention

See silverstripe/silverstripe-framework#11134

* Update en/08_Changelogs/5.2.0.md

Co-authored-by: Guy Sartorelli <[email protected]>

* lint

---------

Co-authored-by: Guy Sartorelli <[email protected]>
@GuySartorelli
Copy link
Member Author

Docs PR merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants