Skip to content

Commit

Permalink
Allow installation with symfony 6 remove support for PHP 7.3 and lower (
Browse files Browse the repository at this point in the history
#23)

* Allow installation with symfony 6

* Test against PHP 8.0 and PHP 8.1

* Update php-cs-fixer config

* Fix compatibility of massive output formatter

* Remove support for PHP 7.3 and lower

* Fix lowest dependencies
  • Loading branch information
alexander-schranz authored Apr 21, 2022
1 parent 0a4471f commit e9b85c6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ jobs:
php-cs-fixer: false

- php-version: '7.4'
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: false

- php-version: '8.0'
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: false

- php-version: '8.1'
dependency-versions: 'highest'
tools: 'composer:v2'
php-cs-fixer: true
Expand Down
9 changes: 6 additions & 3 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
$finder = PhpCsFixer\Finder::create()
->in(__DIR__);

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
$config = new PhpCsFixer\Config();
$config->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
Expand All @@ -23,11 +23,14 @@
'header_comment' => ['header' => $header],
'native_constant_invocation' => true,
'native_function_casing' => true,
'native_function_invocation' => true,
'native_function_invocation' => ['include' => ['@internal']],
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true],
'ordered_imports' => true,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_types_order' => false,
'single_line_throw' => false,
'single_line_comment_spacing' => false,
])
->setFinder($finder);

return $config;
2 changes: 1 addition & 1 deletion Console/MassiveOutputFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function setIndentLevel($level)
$this->indentLevel = $level;
}

public function format($message)
public function format($message): ?string
{
$out = parent::format($message);
if (!$this->isDecorated()) {
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"license": "MIT",
"require": {
"php": ">=7.2.0",
"symfony/console": "^4.3 || ^5.0",
"symfony/config": "^4.3 || ^5.0",
"symfony/dependency-injection": "^4.3 || ^5.0",
"symfony/framework-bundle": "^4.3 || ^5.0"
"symfony/console": "^4.3 || ^5.0 || ^6.0",
"symfony/config": "^4.3 || ^5.0 || ^6.0",
"symfony/dependency-injection": "^4.3 || ^5.0 || ^6.0",
"symfony/framework-bundle": "^4.3 || ^5.0 || ^6.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.0.4",
"symfony/phpunit-bridge": "^5.0.4 || ^6.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.0"
},
"autoload": {
Expand Down

0 comments on commit e9b85c6

Please sign in to comment.