Skip to content

Commit c7ae1b9

Browse files
authored
Normalize composer.json (#649)
* Remove cs2pr for phpcs * Add more cs tools * Normalize composer.json * Disable xdebug * Rename github action job for cs
1 parent 17b808c commit c7ae1b9

File tree

2 files changed

+44
-27
lines changed

2 files changed

+44
-27
lines changed
Lines changed: 14 additions & 5 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,19 @@ 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+
tools: 'composer-normalize, php-cs-fixer:2.16.4'
1718
env:
1819
update: true
1920

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

composer.json

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
"name": "friendsofsymfony/oauth-server-bundle",
33
"type": "symfony-bundle",
44
"description": "Symfony2 OAuth Server Bundle",
5-
"keywords": ["oauth", "oauth2", "server"],
5+
"keywords": [
6+
"oauth",
7+
"oauth2",
8+
"server"
9+
],
610
"homepage": "http://friendsofsymfony.github.com",
711
"license": "MIT",
812
"authors": [
913
{
10-
"name": "Arnaud Le Blanc",
11-
"email": "[email protected]"
14+
"name": "Arnaud Le Blanc",
15+
"email": "[email protected]"
1216
},
1317
{
1418
"name": "FriendsOfSymfony Community",
@@ -18,40 +22,36 @@
1822
"require": {
1923
"php": "^7.1",
2024
"friendsofsymfony/oauth2-php": "~1.1",
21-
"symfony/dependency-injection": "~3.0|~4.0",
22-
"symfony/framework-bundle": "~3.0|~4.0",
23-
"symfony/security-bundle": "~3.0|~4.0"
25+
"symfony/dependency-injection": "~3.0 || ~4.0",
26+
"symfony/framework-bundle": "~3.0 || ~4.0",
27+
"symfony/security-bundle": "~3.0 || ~4.0"
2428
},
2529
"require-dev": {
2630
"doctrine/doctrine-bundle": "~1.0",
2731
"doctrine/mongodb-odm": "~1.0",
2832
"doctrine/orm": "~2.2",
2933
"phing/phing": "~2.4",
30-
"php-mock/php-mock-phpunit": "~1.0|~2.0",
34+
"php-mock/php-mock-phpunit": "~1.0 || ~2.0",
3135
"phpstan/phpstan-phpunit": "~0.9",
3236
"phpstan/phpstan-shim": "~0.9",
33-
"phpunit/phpunit": "~5.0|~6.0",
37+
"phpunit/phpunit": "~5.0 || ~6.0",
3438
"propel/propel1": "~1.6",
35-
"symfony/class-loader": "~3.0|~4.0",
36-
"symfony/console": "~3.0|~4.0",
37-
"symfony/form": "~3.0|~4.0",
38-
"symfony/phpunit-bridge": "~3.0|~4.0",
39-
"symfony/templating": "~3.0|~4.0",
40-
"symfony/twig-bundle": "~3.0|^4.0",
41-
"symfony/yaml": "~3.0|~4.0",
39+
"symfony/class-loader": "~3.0 || ~4.0",
40+
"symfony/console": "~3.0 || ~4.0",
41+
"symfony/form": "~3.0 || ~4.0",
42+
"symfony/phpunit-bridge": "~3.0 || ~4.0",
43+
"symfony/templating": "~3.0 || ~4.0",
44+
"symfony/twig-bundle": "~3.0 || ^4.0",
45+
"symfony/yaml": "~3.0 || ~4.0",
4246
"willdurand/propel-typehintable-behavior": "~1.0"
4347
},
4448
"suggest": {
4549
"doctrine/doctrine-bundle": "*",
4650
"doctrine/mongodb-odm-bundle": "*",
4751
"propel/propel-bundle": "If you want to use Propel with Symfony2, then you will have to install the PropelBundle",
48-
"willdurand/propel-typehintable-behavior": "The Typehintable behavior is useful to add type hints on generated methods, to be compliant with interfaces",
49-
"symfony/form" : "Needed to be able to use the AuthorizeFormType",
50-
"symfony/console": "Needed to be able to use commands"
51-
},
52-
"autoload": {
53-
"psr-4": { "FOS\\OAuthServerBundle\\": "" },
54-
"exclude-from-classmap": ["/Tests/"]
52+
"symfony/console": "Needed to be able to use commands",
53+
"symfony/form": "Needed to be able to use the AuthorizeFormType",
54+
"willdurand/propel-typehintable-behavior": "The Typehintable behavior is useful to add type hints on generated methods, to be compliant with interfaces"
5555
},
5656
"config": {
5757
"sort-packages": true
@@ -60,5 +60,13 @@
6060
"branch-alias": {
6161
"dev-master": "2.0.x-dev"
6262
}
63+
},
64+
"autoload": {
65+
"psr-4": {
66+
"FOS\\OAuthServerBundle\\": ""
67+
},
68+
"exclude-from-classmap": [
69+
"/Tests/"
70+
]
6371
}
6472
}

0 commit comments

Comments
 (0)