Skip to content

Commit 23b1a93

Browse files
authored
Merge pull request #2051 from XWB/csfixer
Update to CS Fixer 2
2 parents ddc3fd3 + 9081f8d commit 23b1a93

File tree

5 files changed

+39
-14
lines changed

5 files changed

+39
-14
lines changed

.php_cs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<?php
22

3-
use Symfony\CS\Fixer\Contrib\HeaderCommentFixer;
4-
5-
$finder = Symfony\CS\Finder\DefaultFinder::create()
6-
->in(__DIR__)
7-
->exclude('features/fixtures/TestApp/cache')
8-
;
9-
103
$header = <<<EOF
114
This file is part of the FOSRestBundle package.
125
@@ -16,10 +9,14 @@ For the full copyright and license information, please view the LICENSE
169
file that was distributed with this source code.
1710
EOF;
1811

19-
HeaderCommentFixer::setHeader($header);
20-
21-
return Symfony\CS\Config\Config::create()
22-
->setUsingCache(true)
23-
->fixers(['-psr0'])
24-
->finder($finder)
12+
return PhpCsFixer\Config::create()
13+
->setRules(array(
14+
'psr0' => true,
15+
'header_comment' => ['header' => $header],
16+
))
17+
->setRiskyAllowed(true)
18+
->setFinder(
19+
PhpCsFixer\Finder::create()
20+
->in(__DIR__)
21+
)
2522
;

Tests/Fixtures/Controller/ParamConverterController.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the FOSRestBundle package.
5+
*
6+
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace FOS\RestBundle\Tests\Fixtures\Controller;
413

514
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;

Tests/Functional/app/Configuration/security.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the FOSRestBundle package.
5+
*
6+
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Security\Core\Security;
413
use Symfony\Component\Security\Http\Controller\UserValueResolver;
514

Tests/Functional/app/ConfigurationWithTwig/security.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the FOSRestBundle package.
5+
*
6+
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
use Symfony\Component\Security\Core\Security;
413
use Symfony\Component\Security\Http\Controller\UserValueResolver;
514

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
"phpoption/phpoption": "^1.1",
6363
"jms/serializer-bundle": "^2.3.1|^3.0",
6464
"jms/serializer": "^1.13|^2.0",
65-
"psr/http-message": "^1.0"
65+
"psr/http-message": "^1.0",
66+
"friendsofphp/php-cs-fixer": "^2.0"
6667
},
6768
"suggest": {
6869
"sensio/framework-extra-bundle": "Add support for the request body converter and the view response listener, requires ^3.0",

0 commit comments

Comments
 (0)