Skip to content

Commit

Permalink
Implement #194: remove latest composer deps from default generated …
Browse files Browse the repository at this point in the history
…pipelines

This change removes `latest` from default composer dependencies in the generated CI matrix.

The rationale is that `latest` dependencies tend to break our builds, and we usually run @renovate-bot
or @dependabot on our repositories, keeping both `composer.json` and `composer.lock` fairly updated.

Because of this kind of disciplined approach, we can assume that `latest` dependencies are already
regularly tested by refreshing `composer.lock` regularly, and further testing with explicit
`composer update` is considered risky, because it moves into unexplored land, breaking builds that
are otherwise quite stable.

We also don't want to break builds by contributors, or builds that upgrade perfectly safe to upgrade
dependencies, just because a specific `latest` upstream dependency broke, and we didn't really touch
it.

The final objective is that CI can break, but only in commits that change `composer.json` and `composer.lock`,
and those are handled every day by automation.

Therefore, the default testing approach will cover `lowest` and `locked` dependencies, which both move
much less than `latest`, and don't cause instability.
  • Loading branch information
Ocramius committed Mar 3, 2023
1 parent a89f515 commit 51415e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/code-check-codeception-dist/matrix.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"include": [
{
"name": "Codeception [8.2, latest]",
"job": "{\"command\":\"./vendor/bin/codecept run\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}",
"name": "Codeception [8.2, lowest]",
"job": "{\"command\":\"./vendor/bin/codecept run\",\"php\":\"8.2\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}",
"operatingSystem": "ubuntu-latest",
"action": "laminas/laminas-continuous-integration-action@v1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"job": "{\"command\":\"test\",\"php\":\"8.1\",\"extensions\":[],\"ini\":[],\"dependencies\":\"lowest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}",
"operatingSystem": "ubuntu-latest",
"action": "laminas/laminas-continuous-integration-action@v1"
},
{
"name": "Whatever Check [8.1, latest]",
"job": "{\"command\":\"test\",\"php\":\"8.1\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[]}",
"operatingSystem": "ubuntu-latest",
"action": "laminas/laminas-continuous-integration-action@v1"
}
]
}

0 comments on commit 51415e2

Please sign in to comment.