Skip to content

Commit e07d0f8

Browse files
committed
Finished the implementation
1 parent a7ebbff commit e07d0f8

File tree

5 files changed

+189
-120
lines changed

5 files changed

+189
-120
lines changed

.php_cs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
#!/usr/bin/env php
22
<?php
3+
4+
$finder = PhpCsFixer\Finder::create()
5+
->files()
6+
->name('*.php')
7+
->name('*.twig')
8+
->in('app/Resources')
9+
->in('src')
10+
->append([
11+
'web/app.php',
12+
'web/app_dev.php',
13+
])
14+
;
15+
316
return PhpCsFixer\Config::create()
417
->setRiskyAllowed(true)
518
->setRules([
619
'@Symfony' => true,
720
'@Symfony:risky' => true,
821
'array_syntax' => ['syntax' => 'short'],
22+
'no_useless_else' => true,
23+
'no_useless_return' => true,
924
'ordered_imports' => true,
1025
'phpdoc_order' => true,
26+
'php_unit_strict' => true,
27+
'strict_comparison' => true,
1128
])
12-
->setFinder(
13-
PhpCsFixer\Finder::create()
14-
->ignoreDotFiles(true)
15-
->ignoreVCS(true)
16-
->exclude('app/config')
17-
->exclude('app/data')
18-
->exclude('app/Resources')
19-
->exclude('var')
20-
->exclude('vendor')
21-
->exclude('web/bundles')
22-
->exclude('web/css')
23-
->exclude('web/fonts')
24-
->exclude('web/js')
25-
->notPath('web/config.php')
26-
->in(__DIR__)
27-
)
29+
->setFinder($finder)
2830
;

composer.json

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,48 +14,49 @@
1414
"php" : ">=5.5.9",
1515
"ext-pdo_sqlite" : "*",
1616
"doctrine/doctrine-bundle" : "^1.6",
17+
"doctrine/doctrine-cache-bundle" : "^1.2",
1718
"doctrine/doctrine-fixtures-bundle" : "^2.2",
1819
"doctrine/orm" : "^2.5",
1920
"erusev/parsedown" : "^1.5",
2021
"ezyang/htmlpurifier" : "^4.7",
2122
"incenteev/composer-parameter-handler" : "^2.0",
2223
"sensio/distribution-bundle" : "^5.0",
23-
"sensio/framework-extra-bundle" : "^3.0",
24-
"symfony/monolog-bundle" : "^2.8",
24+
"sensio/framework-extra-bundle" : "^3.0.2",
25+
"symfony/monolog-bundle" : "^3.0",
26+
"symfony/polyfill-apcu" : "^1.0",
2527
"symfony/swiftmailer-bundle" : "^2.3",
2628
"symfony/symfony" : "^3.2",
2729
"twig/extensions" : "^1.3",
2830
"twig/twig" : "^1.28",
2931
"white-october/pagerfanta-bundle" : "^1.0"
3032
},
3133
"require-dev": {
32-
"friendsofphp/php-cs-fixer" : "^2.0",
33-
"phpunit/phpunit" : "^4.8 || ^5.0",
34-
"sensio/generator-bundle" : "^3.0",
35-
"symfony/phpunit-bridge" : "^3.0"
34+
"friendsofphp/php-cs-fixer": "^2.0",
35+
"phpunit/phpunit": "^4.8 || ^5.0",
36+
"sensio/generator-bundle": "^3.0",
37+
"symfony/phpunit-bridge": "^3.0"
3638
},
3739
"scripts": {
38-
"post-install-cmd": [
40+
"symfony-scripts": [
3941
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
4042
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
4143
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
4244
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
4345
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
4446
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
4547
],
48+
"post-install-cmd": [
49+
"@symfony-scripts"
50+
],
4651
"post-update-cmd": [
47-
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
48-
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
49-
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
50-
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
51-
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
52-
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
52+
"@symfony-scripts"
5353
]
5454
},
5555
"config": {
5656
"platform": {
5757
"php": "5.5.9"
58-
}
58+
},
59+
"sort-packages": true
5960
},
6061
"extra": {
6162
"symfony-app-dir": "app",

0 commit comments

Comments
 (0)