Skip to content

Commit 78d8dff

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/http-client-test-coverage
# Conflicts: # .github/workflows/phpstan-5.yaml # .github/workflows/phpstan-7.yaml # .github/workflows/phpstan-8.yaml # .github/workflows/quality.yaml # composer.json # composer.lock # infection.json.dist # rector.php # src/Builder/AlternativeLookup.php # src/Builder/Capacity/Extractor/All.php # src/Builder/Capacity/Extractor/ListPerPage.php # src/Builder/Capacity/Loader/Upsert.php # src/Builder/Capacity/Lookup/All.php # src/Builder/Capacity/Lookup/ListPerPage.php # src/Builder/Client.php # src/Builder/ConditionalLookup.php # src/Builder/Extractor.php # src/Builder/Loader.php # src/Builder/Lookup.php # src/Capacity/Extractor/All.php # src/Capacity/Extractor/ListPerPage.php # src/Capacity/Lookup/All.php # src/Capacity/Lookup/Download.php # src/Capacity/Lookup/ListPerPage.php # src/Configuration.php # src/Configuration/Extractor.php # src/Configuration/Loader.php # src/Configuration/Lookup.php # src/Factory/Client.php # src/Factory/Extractor.php # src/Factory/Loader.php # src/Factory/Lookup.php # src/Factory/Search.php # tests/functional/Builder/BuilderTestCase.php # tests/functional/Capacity/Extractor/AllTest.php # tests/functional/Capacity/Extractor/ListPerPageTest.php # tests/functional/Capacity/Lookup/AllTest.php # tests/functional/Capacity/Lookup/DownloadTest.php # tests/functional/Capacity/Lookup/ListPerPageTest.php # tests/functional/Configuration/LookupTest.php # tests/functional/Factory/ExtractorTest.php # tests/functional/Factory/LoaderTest.php # tests/functional/Factory/LookupTest.php # tests/functional/Factory/Repository/ExtractorTest.php # tests/functional/Factory/Repository/LoaderTest.php # tests/functional/Factory/Repository/LookupTest.php # tests/functional/Mock/ExceptionBuilder.php # tests/functional/Mock/HttpClientBuilder.php # tests/functional/Mock/RequestMatcher/RequestMatcherBuilder.php # tests/functional/Mock/ResponseBuilder.php # tests/functional/ServiceTest.php
2 parents 303db3a + 93e913e commit 78d8dff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+3019
-2419
lines changed

.github/workflows/infection.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
name: Mutations
1+
name: Infection
22
on: push
33
jobs:
44
infection:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
7+
- uses: actions/checkout@v3
88
- uses: shivammathur/setup-php@v2
99
with:
10-
php-version: '8.1'
10+
php-version: '8.2'
1111
tools: composer:v2
1212
coverage: pcov
13-
- uses: actions/cache@v2
13+
- uses: actions/cache@v3
1414
with:
1515
path: '**/vendor'
1616
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
1717
restore-keys: |
1818
${{ runner.os }}-composer-
19-
- uses: php-actions/composer@v5
19+
- uses: php-actions/composer@v6
2020
with:
21-
args: --prefer-dist
22-
php_version: 8.1
21+
args: --prefer-dist --ignore-platform-reqs
22+
php_version: '8.2'
2323

2424
- name: Infection
2525
run: |
26-
wget -q https://github.com/infection/infection/releases/download/0.26.10/infection.phar
27-
wget -q https://github.com/infection/infection/releases/download/0.26.10/infection.phar.asc
26+
wget -q https://github.com/infection/infection/releases/download/0.26.21/infection.phar
27+
wget -q https://github.com/infection/infection/releases/download/0.26.21/infection.phar.asc
2828
chmod +x infection.phar
2929
./infection.phar
3030

.github/workflows/phpstan-5.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
name: PHPStan level 5
22
on: push
33
jobs:
4-
phpstan:
4+
phpstan5:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/cache@v2
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
99
with:
1010
path: '**/vendor'
1111
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
1212
restore-keys: |
1313
${{ runner.os }}-composer-
14-
- uses: php-actions/composer@v5
14+
- uses: php-actions/composer@v6
1515
with:
1616
args: --prefer-dist
17-
php_version: 8.1
18-
17+
php_version: '8.2'
1918
- name: PHPStan
20-
uses: php-actions/phpstan@v2
19+
uses: php-actions/phpstan@v3
2120
with:
2221
path: src/
23-
args: --level=5
24-
php_version: 8.1
22+
level: 5
23+
php_version: '8.2'

.github/workflows/phpstan-6.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PHPStan level 6
2+
on: push
3+
jobs:
4+
phpstan6:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
9+
with:
10+
path: '**/vendor'
11+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12+
restore-keys: |
13+
${{ runner.os }}-composer-
14+
- uses: php-actions/composer@v6
15+
with:
16+
args: --prefer-dist
17+
php_version: '8.2'
18+
- name: PHPStan
19+
uses: php-actions/phpstan@v3
20+
with:
21+
path: src/
22+
level: 6
23+
php_version: '8.2'

.github/workflows/phpstan-7.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
name: PHPStan level 7
22
on: push
33
jobs:
4-
phpstan:
4+
phpstan7:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/cache@v2
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
99
with:
1010
path: '**/vendor'
1111
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
1212
restore-keys: |
1313
${{ runner.os }}-composer-
14-
- uses: php-actions/composer@v5
14+
- uses: php-actions/composer@v6
1515
with:
1616
args: --prefer-dist
17-
php_version: 8.1
18-
17+
php_version: '8.2'
1918
- name: PHPStan
20-
uses: php-actions/phpstan@v2
19+
uses: php-actions/phpstan@v3
2120
with:
2221
path: src/
23-
args: --level=5
24-
php_version: 8.1
22+
level: 7
23+
php_version: '8.2'

.github/workflows/phpstan-8.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
name: PHPStan level 8
22
on: push
33
jobs:
4-
phpstan:
4+
phpstan8:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/cache@v2
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
99
with:
1010
path: '**/vendor'
1111
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
1212
restore-keys: |
1313
${{ runner.os }}-composer-
14-
- uses: php-actions/composer@v5
14+
- uses: php-actions/composer@v6
1515
with:
1616
args: --prefer-dist
17-
php_version: 8.1
18-
17+
php_version: '8.2'
1918
- name: PHPStan
20-
uses: php-actions/phpstan@v2
19+
uses: php-actions/phpstan@v3
2120
with:
2221
path: src/
23-
args: --level=5
24-
php_version: 8.1
22+
level: 8
23+
php_version: '8.2'

.github/workflows/phpunit.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PHPUnit
2+
on: push
3+
jobs:
4+
phpunit:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: shivammathur/setup-php@v2
9+
with:
10+
php-version: '8.2'
11+
tools: composer:v2
12+
coverage: pcov
13+
- uses: actions/cache@v3
14+
with:
15+
path: '**/vendor'
16+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
17+
restore-keys: |
18+
${{ runner.os }}-composer-
19+
- uses: php-actions/composer@v6
20+
with:
21+
args: --prefer-dist
22+
php_version: '8.2'
23+
24+
- name: Run tests & generate Coverage
25+
run: bin/phpunit --coverage-html var/coverage
26+
27+
- name: Store coverage files
28+
uses: actions/upload-artifact@v3
29+
with:
30+
path: var/coverage

.github/workflows/quality.yaml

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,37 @@
1-
name: Quality
1+
name: Quality (PHPStan lvl 4)
22
on: push
33
jobs:
44
cs-fixer:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
7+
- uses: actions/checkout@v3
8+
- uses: shivammathur/setup-php@v2
9+
with:
10+
php-version: '8.2'
11+
coverage: none
812
- name: Cs-Fixer
913
run: |
1014
wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer
1115
chmod a+x php-cs-fixer
1216
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run
1317
14-
phpunit:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v2
18-
- uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: '8.1'
21-
tools: composer:v2
22-
coverage: pcov
23-
- uses: actions/cache@v2
24-
with:
25-
path: '**/vendor'
26-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
27-
restore-keys: |
28-
${{ runner.os }}-composer-
29-
- uses: php-actions/composer@v5
30-
with:
31-
args: --prefer-dist
32-
php_version: 8.1
33-
34-
- name: Run tests & generate Coverage
35-
run: bin/phpunit --configuration=phpunit.xml tests --coverage-html var/coverage --whitelist=src
36-
37-
- name: Store coverage files
38-
uses: actions/upload-artifact@v2
39-
with:
40-
path: var/coverage
41-
4218
phpstan:
4319
runs-on: ubuntu-latest
4420
steps:
45-
- uses: actions/checkout@v2
46-
- uses: actions/cache@v2
21+
- uses: actions/checkout@v3
22+
- uses: actions/cache@v3
4723
with:
4824
path: '**/vendor'
4925
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
5026
restore-keys: |
5127
${{ runner.os }}-composer-
52-
- uses: php-actions/composer@v5
28+
- uses: php-actions/composer@v6
5329
with:
5430
args: --prefer-dist
55-
php_version: 8.1
56-
31+
php_version: '8.2'
5732
- name: PHPStan
58-
uses: php-actions/phpstan@v2
33+
uses: php-actions/phpstan@v3
5934
with:
6035
path: src/
61-
args: --level=4
62-
php_version: 8.1
36+
level: 4
37+
php_version: '8.2'

.github/workflows/rector.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# github action that checks code with Rector
2+
name: Rector
3+
4+
on: pull_request
5+
6+
jobs:
7+
rector:
8+
# Don't run on forks.
9+
if: github.repository == 'php-etl/akeneo-plugin'
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
uses: actions/checkout@v3
14+
15+
-
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: '8.2'
19+
coverage: none
20+
21+
- uses: "ramsey/composer-install@v2"
22+
23+
- run: bin/rector --ansi
24+
25+
-
26+
# commit only to core contributors who have repository access
27+
if: github.event.pull_request.head.repo.full_name == github.repository
28+
uses: stefanzweifel/git-auto-commit-action@v4
29+
with:
30+
commit_message: '[rector] Rector fixes'
31+
commit_author: 'GitHub Action <actions@github.com>'
32+
commit_user_email: 'action@github.com'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/vendor/
2+
/.php-cs-fixer.cache
3+
/bin/

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
return (new PhpCsFixer\Config())
88
->setRiskyAllowed(true)
99
->setRules([
10+
'@PHP82Migration' => true,
1011
'@PHP81Migration' => true,
1112
'@PHP80Migration:risky' => true,
1213
'@PHPUnit84Migration:risky' => true,

0 commit comments

Comments
 (0)