Skip to content

Commit

Permalink
Add support for Symfony 7 (#314)
Browse files Browse the repository at this point in the history
* Add support for Symfony 7

* Fixed tests

* Added return types

* Fix: Update CHANGELOG.md

---------

Co-authored-by: Andreas Möller <[email protected]>
  • Loading branch information
kristoftorfs and localheinz authored Dec 5, 2023
1 parent 79d161b commit c41e5b9
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

For a full diff see [`6.3.0...main`][6.3.0...main].

### Added

- Added support for `symfony/console:^7.0.0`, `symfony/filesystem:^7.0.0`, and `symfony/finder:^7.0.0` ([#314]), by [@kristoftorfs]

## [`6.3.0`][6.3.0]

For a full diff see [`6.2.0...6.3.0`][6.2.0...6.3.0].
Expand Down Expand Up @@ -165,6 +169,8 @@ For a full diff see [`b139b06...1.0.0`][b139b06...1.0.0].

[#270]: https://github.com/friendsoftwig/twigcs/pull/270
[#296]: https://github.com/friendsoftwig/twigcs/pull/296
[#314]: https://github.com/friendsoftwig/twigcs/pull/314

[@kristoftorfs]: https://github.com/kristoftorfs
[@localheinz]: https://github.com/localheinz
[@rajeshreeputra]: https://github.com/rajeshreeputra
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"symfony/console": "^4.4 || ^5.3 || ^6.0",
"symfony/filesystem": "^4.4 || ^5.3 || ^6.0",
"symfony/finder": "^4.4 || ^5.3 || ^6.0"
"symfony/console": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/filesystem": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/finder": "^4.4 || ^5.3 || ^6.0 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^9.6.15",
Expand Down
16 changes: 5 additions & 11 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@
<InvalidMethodCall>
<code>getRealPath</code>
</InvalidMethodCall>
<MissingReturnType>
<code>configure</code>
</MissingReturnType>
<MixedArgument>
<code>$file</code>
<code>$finder</code>
Expand Down Expand Up @@ -153,13 +150,10 @@
<code>validate</code>
</MixedMethodCall>
<PossiblyInvalidArgument>
<code>str_replace(getcwd(), '', $realPath)</code>
<code><![CDATA[str_replace(getcwd(), '', $realPath)]]></code>
</PossiblyInvalidArgument>
</file>
<file src="src/Console/RegDebugCommand.php">
<MissingReturnType>
<code>configure</code>
</MissingReturnType>
<MixedArgument>
<code><![CDATA[$error->getColumn()]]></code>
<code><![CDATA[$error->getReason()]]></code>
Expand Down Expand Up @@ -1466,8 +1460,8 @@
</file>
<file src="src/TwigPort/TwigLexer.php">
<InvalidLiteralArgument>
<code>'([{'</code>
<code>')]}'</code>
<code><![CDATA['([{']]></code>
<code><![CDATA[')]}']]></code>
</InvalidLiteralArgument>
<MissingParamType>
<code>$state</code>
Expand Down Expand Up @@ -1787,8 +1781,8 @@
<code>skipToOneOf</code>
</MissingReturnType>
<MixedArrayAccess>
<code>$possibility['type']</code>
<code>$possibility['value']</code>
<code><![CDATA[$possibility['type']]]></code>
<code><![CDATA[$possibility['value']]]></code>
</MixedArrayAccess>
<MixedAssignment>
<code>$possibility</code>
Expand Down
6 changes: 3 additions & 3 deletions src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public function __construct(bool $singleCommand = true)
$this->setDefaultCommand($command->getName(), $singleCommand);
}

public function add(Command $command)
public function add(Command $command): ?Command
{
parent::add($command);

if ($command instanceof ContainerAwareCommand) {
$command->setContainer($this->container);
}

return parent::add($command);
}
}
4 changes: 2 additions & 2 deletions src/Console/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LintCommand extends ContainerAwareCommand
*/
public const DISPLAY_ALL = 'all';

public function configure()
public function configure(): void
{
$this
->setName('lint')
Expand All @@ -40,7 +40,7 @@ public function configure()
;
}

public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$container = $this->getContainer();

Expand Down
4 changes: 2 additions & 2 deletions src/Console/RegDebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class RegDebugCommand extends ContainerAwareCommand
{
public function configure()
public function configure(): void
{
$this
->setName('reg:debug')
Expand All @@ -25,7 +25,7 @@ public function configure()
;
}

public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);

Expand Down

0 comments on commit c41e5b9

Please sign in to comment.