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

Candidate/v4.x #23

Open
wants to merge 7 commits into
base: v4.x
Choose a base branch
from
Open

Candidate/v4.x #23

wants to merge 7 commits into from

Conversation

gmazzap
Copy link
Contributor

@gmazzap gmazzap commented Mar 6, 2024

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

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

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

gmazzap added 7 commits March 5, 2024 00:46
- Update min PHP & Composer
- Adapt codebase to PHP 8
- Remove handling of outdated and deprecated functionalities
- Update PHPCS and Psalm (and fix newly found issue)
- Introduce separate `PathsFinder` class
- Use base command class and get rid of 3 traits
- Refresh tests
- Refresh README
@gmazzap gmazzap marked this pull request as draft March 6, 2024 08:30
@gmazzap gmazzap marked this pull request as ready for review March 6, 2024 08:34
@gmazzap gmazzap requested review from Chrico and Biont March 6, 2024 08:34
@Chrico Chrico removed the request for review from Biont March 6, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant