Skip to content
This repository was archived by the owner on Jul 22, 2022. It is now read-only.

Commit 97080e8

Browse files
SonataCIjordisala1991
authored andcommitted
DevKit updates
1 parent eaa4b5f commit 97080e8

7 files changed

+55
-37
lines changed

.github/workflows/documentation.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Python 3.7
2525
uses: actions/setup-python@v2
2626
with:
27-
python-version: '3.7'
27+
python-version: 3.7
2828

2929
- name: Display Python version
3030
run: python -c "import sys; print(sys.version)"
@@ -57,4 +57,4 @@ jobs:
5757
with:
5858
args: --short --error-format=github
5959
env:
60-
DOCS_DIR: 'docs/'
60+
DOCS_DIR: docs/

.github/workflows/lint.yaml

+23-9
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,38 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v2
2323

24-
- name: Run PHP-CS-Fixer
25-
uses: docker://oskarstark/php-cs-fixer-ga:3.0.0
24+
- name: Install PHP with extensions
25+
uses: shivammathur/setup-php@v2
2626
with:
27-
args: --ansi --verbose --diff --dry-run
27+
php-version: 7.4
28+
coverage: none
29+
tools: composer:v2, php-cs-fixer:3
30+
env:
31+
COMPOSER_TOKEN: $
2832

29-
composer-normalize:
30-
name: composer-normalize
33+
- name: Lint PHP files
34+
run: make lint-php
35+
36+
composer:
37+
name: Composer
3138

3239
runs-on: ubuntu-latest
3340

3441
steps:
3542
- name: Checkout
3643
uses: actions/checkout@v2
3744

38-
- name: Run composer-normalize
39-
uses: docker://ergebnis/composer-normalize-action:0.8.0
45+
- name: Install PHP with extensions
46+
uses: shivammathur/setup-php@v2
4047
with:
41-
args: --dry-run
48+
php-version: 7.4
49+
coverage: none
50+
tools: composer:v2, composer-normalize:2
51+
env:
52+
COMPOSER_TOKEN: $
53+
54+
- name: Lint Composer
55+
run: make lint-composer
4256

4357
yaml-files:
4458
name: YAML files
@@ -52,7 +66,7 @@ jobs:
5266
- name: Install Ruby 2.6
5367
uses: actions/setup-ruby@v1
5468
with:
55-
ruby-version: '2.6'
69+
ruby-version: 2.6
5670

5771
- name: Install required gem
5872
run: gem install yaml-lint

.github/workflows/stale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: Stale
88

99
on:
1010
schedule:
11-
- cron: "0 9-18 * * *"
11+
- cron: 0 9-18 * * *
1212

1313
jobs:
1414
stale:

.github/workflows/test.yaml

+14-14
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,26 @@ jobs:
2525
strategy:
2626
matrix:
2727
php-version:
28-
- '7.3'
29-
- '7.4'
28+
- 7.3
29+
- 7.4
3030
dependencies: [highest]
3131
allowed-to-fail: [false]
32-
symfony-require: [""]
32+
symfony-require: ['']
3333
variant: [normal]
3434
include:
35-
- php-version: '7.3'
35+
- php-version: 7.3
3636
dependencies: lowest
3737
allowed-to-fail: false
3838
variant: normal
39-
- php-version: '8.0'
39+
- php-version: 8.0
4040
dependencies: highest
4141
allowed-to-fail: true
4242
variant: normal
43-
- php-version: '7.4'
43+
- php-version: 7.4
4444
dependencies: highest
4545
allowed-to-fail: false
4646
symfony-require: 4.4.*
47-
variant: 'symfony/symfony:"4.4.*"'
47+
variant: symfony/symfony:"4.4.*"
4848

4949
steps:
5050
- name: Checkout
@@ -64,9 +64,9 @@ jobs:
6464
if: matrix.php-version == '8.0'
6565
run: composer config platform.php 7.4.99
6666

67-
- name: "Globally install symfony/flex"
67+
- name: Globally install symfony/flex
6868
if: matrix.symfony-require != ''
69-
run: "composer global require --no-progress --no-scripts --no-plugins symfony/flex"
69+
run: composer global require --no-progress --no-scripts --no-plugins symfony/flex
7070

7171
- name: Install variant
7272
if: matrix.variant != 'normal' && !startsWith(matrix.variant, 'symfony/symfony')
@@ -79,16 +79,16 @@ jobs:
7979
if: matrix.symfony-require == '6.0.*'
8080
run: composer remove vimeo/psalm psalm/plugin-phpunit psalm/plugin-symfony weirdan/doctrine-psalm-plugin --dev --no-update --no-interaction
8181

82-
- name: "Install Composer dependencies (${{ matrix.dependencies }})"
83-
uses: "ramsey/composer-install@v1"
82+
- name: Install Composer dependencies (${{ matrix.dependencies }})
83+
uses: ramsey/composer-install@v1
8484
with:
85-
dependency-versions: "${{ matrix.dependencies }}"
86-
composer-options: "--prefer-dist --prefer-stable"
85+
dependency-versions: ${{ matrix.dependencies }}
86+
composer-options: --prefer-dist --prefer-stable
8787

8888
- name: Run Tests with coverage
8989
run: make coverage
9090

9191
- name: Send coverage to Codecov
92-
uses: codecov/codecov-action@v1
92+
uses: codecov/codecov-action@v2
9393
with:
9494
file: build/logs/clover.xml

.php-cs-fixer.dist.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@
2424
'@PHPUnit60Migration:risky' => true,
2525
'@Symfony' => true,
2626
'@Symfony:risky' => true,
27-
'array_syntax' => [
28-
'syntax' => 'short',
29-
],
27+
'array_syntax' => ['syntax' => 'short'],
3028
'combine_consecutive_issets' => true,
3129
'combine_consecutive_unsets' => true,
3230
'compact_nullable_typehint' => true,
3331
'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false],
34-
'header_comment' => [
35-
'header' => $header,
36-
],
32+
'header_comment' => ['header' => $header],
3733
'list_syntax' => ['syntax' => 'short'],
3834
'logical_operators' => true,
3935
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
@@ -56,6 +52,7 @@
5652
'static_lambda' => true,
5753
'strict_comparison' => true,
5854
'strict_param' => true,
55+
'types_spaces' => ['space' => 'single'],
5956
'void_return' => false,
6057
];
6158

Makefile

+8-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ lint: lint-composer lint-yaml lint-xml lint-xliff lint-php
1010
.PHONY: lint
1111

1212
lint-composer:
13+
composer-normalize --dry-run
1314
composer validate
1415
.PHONY: lint-composer
1516

@@ -46,7 +47,7 @@ lint-php:
4647
php-cs-fixer fix --ansi --verbose --diff --dry-run
4748
.PHONY: lint-php
4849

49-
cs-fix: cs-fix-php cs-fix-xml cs-fix-xliff
50+
cs-fix: cs-fix-php cs-fix-xml cs-fix-xliff cs-fix-composer
5051
.PHONY: cs-fix
5152

5253
cs-fix-php:
@@ -73,15 +74,19 @@ cs-fix-xliff:
7374
done
7475
.PHONY: cs-fix-xliff
7576

77+
cs-fix-composer:
78+
composer-normalize
79+
.PHONY: cs-fix-composer
80+
7681
build:
7782
mkdir $@
7883

7984
test:
80-
vendor/bin/simple-phpunit -c phpunit.xml.dist
85+
vendor/bin/phpunit -c phpunit.xml.dist
8186
.PHONY: test
8287

8388
coverage:
84-
vendor/bin/simple-phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
89+
vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
8590
.PHONY: coverage
8691

8792
docs:

phpunit.xml.dist

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ It's auto-generated by sonata-project/dev-kit package.
2626
</include>
2727
</coverage>
2828

29+
<listeners>
30+
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
31+
</listeners>
32+
2933
<php>
3034
<ini name="precision" value="8" />
3135
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
32-
<env name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
3336
</php>
34-
3537
</phpunit>

0 commit comments

Comments
 (0)