Skip to content

Commit

Permalink
Merge pull request #472 from greg0ire/4.0.x
Browse files Browse the repository at this point in the history
Merge 3.7.x up into 4.0.x
  • Loading branch information
greg0ire authored Nov 29, 2024
2 parents 92dab4e + 360ea9e commit 2f7d3c5
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 32 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion .github/workflows/release-on-milestone-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 0 additions & 1 deletion .symfony.bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -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
19 changes: 0 additions & 19 deletions psalm.xml

This file was deleted.

4 changes: 3 additions & 1 deletion src/Command/LoadDataFixturesDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/Loader/SymfonyFixturesLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class SymfonyFixturesLoader extends Loader
/**
* @internal
*
* @psalm-param list<array{fixture: FixtureInterface, groups: list<string>}> $fixtures
* @phpstan-param list<array{fixture: FixtureInterface, groups: list<string>}> $fixtures
*/
public function addFixtures(array $fixtures): void
{
Expand Down Expand Up @@ -135,7 +135,7 @@ private function addGroupsFixtureMapping(string $className, array $groups): void
/**
* Collect any dependent fixtures from the given classes.
*
* @psalm-return array<string,true>
* @phpstan-return array<string,true>
*/
private function collectDependencies(string ...$fixtureClass): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Purger/PurgerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

interface PurgerFactory
{
/** @psalm-param list<string> $excluded */
/** @phpstan-param list<string> $excluded */
public function createForEntityManager(
string|null $emName,
EntityManagerInterface $em,
Expand Down

0 comments on commit 2f7d3c5

Please sign in to comment.