Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove baseline #473

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
UPGRADE to 4.0
==============

## Type declarations

Type declarations have been added everywhere. Types extending or implementing
types from this bundle need to be updated to match the new signatures.

## Final classes

Some classes have been marked as `final` because they are not supposed to be
Expand Down Expand Up @@ -39,7 +44,7 @@ services:
and so no longer have a ``$this->container`` property. You *can* manually
implement this interface. Or, a better idea is to update your fixtures
to use dependency injection:

```diff
class MyFixture extends Fixture
{
Expand All @@ -61,7 +66,7 @@ class MyFixture extends Fixture
* The base ``Fixture`` class no longer implements ``DependentFixtureInterface``.
If you want to have a ``getDependencies()`` method, be sure to implement
this interface explicitly:

```diff
+ use Doctrine\Common\DataFixtures\DependentFixtureInterface;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"doctrine/doctrine-bundle": "^2.2",
"doctrine/orm": "^2.14.0 || ^3.0",
"doctrine/persistence": "^2.4 || ^3.0",
"psr/log": "^1 || ^2 || ^3",
"psr/log": "^2 || ^3",
"symfony/config": "^5.4 || ^6.0 || ^7.0",
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0",
Expand Down
25 changes: 0 additions & 25 deletions phpstan-baseline.neon

This file was deleted.

6 changes: 0 additions & 6 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,3 @@ parameters:
paths:
- src
- tests
excludePaths:
# Contains an issue that cannot be ignored
- tests/IntegrationTest.php

includes:
- phpstan-baseline.neon
3 changes: 2 additions & 1 deletion src/Command/LoadDataFixturesDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\Persistence\ManagerRegistry;
use Psr\Log\AbstractLogger;
use Stringable;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down Expand Up @@ -123,7 +124,7 @@ public function __construct(private SymfonyStyle $ui)
}

/** {@inheritDoc} */
public function log($level, $message, array $context = []): void
public function log(mixed $level, string|Stringable $message, array $context = []): void
{
$this->ui->text(sprintf(' <comment>></comment> <info>%s</info>', $message));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Loader/SymfonyFixturesLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function addFixture(FixtureInterface $fixture): void
* Overridden to not allow new fixture classes to be instantiated.
* {@inheritDoc}
*/
protected function createFixture($class): FixtureInterface
protected function createFixture(string $class): FixtureInterface
{
/*
* We don't actually need to create the fixture. We just
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class RequiredConstructorArgsFixtures implements ORMFixtureInterface
{
public function __construct(string $fooRequiredArg)
public function __construct(public string $fooRequiredArg)
{
}

Expand Down
3 changes: 3 additions & 0 deletions tests/IntegrationTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Kernel;

use function rand;
Expand All @@ -35,6 +36,8 @@ protected function getContainerClass(): string

/**
* {@inheritDoc}
*
* @return array<mixed, BundleInterface>
*/
public function registerBundles(): array
{
Expand Down