diff --git a/.gitattributes b/.gitattributes
index fc0636b..9777239 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -6,5 +6,3 @@
/phpunit.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore
-/psalm.xml export-ignore
-/psalm-baseline.xml export-ignore
diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml
index 9fb3dc0..3857b06 100644
--- a/.github/workflows/coding-standards.yml
+++ b/.github/workflows/coding-standards.yml
@@ -12,4 +12,4 @@ on:
jobs:
coding-standards:
name: "Coding Standards"
- uses: "doctrine/.github/.github/workflows/coding-standards.yml@5.3.0"
+ uses: "doctrine/.github/.github/workflows/coding-standards.yml@6.0.0"
diff --git a/.github/workflows/release-on-milestone-closed.yml b/.github/workflows/release-on-milestone-closed.yml
index 429cc0b..af9efcd 100644
--- a/.github/workflows/release-on-milestone-closed.yml
+++ b/.github/workflows/release-on-milestone-closed.yml
@@ -8,7 +8,7 @@ on:
jobs:
release:
name: "Git tag, release & create merge-up PR"
- uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@5.3.0"
+ uses: "doctrine/.github/.github/workflows/release-on-milestone-closed.yml@6.0.0"
secrets:
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml
index 1097318..20a3e5c 100644
--- a/.github/workflows/static-analysis.yml
+++ b/.github/workflows/static-analysis.yml
@@ -11,4 +11,4 @@ on:
jobs:
static-analysis:
- uses: "doctrine/.github/.github/workflows/static-analysis.yml@5.3.0"
+ uses: "doctrine/.github/.github/workflows/phpstan.yml@6.0.0"
diff --git a/.symfony.bundle.yaml b/.symfony.bundle.yaml
index 736b508..8ce96f9 100644
--- a/.symfony.bundle.yaml
+++ b/.symfony.bundle.yaml
@@ -5,7 +5,6 @@ branches:
- "3.6.x"
- "3.7.x"
maintained_branches:
- - "3.6.x"
- "3.7.x"
doc_dir: "docs/"
dev_branch: "3.7.x"
diff --git a/composer.json b/composer.json
index 5b64aa0..be1f773 100644
--- a/composer.json
+++ b/composer.json
@@ -36,8 +36,7 @@
"doctrine/coding-standard": "^12",
"phpstan/phpstan": "^1.10.39",
"phpunit/phpunit": "^9.6.13",
- "symfony/phpunit-bridge": "^6.3.6",
- "vimeo/psalm": "^5.15"
+ "symfony/phpunit-bridge": "^6.3.6"
},
"conflict": {
"doctrine/dbal": "< 3"
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index bd05ce9..5d69bf4 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -1,6 +1,21 @@
parameters:
ignoreErrors:
+ -
+ message: "#^Method class@anonymous/src/Command/LoadDataFixturesDoctrineCommand\\.php\\:121\\:\\:log\\(\\) has parameter \\$message with no type specified\\.$#"
+ count: 1
+ path: src/Command/LoadDataFixturesDoctrineCommand.php
+
+ -
+ message: "#^Method Doctrine\\\\Bundle\\\\FixturesBundle\\\\Loader\\\\SymfonyFixturesLoader\\:\\:createFixture\\(\\) has parameter \\$class with no type specified\\.$#"
+ count: 1
+ path: src/Loader/SymfonyFixturesLoader.php
+
-
message: "#^Constructor of class Doctrine\\\\Bundle\\\\FixturesBundle\\\\Tests\\\\Fixtures\\\\FooBundle\\\\DataFixtures\\\\RequiredConstructorArgsFixtures has an unused parameter \\$fooRequiredArg\\.$#"
count: 1
path: tests/Fixtures/FooBundle/DataFixtures/RequiredConstructorArgsFixtures.php
+
+ -
+ message: "#^Method Doctrine\\\\Bundle\\\\FixturesBundle\\\\Tests\\\\IntegrationTestKernel\\:\\:registerBundles\\(\\) return type has no value type specified in iterable type array\\.$#"
+ count: 1
+ path: tests/IntegrationTestKernel.php
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index ff48748..45296fa 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -1,9 +1,12 @@
parameters:
phpVersion: 80100
- level: 3
+ level: 7
paths:
- src
- tests
+ excludePaths:
+ # Contains an issue that cannot be ignored
+ - tests/IntegrationTest.php
includes:
- phpstan-baseline.neon
diff --git a/psalm.xml b/psalm.xml
deleted file mode 100644
index beb81ad..0000000
--- a/psalm.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Command/LoadDataFixturesDoctrineCommand.php b/src/Command/LoadDataFixturesDoctrineCommand.php
index 65a3a40..9744621 100644
--- a/src/Command/LoadDataFixturesDoctrineCommand.php
+++ b/src/Command/LoadDataFixturesDoctrineCommand.php
@@ -10,6 +10,7 @@
use Doctrine\Bundle\FixturesBundle\Purger\ORMPurgerFactory;
use Doctrine\Bundle\FixturesBundle\Purger\PurgerFactory;
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
+use Doctrine\Common\DataFixtures\Purger\ORMPurgerInterface;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ManagerRegistry;
use Psr\Log\AbstractLogger;
@@ -109,12 +110,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$factory = $this->purgerFactories[$input->getOption('purger')];
}
- $purger = $factory->createForEntityManager(
+ $purger = $factory->createForEntityManager(
$input->getOption('em'),
$em,
$input->getOption('purge-exclusions'),
$input->getOption('purge-with-truncate'),
);
+ assert($purger instanceof ORMPurgerInterface);
$executor = new ORMExecutor($em, $purger);
$executor->setLogger(new class ($ui) extends AbstractLogger {
public function __construct(private SymfonyStyle $ui)
diff --git a/src/Loader/SymfonyFixturesLoader.php b/src/Loader/SymfonyFixturesLoader.php
index c77a840..5558b82 100644
--- a/src/Loader/SymfonyFixturesLoader.php
+++ b/src/Loader/SymfonyFixturesLoader.php
@@ -28,7 +28,7 @@ final class SymfonyFixturesLoader extends Loader
/**
* @internal
*
- * @psalm-param list}> $fixtures
+ * @phpstan-param list}> $fixtures
*/
public function addFixtures(array $fixtures): void
{
@@ -135,7 +135,7 @@ private function addGroupsFixtureMapping(string $className, array $groups): void
/**
* Collect any dependent fixtures from the given classes.
*
- * @psalm-return array
+ * @phpstan-return array
*/
private function collectDependencies(string ...$fixtureClass): array
{
diff --git a/src/Purger/PurgerFactory.php b/src/Purger/PurgerFactory.php
index 41b0c86..86410e5 100644
--- a/src/Purger/PurgerFactory.php
+++ b/src/Purger/PurgerFactory.php
@@ -9,7 +9,7 @@
interface PurgerFactory
{
- /** @psalm-param list $excluded */
+ /** @phpstan-param list $excluded */
public function createForEntityManager(
string|null $emName,
EntityManagerInterface $em,