laminas / laminas-ci-matrix-action

GitHub Action for creating a CI job matrix.
BSD 3-Clause "New" or "Revised" License
24 stars 15 forks source link

Additional checks without specific PHP version uses invalid PHP version #319

Open boesing opened 2 days ago

boesing commented 2 days ago

Bug Report

Q A
Version(s) latest

Summary

When providing additional_checks without a specific PHP version, the "stable PHP version" is being used. That "stable PHP version" could be out of range of the actual project.

Current behavior

PHP 8.1 is used for an additional_checks job without an option in a project with minimum PHP 8.2 requirement.

{
    "name": "Linting [8.1, locked]",
    "operatingSystem": "ubuntu-latest",
    "action": "laminas/laminas-continuous-integration-action@v1",
    "job": {
      "command": "vendor/bin/php-parallel-lint --exclude .git/ --exclude vendor/ --no-progress .",
      "php": "8.1",
      "extensions": [],
      "ini": [],
      "dependencies": "locked",
      "ignore_platform_reqs_8": false,
      "ignore_php_platform_requirement": false,
      "additional_composer_arguments": []
    }
  }

How to reproduce

{
    "extensions": ["mysql"],
    "additional_checks": [
        {
            "name": "Linting",
            "job": {
                "command": "vendor/bin/php-parallel-lint --exclude .git/ --exclude vendor/ --no-progress .",
                "dependencies": "locked"
            }
        }
    ]
}
{
    "name": "example/example",
    "description": "Example project",
    "license": "proprietary",
    "type": "project",
    "require": {
        "php": "~8.2.0"
    },
    "require-dev": {
        "php-parallel-lint/php-parallel-lint": "^1.4"
    }
}

Expected behavior

Parallel lint is properly executed with the minimum supported PHP version of the project.

boesing commented 2 days ago

Temporary fix is providing a value in php property within the additional check