Skip to content

Commit d4092c6

Browse files
committed
Add composer normalizer
1 parent 5865b15 commit d4092c6

File tree

3 files changed

+428
-19
lines changed

3 files changed

+428
-19
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
php-versions:
15-
- "7.4"
16-
- "8.0"
17-
- "8.1"
15+
- '7.4'
16+
- '8.0'
17+
- '8.1'
1818

1919
steps:
2020
- name: Checkout
@@ -42,6 +42,10 @@ jobs:
4242
- name: Install dependencies
4343
run: composer install
4444

45+
- name: Normalize composer.json
46+
if: matrix.php-versions == '8.1'
47+
run: composer normalize --dry-run
48+
4549
- name: PHP-CS-Fixer
4650
if: matrix.php-versions == '8.1'
4751
run: vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr

composer.json

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"name": "ely/php-code-style",
33
"description": "Set of PHP-CS-Fixer rules used in the development of Ely.by PHP projects",
4-
"keywords": ["php-cs-fixer", "code style"],
5-
"homepage": "https://github.com/elyby/php-code-style",
4+
"license": "Apache-2.0",
5+
"type": "library",
6+
"keywords": [
7+
"php-cs-fixer",
8+
"code style"
9+
],
610
"authors": [
711
{
812
"name": "Ely.by team",
@@ -13,25 +17,20 @@
1317
"email": "erickskrauch@ely.by"
1418
}
1519
],
16-
"license": "Apache-2.0",
17-
"type": "library",
20+
"homepage": "https://github.com/elyby/php-code-style",
1821
"require": {
19-
"php": "^7.4|^8.0",
22+
"php": "^7.4 || ^8.0",
2023
"friendsofphp/php-cs-fixer": "^3"
2124
},
2225
"require-dev": {
23-
"phpunit/phpunit": "^9.5",
26+
"ergebnis/composer-normalize": "^2.28",
27+
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
2428
"phpspec/prophecy": "^1.15",
2529
"phpspec/prophecy-phpunit": "^2.0",
26-
"phpunitgoodpractices/traits": "^1.9.1",
27-
"symfony/phpunit-bridge": "^6.0",
30+
"phpunit/phpunit": "^9.5",
2831
"phpunitgoodpractices/polyfill": "^1.5",
29-
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2"
30-
},
31-
"config": {
32-
"preferred-install": {
33-
"friendsofphp/php-cs-fixer": "source"
34-
}
32+
"phpunitgoodpractices/traits": "^1.9.1",
33+
"symfony/phpunit-bridge": "^6.0"
3534
},
3635
"autoload": {
3736
"psr-4": {
@@ -43,5 +42,13 @@
4342
"Ely\\CS\\Test\\": "tests/",
4443
"PhpCsFixer\\Tests\\": "vendor/friendsofphp/php-cs-fixer/tests/"
4544
}
45+
},
46+
"config": {
47+
"allow-plugins": {
48+
"ergebnis/composer-normalize": true
49+
},
50+
"preferred-install": {
51+
"friendsofphp/php-cs-fixer": "source"
52+
}
4653
}
4754
}

0 commit comments

Comments
 (0)