-
-
Notifications
You must be signed in to change notification settings - Fork 65
Open
Description
Description
I encountered an issue while using php-actions/composer@v6 in my GitHub Actions workflow. The project requires maatwebsite/excel with the version ^3.1 in the composer.json file. The workflow is set up as follows:
- name: Composer install
uses: php-actions/composer@v6
with:
php_version: '8.1'
args: '--no-dev --prefer-dist --optimize-autoloader'
dev: no
progress: yes
php_extensions: imagick gd gmp
However, the installation fails with the following error message:
Problem 1
- Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev].
- maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.1.31) does not satisfy that requirement.
Expected behavior:
The package maatwebsite/excel should be compatible with PHP 8.1 since its requirements are "php": "^7.0||^8.0", but it seems like it's not properly recognizing PHP 8.1 as a compatible version.
- Use the following setup in your GitHub Actions workflow:
- name: Composer install
uses: php-actions/composer@v6
with:
php_version: '8.1'
args: '--no-dev --prefer-dist --optimize-autoloader'
dev: no
progress: yes
php_extensions: imagick gd gmp- Have
maatwebsite/excelin your composer.json with the version^3.1. - Run the GitHub Actions workflow.
Actual behavior:
The workflow fails with the error that the PHP version does not meet the maatwebsite/excel requirement, even though PHP 8.1 should be compatible with ^7.0||^8.0.
Additional context:
- I verified that
maatwebsite/excelsupports PHP 8.0 and above (according to itscomposer.json), and my project should be compatible with PHP 8.1. - I am using PHP 8.1.31 for this workflow.
Environment:
- PHP version: 8.1.31
- GitHub Action:
php-actions/composer@v6 - OS: Ubuntu
Metadata
Metadata
Assignees
Labels
No labels