Skip to content

Commit 22a4c66

Browse files
authored
Merge pull request #1678 from deguif/normalize-composer-json
Add new cs check for composer.json
2 parents 8fea6bd + 8381cf1 commit 22a4c66

File tree

2 files changed

+63
-33
lines changed

2 files changed

+63
-33
lines changed
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: 'Continuous integration'
22
on: ['push', 'pull_request']
33
jobs:
4-
php-cs:
4+
cs:
55
runs-on: 'ubuntu-latest'
6-
name: 'PHP coding style'
6+
name: 'Coding style'
77
steps:
88
- name: 'Checkout'
99
uses: 'actions/checkout@v2'
@@ -12,10 +12,18 @@ jobs:
1212
uses: 'shivammathur/setup-php@v2'
1313
with:
1414
php-version: '7.4'
15+
coverage: 'none'
1516
extensions: 'json, mbstring, tokenizer'
16-
tools: 'cs2pr, php-cs-fixer:2.16.4'
17-
env:
18-
update: true
17+
tools: 'composer-normalize, php-cs-fixer:2.16.4'
1918

20-
- name: 'Check coding style'
21-
run: 'php-cs-fixer fix --diff --dry-run --using-cache=false --format=checkstyle | cs2pr'
19+
- name: 'Display tools versions'
20+
run: |
21+
composer-normalize --version
22+
php-cs-fixer --version
23+
24+
- name: 'Check PHP code'
25+
run: 'php-cs-fixer fix --diff --dry-run --using-cache=false'
26+
27+
- name: 'Check composer.json'
28+
run: 'composer-normalize --diff --dry-run --no-update-lock'
29+
if: 'always()'

composer.json

Lines changed: 48 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,57 +2,79 @@
22
"name": "friendsofsymfony/elastica-bundle",
33
"type": "symfony-bundle",
44
"description": "Elasticsearch PHP integration for your Symfony project using Elastica",
5-
"keywords": ["doctrine2", "elastica", "elasticsearch", "mongodb", "search"],
5+
"keywords": [
6+
"doctrine2",
7+
"elastica",
8+
"elasticsearch",
9+
"mongodb",
10+
"search"
11+
],
612
"homepage": "https://github.com/FriendsOfSymfony/FOSElasticaBundle",
713
"license": "MIT",
814
"authors": [
9-
{ "name": "FriendsOfSymfony Community", "homepage": "https://github.com/FriendsOfSymfony/FOSElasticaBundle/contributors" },
10-
{ "name": "Tim Nagel", "email": "[email protected]" },
11-
{ "name": "Richard Miller", "email": "[email protected]" },
12-
{ "name": "Jeremy Mikola", "email": "[email protected]" }
15+
{
16+
"name": "FriendsOfSymfony Community",
17+
"homepage": "https://github.com/FriendsOfSymfony/FOSElasticaBundle/contributors"
18+
},
19+
{
20+
"name": "Tim Nagel",
21+
"email": "[email protected]"
22+
},
23+
{
24+
"name": "Richard Miller",
25+
"email": "[email protected]"
26+
},
27+
{
28+
"name": "Jeremy Mikola",
29+
"email": "[email protected]"
30+
}
1331
],
1432
"require": {
1533
"php": "^7.2",
16-
"symfony/framework-bundle": "^4.4 || ^5.1",
34+
"pagerfanta/pagerfanta": "^2.0",
35+
"psr/log": "^1.0",
36+
"ruflin/elastica": "^7.0",
1737
"symfony/console": "^4.4 || ^5.1",
1838
"symfony/dependency-injection": "^4.4 || ^5.1",
39+
"symfony/framework-bundle": "^4.4 || ^5.1",
1940
"symfony/messenger": "^4.4 || ^5.1",
20-
"symfony/property-access": "^4.4 || ^5.1",
21-
"pagerfanta/pagerfanta": "^2.0",
22-
"psr/log": "^1.0",
23-
"ruflin/elastica": "^7.0"
41+
"symfony/property-access": "^4.4 || ^5.1"
2442
},
2543
"require-dev": {
26-
"doctrine/orm": "^2.7",
2744
"doctrine/doctrine-bundle": "^2.0",
2845
"doctrine/mongodb-odm-bundle": "^4.0",
46+
"doctrine/orm": "^2.7",
2947
"doctrine/persistence": "^1.3.4",
30-
"doctrine/phpcr-bundle": "^1.3|^2.0",
48+
"doctrine/phpcr-bundle": "^1.3 || ^2.0",
3149
"doctrine/phpcr-odm": "^1.4",
50+
"friendsofphp/php-cs-fixer": "^2.2",
3251
"jackalope/jackalope-doctrine-dbal": "^1.2",
3352
"jms/serializer-bundle": "^2.3 || ^3.5",
34-
"phpunit/phpunit": "^8.5",
3553
"knplabs/knp-components": "^2.3",
36-
"symfony/expression-language" : "^4.4 || ^5.1",
37-
"symfony/twig-bundle": "^4.4 || ^5.1",
54+
"phpunit/phpunit": "^8.5",
55+
"symfony/expression-language": "^4.4 || ^5.1",
3856
"symfony/serializer": "^4.4 || ^5.1",
39-
"symfony/yaml": "^4.4 || ^5.1",
40-
"friendsofphp/php-cs-fixer": "^2.2",
41-
"symfony/web-profiler-bundle": "^4.4 || ^5.1"
57+
"symfony/twig-bundle": "^4.4 || ^5.1",
58+
"symfony/web-profiler-bundle": "^4.4 || ^5.1",
59+
"symfony/yaml": "^4.4 || ^5.1"
4260
},
4361
"suggest": {
44-
"symfony/messenger": "For populating Elasticsearch indexes asynchronously and using significanly less resources.",
45-
"enqueue/elastica-bundle": "For populating Elasticsearch indexes asynchronously and using significanly less resources. Uses Enqueue."
46-
},
47-
"autoload": {
48-
"psr-4": { "FOS\\ElasticaBundle\\": "src/" }
49-
},
50-
"autoload-dev": {
51-
"psr-4": { "FOS\\ElasticaBundle\\Tests\\": "tests/" }
62+
"enqueue/elastica-bundle": "For populating Elasticsearch indexes asynchronously and using significanly less resources. Uses Enqueue.",
63+
"symfony/messenger": "For populating Elasticsearch indexes asynchronously and using significanly less resources."
5264
},
5365
"extra": {
5466
"branch-alias": {
5567
"dev-master": "6.0.x-dev"
5668
}
69+
},
70+
"autoload": {
71+
"psr-4": {
72+
"FOS\\ElasticaBundle\\": "src/"
73+
}
74+
},
75+
"autoload-dev": {
76+
"psr-4": {
77+
"FOS\\ElasticaBundle\\Tests\\": "tests/"
78+
}
5779
}
5880
}

0 commit comments

Comments
 (0)