Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modernization
The v3 still support PHP 7.2 and Composer 1. This creates major maintenance issues andcomplexity in code. In fact, Composer changed a lot and, for example, we have to deal with the syncronous approach of v1 to te async Loop-based approach of v2.
With PHP 8 we can also embrace a more concise and espressive API, more type-safety, and a simpler dependencies tree.
By Composer 2.3+ we can rely on a consistent Composer API (at least for the part we touch) reducing complexity and simplifying maintenance.
We can also switch to latest Syde code standards and so a more "consistent" code base.
Finally we cad get rid of a few deprecated features we had in v3.
New feature: Assets Info
In an attempt to nake the codebase more testable and more maintenable, the task of determining the relevant paths connected to a package has been moved to a separate class.
That has enabled with very little effort the possibity to have a class that determines all the information about a package.
From there, the next "obvious" step was to introduce an
asset-info
command that can provide all relevan information about one, many, or all the packages who have any asset compiler-related configuration.Among other things, this can be used to build custom solution for compiling assets that do not rely on the compiler itself. E.g. a Nodejs-based application could obtain the information and compile assets in a heavily-parallelized manner. Or it can be used for custom "watch" implementations.
QA Workflow
Besides updating the PHP matrix and fix some minotr bugs in the jobs selection, this PR also introduces a workflow for functional tests, when previously only unit tests were executed.
About breaking change
This PR is strictly-speaking for a major version because it introduces breaking changes in the internal PHP API. However, the consuming API is 100% compatible with version 3.
Only thing that it is worth to mention in that deprecated features (such as usage of "env" instead of "mode" and "commands" instead of "package_manager" has been removed after being deprecated in v3).
If this PR is merged, we can stop probably actively supporting all other versions, maybe supporting bugfix only on v3 for some time for those stuck on PHP 7.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature, doc update, maintenance.
What is the current behavior? (You can also link to an open issue here)
n/a
What is the new behavior (if this is a feature change)?
n/a
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Yes.
Other information:
n/a