Closed chrillep closed 7 months ago
Introduction of New Functions in Wordpress Composer Update Module
A number of new functions have been added in the wordpressComposerUpdate.js
module. These functions are intended to improve package stability configurations, update required packages, validate composer files, and obtain composer JSON data.
Changes to the wpUpdate Function
The wpUpdate
function has been upgraded to make use of the newly introduced functions. This enhanced integration aims to streamline the WordPress update process, potentially contributing to overall performance improvements.
Revised Import Statements in Index Module
The import terminology in index.js
has been restructured to reliably import wpUpdate
from the wordpressComposerUpdate.js
module. This ensures that all necessary functions and modules are correctly and efficiently sourced when needed.
Command Variable Adjustment
The command
variable in index.js
has been modified into a constant. This change promotes code robustness as it would prevent unintended reassignments, improving the overall stability of the application.
PR Summary
Introduction of New Functions in Wordpress Composer Update Module A number of new functions have been added in the
wordpressComposerUpdate.js
module. These functions are intended to improve package stability configurations, update required packages, validate composer files, and obtain composer JSON data.Changes to the wpUpdate Function The
wpUpdate
function has been upgraded to make use of the newly introduced functions. This enhanced integration aims to streamline the WordPress update process, potentially contributing to overall performance improvements.Revised Import Statements in Index Module The import terminology in
index.js
has been restructured to reliably importwpUpdate
from thewordpressComposerUpdate.js
module. This ensures that all necessary functions and modules are correctly and efficiently sourced when needed.Command Variable Adjustment The
command
variable inindex.js
has been modified into a constant. This change promotes code robustness as it would prevent unintended reassignments, improving the overall stability of the application.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:
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. Thecomposer 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.