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
- 🔧 **Quality Tools PHP Version**: Configure separate PHP version for static analysis tools
20
+
- 🧩 **Symfony Minor Detection**: The workflow detects the Symfony version from your matrix and exposes it to Composer via `SYMFONY_REQUIRE` during dependency installation (no change to install commands required)
20
21
21
22
**Example Matrix Output:**
22
23
```text
@@ -69,11 +70,12 @@ This workflow automates the complete CI process for Symfony PHP projects:
- Detect Symfony version and set Composer extra: If the package is `symfony/framework-bundle`, set `composer config extra.symfony.require "{version}"`. If not provided, the workflow will try to infer Symfony version from the first `symfony/*` package in the matrix and set it accordingly.
728
730
4. **Install Dependencies**:
731
+
- The job exports `SYMFONY_REQUIRE` environment variable for this step using the detected Symfony version. This lets Symfony Flex align all `symfony/*` packages to the same minor automatically.
**Key Feature**: NO hardcoded package names! The workflow dynamically detects and applies constraints for any packages in the matrix.
@@ -836,6 +840,16 @@ with:
836
840
]
837
841
```
838
842
843
+
#### Exclusion Matching Semantics
844
+
845
+
- Wildcard match: A rule value ending with `.*` is treated as a prefix. For example:
846
+
- `{ "symfony/framework-bundle": "7.3.*"}` will match matrix values `"7.3"`, `"7.3.*"`, `"7.3.x"`, etc.
847
+
- Exact match: A rule value without `.*` must equal the matrix value exactly. For example:
848
+
- `{ "php": "8.2"}` matches only `"8.2"`, not `"8.2.1"`.
849
+
- Mixed rules: All keys in a rule must match (AND behavior). This lets you target precise combinations like `{ "php": "8.2", "symfony/framework-bundle": "7.2.*" }`.
850
+
851
+
This behavior ensures that exclusions like `"7.2.*"` and `"7.3.*"` properly skip jobs even if your `versions-matrix` lists values as `"7.2"` or `"7.3"` without the trailing `.*`.
1. Unit tests with coverage generate Clover XML (`coverage.xml` by default) and raw coverage (`coverage.cov`).
953
967
2. Coverage files are uploaded as artifacts (one artifact per matrix job).
954
968
3. `coverage-validation` job:
955
-
- Installs two tools globally: `phpcov/phpcov`and `rregeer/phpunit-coverage-check`
969
+
- Downloads `phpcov` as a PHAR from phar.phpunit.de using `phpcov-version` input and installs `rregeer/phpunit-coverage-check` globally
956
970
- Downloads all coverage artifacts to `coverage-artifacts/`
957
-
- Attempts to merge raw coverage with `phpcov merge --clover merged-coverage.xml <dirs>`
971
+
- Attempts to merge raw coverage with `php phpcov.phar merge --clover merged-coverage.xml <dirs>`
958
972
- Runs `phpunit-coverage-check --min=<threshold>` on the merged Clover; if no merged file exists, checks the single Clover file; if multiple Clovers exist, each is checked and the result fails if any are below the threshold
959
973
4. Posts or updates a PR comment with a simple OK/NOT OK message and the current coverage value
960
974
5. Fails job if coverage < threshold
@@ -968,7 +982,7 @@ Coverage: 85.50% (min 80%) — OK
968
982
- Must run on `pull_request` event (validation only runs on PRs)
969
983
- At least one matrix combination must have `"coverage": "xdebug"`
970
984
- Requires `pull-requests: write` permission (auto-granted in most workflows)
971
-
- `phpcov/phpcov`and `rregeer/phpunit-coverage-check` are installed automatically in the coverage validation job
985
+
- `phpcov`is downloaded as a PHAR (`phpcov-<version>.phar`) and `rregeer/phpunit-coverage-check` is installed automatically in the coverage validation job
972
986
973
987
**Edge Cases:**
974
988
- **No coverage artifacts**: Job succeeds with status "no-coverage" (no comment posted)
0 commit comments