triggerfishab / lisa-cli

0 stars 0 forks source link

feat(wpUpdate): ✨ standardize composer.json settings - minimum-stability, prefer-stable - skip php extensions #73

Closed chrillep closed 7 months ago

chrillep commented 8 months ago

PR Summary

Dev's Notes

set minimum-stability to dev

minimum-stability This defines the default behavior for filtering packages by stability. This defaults to stable, so if you rely on a dev package, you should specify it in your file to avoid surprises.

All versions of each package are checked for stability, and those that are less stable than the minimum-stability setting will be ignored when resolving your project dependencies. (Note that you can also specify stability requirements on a per-package basis using stability flags in the version constraints that you specify in a require block (see package links for more details).

Available options (in order of stability) are dev, alpha, beta, RC, and stable.

set prefer-stable true

prefer-stable When this is enabled, Composer will prefer more stable packages over unstable ones when finding compatible stable packages is possible. If you require a dev version or only alphas are available for a package, those will still be selected granted that the minimum-stability allows for it.

Use "prefer-stable": true to enable.

skip update on ext- dependencies. They are always "". since they are not installed via composer, just needed.

require and require-dev also support references to specific PHP versions and PHP extensions your project needs to run successfully.

Example:

{
    "require": {
        "php": ">=8.1",
        "ext-mbstring": "*"
    }
}

Note: It is important to list PHP extensions your project requires. Not all PHP installations are created equal: some may miss extensions you may consider as standard (such as ext-mysqli which is not installed by default in Fedora/CentOS minimal installation systems). Failure to list required PHP extensions may lead to a bad user experience: Composer will install your package without any errors but it will then fail at run-time. The composer show --platform command lists all PHP extensions available on your system. You may use it to help you compile the list of extensions you use and require. Alternatively you may use third party tools to analyze your project for the list of extensions used.

what-the-diff[bot] commented 8 months ago

PR Summary