You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Composer's API to process a project's dependency list. Composer 2.0 is now available, and part of this is:
There is a new class, Composer\InstalledVersions, which is autoloaded in every project and is available at runtime. It allows you to check which packages/versions are present at runtime of your own project.
If nothing else this will simplify this module - in theory we can use this class to access the information we're currently building semi-manually with the Composer API.
The text was updated successfully, but these errors were encountered:
If your code relies on any of these runtime features, you should require "composer-runtime-api": "^2.0" in your composer.json. This is a virtual package which is provided by Composer and will make sure people have to use Composer 2.x to install your package.
Considering Silverstripe Cloud and Public Sector still (afaik) use composer 1, is this a change that would be okay to make?
If nothing else this will simplify this module - in theory we can use this class to access the information we're currently building semi-manually with the Composer API.
It turns out all this gives you is the currently installed version (which we could just fetch from composer.lock anyway) - it doesn't provide the contraints enforced by dependent packages.
We are using Composer's API to process a project's dependency list. Composer 2.0 is now available, and part of this is:
If nothing else this will simplify this module - in theory we can use this class to access the information we're currently building semi-manually with the Composer API.
The text was updated successfully, but these errors were encountered: