Skip to content

Commit f37464a

Browse files
authored
Merge branch 'master' into weird-behavior-of-has-page-fields
2 parents 095e7dc + 1c46382 commit f37464a

File tree

408 files changed

+2845
-2385
lines changed

Some content is hidden

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

408 files changed

+2845
-2385
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ init:
1111

1212
install:
1313
- ps: Set-Service wuauserv -StartupType Manual
14-
- cinst -y php --version=7.4
14+
- cinst -y php --version=8.0
1515
- cinst -y composer
1616
- refreshenv
17-
- cd c:\tools\php74
17+
- cd c:\tools\php80
1818
- copy php.ini-production php.ini /Y
1919
- echo date.timezone="UTC" >> php.ini
2020
- echo extension_dir=ext >> php.ini

.dockerignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
/*
2-
!/lib/
32
!/src/
43
!/tests/
5-
!/benchmarks/
64
!/composer.json
75
!/phpunit.xml.*
86
!/phpstan*.neon
97
!/.php_cs.*
10-
!/phpbench.json

.gitattributes

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
/docs export-ignore
12
/tests export-ignore
23
/benchmarks export-ignore
3-
.gitattributes export-ignore
4-
.gitignore export-ignore
5-
.editorconfig export-ignore
4+
.* export-ignore
5+
*.neon export-ignore
66
phpunit.xml.dist export-ignore
7+
Dockerfile export-ignore

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ updates:
33
- package-ecosystem: composer
44
directory: '/'
55
schedule:
6-
interval: monthly
6+
interval: daily
77
open-pull-requests-limit: 5

.github/workflows/ci.yml

Lines changed: 59 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -2,167 +2,114 @@ name: CI
22

33
on:
44
pull_request:
5-
branches:
6-
- "*.*"
7-
- master
85
push:
96
branches:
107
- "*.*"
118
- master
12-
13-
env:
14-
COMPOSER_ROOT_VERSION: "1.4"
9+
schedule:
10+
- cron: "0 4 * * *"
1511

1612
jobs:
17-
build:
18-
runs-on: ubuntu-16.04
13+
tests:
14+
runs-on: ubuntu-20.04
1915
strategy:
2016
fail-fast: false
2117
matrix:
18+
php-version:
19+
- '8.0'
20+
- '8.1'
21+
symfony-version:
22+
- '5.4.*'
23+
- '6.0.*'
24+
dependencies:
25+
- 'lowest'
26+
- 'highest'
27+
remove-dependencies: [ '' ]
28+
coverage: [ 'none' ]
2229
include:
23-
- php-version: 7.4
24-
symfony-version: "4.4.*"
25-
26-
- php-version: 7.4
27-
symfony-version: "4.4.*"
28-
validator: false
29-
30-
- php-version: 7.4
31-
symfony-version: "5.0.*"
32-
33-
- php-version: 7.4
34-
symfony-version: "5.1.*"
35-
36-
- php-version: 7.4
37-
symfony-version: "5.2.*"
38-
39-
- php-version: 8.0
40-
symfony-version: "5.2.*"
41-
42-
name: "PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }} Test"
43-
30+
- php-version: '8.0'
31+
symfony-version: '5.4.*'
32+
dependencies: 'lowest'
33+
remove-dependencies: '--dev symfony/validator doctrine/orm doctrine/annotations'
34+
- php-version: '8.1'
35+
symfony-version: '5.4.*'
36+
dependencies: 'lowest'
37+
coverage: "pcov"
4438
steps:
4539
- name: "Checkout"
4640
uses: "actions/checkout@v2"
47-
with:
48-
fetch-depth: 50
4941

50-
- name: "Install PHP without coverage"
42+
- name: "Install PHP"
5143
uses: "shivammathur/setup-php@v2"
5244
with:
45+
tools: flex
5346
php-version: "${{ matrix.php-version }}"
54-
coverage: "none"
55-
56-
- name: "Cache dependencies installed with composer"
57-
uses: "actions/cache@v2"
58-
with:
59-
path: "~/.composer/cache"
60-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
61-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
47+
coverage: "${{ matrix.coverage }}"
6248

6349
- name: "Change stability"
64-
if: matrix.stability != ''
65-
run: perl -pi -e 's/^}$/,"minimum-stability":"'"${{ matrix.minimum-stability }}"'"}/' composer.json
66-
67-
- name: "Symfony version"
68-
if: matrix.symfony-version != ''
69-
run: perl -pi -e 's#"(symfony/.*)":\s*".*"#"$1":"'"${{ matrix.symfony-version }}"'"#' composer.json
70-
71-
- name: "PhpUnit version"
72-
if: matrix.phpunit-version != ''
73-
run: composer req "phpunit/phpunit:${{ matrix.phpunit-version }}" --dev --no-update
50+
if: "matrix.stability != ''"
51+
run: perl -pi -e 's/^}$/,"minimum-stability":"'"${{ matrix.minimum-stability }}"'"}/' composer.json && cat composer.json
7452

7553
- name: "Webonyx GraphQL version"
76-
if: matrix.graphql-version != ''
77-
run: composer req "webonyx/graphql-php:${{ matrix.graphql-version }}" --dev --no-update
54+
if: "matrix.graphql-version != ''"
55+
run: composer require "webonyx/graphql-php:${{ matrix.graphql-version }}" --dev --no-update
7856

79-
- name: "Disabled validator if needed"
80-
if: matrix.validator == false
81-
run: composer remove "symfony/validator" --dev --no-update;
57+
- name: Remove dependencies
58+
if: "matrix.remove-dependencies != ''"
59+
run: composer remove --no-update ${{ matrix.remove-dependencies }}
8260

8361
- name: "Install dependencies"
84-
run: composer update --no-interaction --no-progress ${{ matrix.composer-flags }}
85-
86-
- name: "Set USE_EXPERIMENTAL_EXECUTOR if needed"
87-
if: matrix.experimental-executor != ''
88-
run: export USE_EXPERIMENTAL_EXECUTOR=${{ matrix.experimental-executor }}
89-
90-
- name: "Set SYMFONY_DEPRECATIONS_HELPER if needed"
91-
if: matrix.symfony-deprecation-helper != ''
92-
run: export SYMFONY_DEPRECATIONS_HELPER=${{ matrix.symfony-deprecation-helper }}
62+
uses: ramsey/composer-install@v2
63+
with:
64+
dependency-versions: ${{ matrix.dependencies }}
65+
env:
66+
SYMFONY_REQUIRE: "${{ matrix.symfony-version }}"
9367

9468
- name: "Run tests"
9569
run: composer test
9670

71+
- name: "Upload coverage results to Coveralls"
72+
if: "matrix.coverage == 'pcov'"
73+
env:
74+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
run: |
76+
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.1/php-coveralls.phar
77+
php php-coveralls.phar --coverage_clover=build/logs/clover.xml -v
9778
coding-standard:
98-
runs-on: ubuntu-16.04
79+
runs-on: ubuntu-20.04
9980
name: Coding Standard
10081
steps:
10182
- name: "Checkout"
10283
uses: "actions/checkout@v2"
103-
with:
104-
fetch-depth: 50
10584

106-
- name: "Install PHP without coverage"
85+
- name: "Install PHP"
10786
uses: "shivammathur/setup-php@v2"
10887
with:
109-
php-version: "7.4"
110-
coverage: "none"
111-
112-
- name: "Cache dependencies installed with composer"
113-
uses: "actions/cache@v2"
114-
with:
115-
path: "~/.composer/cache"
116-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
117-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
88+
tools: flex
89+
php-version: "8.1"
11890

11991
- name: "Install dependencies"
120-
run: composer update --no-interaction --no-progress
92+
uses: ramsey/composer-install@v2
12193

12294
- name: "Check coding standard"
12395
run: composer check-cs
12496

125-
benchmark:
126-
runs-on: ubuntu-16.04
127-
name: Benchmark
128-
steps:
129-
- name: "Checkout"
130-
uses: "actions/checkout@v2"
131-
with:
132-
fetch-depth: 50
133-
134-
- name: "Install PHP without coverage"
135-
uses: "shivammathur/setup-php@v2"
136-
with:
137-
php-version: "7.4"
138-
coverage: "none"
139-
140-
- name: "Cache dependencies installed with composer"
141-
uses: "actions/cache@v2"
142-
with:
143-
path: "~/.composer/cache"
144-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
145-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
146-
147-
- name: "Install dependencies"
148-
run: composer update --no-interaction --no-progress
149-
150-
- name: "Run benchmark"
151-
run: composer bench
152-
15397
static-analysis:
154-
runs-on: ubuntu-16.04
98+
runs-on: ubuntu-20.04
15599
name: "Static analysis"
100+
strategy:
101+
fail-fast: false
102+
matrix:
103+
php-version:
104+
- '8.1'
156105
steps:
157106
- name: "Checkout"
158107
uses: "actions/checkout@v2"
159-
with:
160-
fetch-depth: 50
161108

162-
- name: "Install PHP with coverage"
109+
- name: "Install PHP"
163110
uses: "shivammathur/setup-php@v2"
164111
with:
165-
php-version: "7.4"
112+
php-version: ${{ matrix.php-version }}
166113
coverage: "none"
167114

168115
- name: "Cache dependencies installed with composer"
@@ -173,49 +120,7 @@ jobs:
173120
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
174121

175122
- name: "Install dependencies"
176-
run: composer update --no-interaction --no-progress
123+
uses: ramsey/composer-install@v2
177124

178125
- name: "Run static-analysis"
179126
run: composer static-analysis
180-
181-
coverage:
182-
runs-on: ubuntu-16.04
183-
name: "Coverage"
184-
steps:
185-
- name: "Checkout"
186-
uses: "actions/checkout@v2"
187-
with:
188-
fetch-depth: 50
189-
190-
- name: "Install PHP with coverage"
191-
uses: "shivammathur/setup-php@v2"
192-
with:
193-
php-version: "8.0"
194-
ini-values: pcov.directory=.
195-
coverage: "pcov"
196-
197-
- name: "Cache dependencies installed with composer"
198-
uses: "actions/cache@v2"
199-
with:
200-
path: "~/.composer/cache"
201-
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
202-
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
203-
204-
- name: "Install Ocular as depencies"
205-
run: composer req "scrutinizer/ocular" --dev --no-update
206-
207-
- name: "Install dependencies"
208-
run: composer update --no-interaction --no-progress
209-
210-
- name: "Run tests with coverage"
211-
run: bin/phpunit --color=always -v --debug --coverage-clover=build/logs/clover.xml
212-
213-
- name: "Upload coverage results to Scrutinizer"
214-
run: vendor/scrutinizer/ocular/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml
215-
216-
- name: "Upload coverage results to Coveralls"
217-
env:
218-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
219-
run: |
220-
composer global require php-coveralls/php-coveralls
221-
php-coveralls --coverage_clover=build/logs/clover.xml -v

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ phpunit.xml
55
/bin
66
composer.lock
77
composer.phar
8-
.php_cs.cache
9-
.php_cs
10-
.phpunit.result.cache
8+
/.php-cs-fixer.php
9+
/*.cache
1110

1211
phpbench.phar
1312
phpbench.phar.*

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,34 @@
66
->in([__DIR__.'/src', __DIR__.'/tests'])
77
;
88

9-
return PhpCsFixer\Config::create()
9+
return (new PhpCsFixer\Config())
1010
->setRules(
1111
[
1212
'@Symfony' => true,
13-
'@PHP74Migration' => true,
14-
'@PHP74Migration:risky' => true,
13+
'@PHP80Migration' => true,
14+
'@PHP80Migration:risky' => true,
1515
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
16-
'general_phpdoc_annotation_remove' => ['author', 'category', 'copyright', 'created', 'license', 'package', 'since', 'subpackage', 'version'],
16+
'general_phpdoc_annotation_remove' => [
17+
'annotations' => [
18+
'author',
19+
'category',
20+
'copyright',
21+
'created',
22+
'license',
23+
'package',
24+
'since',
25+
'subpackage',
26+
'version',
27+
],
28+
],
1729
'fully_qualified_strict_types' => true,
1830
'single_line_throw' => false,
1931
'phpdoc_to_comment' => false,
2032
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
2133
'global_namespace_import' => ['import_functions' => true, 'import_classes' => true, 'import_constants' => true],
2234
'phpdoc_summary' => false,
23-
'hash_to_slash_comment' => false,
2435
'single_line_comment_style' => false,
25-
'phpdoc_no_alias_tag' => ['type' => 'var'],
36+
'phpdoc_no_alias_tag' => ['replacements' => ['type' => 'var']],
2637
'no_mixed_echo_print' => ['use' => 'echo'],
2738
]
2839
)

.scrutinizer.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)