Skip to content

Commit

Permalink
Switch to non-deprecated Extension class (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus authored May 14, 2024
1 parent fa16f0d commit 715b62c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
8 changes: 2 additions & 6 deletions DependencyInjection/DoctrineMigrationsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

use function array_keys;
use function assert;
Expand All @@ -30,16 +30,12 @@
use function strlen;
use function substr;

/**
* DoctrineMigrationsExtension.
*/
class DoctrineMigrationsExtension extends Extension
{
/**
* Responds to the migrations configuration parameter.
*
* @param mixed[][] $configs
* @psalm-param array<string, array<string, array<string, array<string, string>|string>|string>> $configs
* {@inheritDoc}
*/
public function load(array $configs, ContainerBuilder $container): void
{
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ parameters:
# That file contains an error that cannot be ignored
- Tests/Fixtures/Migrations/ContainerAwareMigration.php

ignoreErrors:
- '~Parameter \#1 \$configs.*DoctrineMigrationsExtension::load.*~'

includes:
- phpstan-baseline.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
Expand Down
7 changes: 1 addition & 6 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.23.1@8471a896ccea3526b26d082f4461eeea467f10a4">
<files psalm-version="5.24.0@462c80e31c34e58cc4f750c656be3927e80e550e">
<file src="DependencyInjection/Configuration.php">
<UndefinedInterfaceMethod>
<code><![CDATA[end]]></code>
</UndefinedInterfaceMethod>
</file>
<file src="DependencyInjection/DoctrineMigrationsExtension.php">
<MoreSpecificImplementedParamType>
<code><![CDATA[$configs]]></code>
</MoreSpecificImplementedParamType>
</file>
<file src="MigrationsFactory/ContainerAwareMigrationFactory.php">
<ContainerDependency>
<code><![CDATA[ContainerInterface $container]]></code>
Expand Down

0 comments on commit 715b62c

Please sign in to comment.