Skip to content

Commit

Permalink
Support for Symfony 7 (#592)
Browse files Browse the repository at this point in the history
* Wip

* Update

* Fix

* Fix
  • Loading branch information
VincentLanglet authored Dec 4, 2023
1 parent 3961b61 commit a6d49f6
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
allowed-to-fail: false
symfony-require: 6.3.*
variant: symfony/symfony:"6.3.*"
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.0.*
variant: symfony/symfony:"7.0.*"

steps:
- name: Checkout
Expand Down
26 changes: 13 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
"doctrine/orm": "^2.14",
"doctrine/persistence": "^3.0",
"psr/clock": "^1.0",
"symfony/config": "^5.4 || ^6.2",
"symfony/dependency-injection": "^5.4 || ^6.2",
"symfony/http-kernel": "^5.4 || ^6.2",
"symfony/security-core": "^5.4 || ^6.2",
"symfony/config": "^5.4 || ^6.2 || ^7.0",
"symfony/dependency-injection": "^5.4 || ^6.2 || ^7.0",
"symfony/http-kernel": "^5.4 || ^6.2 || ^7.0",
"symfony/security-core": "^5.4 || ^6.2 || ^7.0",
"twig/twig": "^3.0"
},
"require-dev": {
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-fixtures-bundle": "^3.4",
"friendsofphp/php-cs-fixer": "^3.4",
"gedmo/doctrine-extensions": "^3.7",
"matthiasnoback/symfony-dependency-injection-test": "^4.2.1",
"matthiasnoback/symfony-dependency-injection-test": "^4.2.1 || ^5.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-doctrine": "^1.3.12",
Expand All @@ -38,15 +38,15 @@
"psalm/plugin-phpunit": "^0.18",
"psalm/plugin-symfony": "^5.0",
"rector/rector": "^0.18",
"symfony/browser-kit": "^5.4 || ^6.2",
"symfony/cache": "^5.4 || ^6.2",
"symfony/filesystem": "^5.4 || ^6.2",
"symfony/framework-bundle": "^5.4 || ^6.2",
"symfony/http-foundation": "^5.4 || ^6.2",
"symfony/browser-kit": "^5.4 || ^6.2 || ^7.0",
"symfony/cache": "^5.4 || ^6.2 || ^7.0",
"symfony/filesystem": "^5.4 || ^6.2 || ^7.0",
"symfony/framework-bundle": "^5.4 || ^6.2 || ^7.0",
"symfony/http-foundation": "^5.4 || ^6.2 || ^7.0",
"symfony/phpunit-bridge": "^6.2",
"symfony/security-bundle": "^5.4 || ^6.2",
"symfony/twig-bundle": "^5.4 || ^6.2",
"symfony/var-dumper": "^5.4 || ^6.2",
"symfony/security-bundle": "^5.4 || ^6.2 || ^7.0",
"symfony/twig-bundle": "^5.4 || ^6.2 || ^7.0",
"symfony/var-dumper": "^5.4 || ^6.2 || ^7.0",
"vimeo/psalm": "^5.7",
"weirdan/doctrine-psalm-plugin": "^2.8"
},
Expand Down
6 changes: 2 additions & 4 deletions src/Action/CompareAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ public function __construct(
public function __invoke(Request $request, string $className, string $id, ?int $oldRev = null, ?int $newRev = null): Response
{
if (null === $oldRev) {
$oldRev = $request->query->get('oldRev');
\assert(null !== $oldRev);
$oldRev = $request->query->getInt('oldRev');
}

if (null === $newRev) {
$newRev = $request->query->get('newRev');
\assert(null !== $newRev);
$newRev = $request->query->getInt('newRev');
}

$diff = $this->auditReader->diff($className, $id, $oldRev, $newRev);
Expand Down
6 changes: 2 additions & 4 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ class Configuration implements ConfigurationInterface
];

/**
* @psalm-suppress PossiblyNullReference, UndefinedInterfaceMethod
* @psalm-suppress UndefinedInterfaceMethod
*
* @see https://github.com/psalm/psalm-plugin-symfony/issues/174
*
* @return TreeBuilder
*/
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$builder = new TreeBuilder('simple_things_entity_audit');
$rootNode = $builder->getRootNode();
Expand Down

0 comments on commit a6d49f6

Please sign in to comment.