Skip to content

Commit bdbce46

Browse files
author
Samuel Nogueira
committed
Added support for diactoros v2.
* Main workflow now tests both 1.8 and 2.0 versions of laminas diactoros for each PHP version. * Use `update` instead of `install` to install composer dependencies to allow `--with` param. This change will also address the following warning in workflow, since composer.lock file is not in version control: > No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
1 parent 513c7e9 commit bdbce46

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
php: [7.4, 8.0, 8.1]
12+
diactoros: ['diactoros:^1.8.7', 'diactoros:^2.0']
1213

1314
steps:
1415
- name: Checkout code
@@ -42,11 +43,11 @@ jobs:
4243

4344
- name: Install dependencies on PHP 7
4445
if: matrix.php < 8
45-
run: composer install --prefer-dist --no-progress --no-interaction --no-suggest
46+
run: composer update --prefer-dist --no-progress --no-interaction --no-suggest --with='laminas/laminas-${{ matrix.diactoros }}'
4647

4748
- name: Install dependencies on PHP 8
4849
if: matrix.php >= 8
49-
run: composer install --prefer-dist --no-progress --no-interaction --ignore-platform-req=php
50+
run: composer update --prefer-dist --no-progress --no-interaction --ignore-platform-req=php --with='laminas/laminas-${{ matrix.diactoros }}'
5051

5152
- name: Run test suite
5253
run: php vendor/bin/codecept run functional -c framework-tests

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"codeception/lib-innerbrowser": "^1.0",
1717
"codeception/codeception": "^4.0",
1818
"container-interop/container-interop": "^1.2",
19-
"laminas/laminas-diactoros": "^1.8.7",
19+
"laminas/laminas-diactoros": "^1.8.7 || ^2.0",
2020
"mezzio/mezzio": "^3.0"
2121
},
2222
"require-dev": {

0 commit comments

Comments
 (0)