Skip to content

Commit 4471114

Browse files
authored
Run all tests for all Laravel versions (#94)
1 parent f03718e commit 4471114

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/php.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ jobs:
1010

1111

1212
build:
13-
name: Liquetsoft FIAS (PHP ${{ matrix.php-versions }})
13+
name: Liquetsoft FIAS (PHP ${{ matrix.php-versions }}, Laravel ${{ matrix.laravel-versions }})
1414
runs-on: ubuntu-latest
1515
strategy:
1616
fail-fast: true
1717
matrix:
18-
php-versions: ['8.2']
18+
php-versions: ['8.2', '8.3']
19+
laravel-versions: ['^9.0', '^10.0', '^11.0']
1920
steps:
2021
- uses: actions/checkout@v2
2122
- name: Install PHP
@@ -24,14 +25,20 @@ jobs:
2425
php-version: ${{ matrix.php-versions }}
2526
- name: Check PHP Version
2627
run: php -v
27-
- name: Validate composer.json and composer.lock
28+
- name: Validate composer.json
2829
run: composer validate
30+
- name: Set up Laravel components versions
31+
run: "sed -i -E \"s#\\\"(laravel/.+)\\\".*:.*\\\"(.+)\\\"#\\\"\\1\\\":\\\"${{ matrix.laravel-versions }}\\\"#g\" composer.json"
32+
- name: Set up Illuminate components versions
33+
run: "sed -i -E \"s#\\\"(illuminate/.+)\\\".*:.*\\\"(.+)\\\"#\\\"\\1\\\":\\\"${{ matrix.laravel-versions }}\\\"#g\" composer.json"
34+
- name: Show composer.json
35+
run: cat composer.json
2936
- name: Cache Composer packages
3037
id: composer-cache
3138
uses: actions/cache@v2
3239
with:
3340
path: vendor
34-
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json') }}
41+
key: ${{ runner.os }}-php-${{ matrix.php-versions }}-laravel-${{ matrix.laravel-versions }}-${{ hashFiles('**/composer.json') }}
3542
restore-keys: |
3643
${{ runner.os }}-php-
3744
- name: Install dependencies
@@ -63,8 +70,8 @@ jobs:
6370
strategy:
6471
fail-fast: false
6572
matrix:
66-
php-version: ['8.2']
67-
laravel-version: ['^8.0', '^9.0', '^10.0', '^11.0']
73+
php-version: ['8.2', '8.3']
74+
laravel-version: ['^9.0', '^10.0', '^11.0']
6875
steps:
6976
- name: Checkout
7077
uses: actions/checkout@v2

src/Serializer/EloquentDenormalizer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ private function createDataArrayForModel(array $data, Model $entity): array
9292

9393
/**
9494
* Пробует преобразовать имя параметра так, чтобы получить соответствие из модели.
95+
*
96+
* @psalm-suppress MixedArgument
9597
*/
9698
private function mapParameterNameToModelAttributeName(string $name, Model $entity): ?string
9799
{

0 commit comments

Comments
 (0)