Skip to content

Commit

Permalink
Merge pull request #27 from enlightn/support_symfony6
Browse files Browse the repository at this point in the history
Support Symfony 6
  • Loading branch information
paras-malhotra committed Feb 21, 2022
2 parents dc5bce6 + 266282b commit 196bacc
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/phpunit.xml.dist export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.php_cs.dist export-ignore
/.php-cs-fixer.dist.php export-ignore
/.github export-ignore
/psalm.xml export-ignore
/psalm.xml.dist export-ignore
2 changes: 1 addition & 1 deletion .github/workflows/format_php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Run php-cs-fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs.dist
args: --config=.php-cs-fixer.dist.php

- uses: stefanzweifel/git-auto-commit-action@v4.1.0
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.idea
.php_cs
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
build
/composer.lock
Expand Down
8 changes: 4 additions & 4 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
->exclude('Fixtures')
->in([__DIR__.'/src', __DIR__.'/tests']);

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setFinder($finder)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline_array' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
Expand All @@ -23,7 +23,7 @@
'phpdoc_var_without_name' => true,
'class_attributes_separation' => [
'elements' => [
'method',
'method' => 'one',
],
],
'method_argument_space' => [
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"require": {
"php": ">=5.6",
"ext-json": "*",
"symfony/console": "^3.4|^4|^5",
"symfony/finder": "^3|^4|^5",
"symfony/process": "^3.4|^4|^5",
"symfony/yaml": "^3.4|^4|^5",
"symfony/console": "^3.4|^4|^5|^6",
"symfony/finder": "^3|^4|^5|^6",
"symfony/process": "^3.4|^4|^5|^6",
"symfony/yaml": "^3.4|^4|^5|^6",
"guzzlehttp/guzzle": "^6.3|^7.0"
},
"require-dev": {
"ext-zip" : "*",
"friendsofphp/php-cs-fixer": "^2.18",
"friendsofphp/php-cs-fixer": "^2.18|^3.0",
"phpunit/phpunit": "^5.5|^6|^7|^8|^9"
},
"bin": ["security-checker"],
Expand Down
4 changes: 2 additions & 2 deletions tests/AdvisoryParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function ignores_vulnerabilities_from_allow_list_by_vce()
$this->getAdvisoryParser();

$advisories = $this->parser->getAdvisories([
'CVE-2017-9303'
'CVE-2017-9303',
]);

$this->assertContains([
Expand Down Expand Up @@ -106,7 +106,7 @@ public function ignores_vulnerabilities_from_allow_list_by_title()
$this->getAdvisoryParser();

$advisories = $this->parser->getAdvisories([
'Risk of mass-assignment vulnerabilities'
'Risk of mass-assignment vulnerabilities',
]);

$this->assertNotContains([
Expand Down
8 changes: 4 additions & 4 deletions tests/SecurityCheckerCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public function can_allow_vulnerabilities_by_cve()
$commandTester->execute([
'lockfile' => $lockFile,
'--allow-list' => [
'CVE-2017-9841'
]
'CVE-2017-9841',
],
]);

$this->assertEquals(0, $commandTester->getStatusCode());
Expand All @@ -117,8 +117,8 @@ public function can_allow_vulnerabilities_by_title()
$commandTester->execute([
'lockfile' => $lockFile,
'--allow-list' => [
'RCE vulnerability in phpunit'
]
'RCE vulnerability in phpunit',
],
]);

$this->assertEquals(0, $commandTester->getStatusCode());
Expand Down

0 comments on commit 196bacc

Please sign in to comment.