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

Dismiss new PHPStan issues #424

Merged
merged 1 commit into from
Mar 28, 2024
Merged

Conversation

greg0ire
Copy link
Member

Running the latest PHPStan produces this output:

------ --------------------------------------------------------------------------------------------------------------
 Line   Loader/SymfonyFixturesLoader.php
------ --------------------------------------------------------------------------------------------------------------
 62     Call to an undefined static method Doctrine\Bundle\FixturesBundle\Loader\SymfonyBridgeLoader::addFixture().
 96     Call to an undefined static method Doctrine\Bundle\FixturesBundle\Loader\SymfonyBridgeLoader::getFixtures().
------ --------------------------------------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------------------------------------------------------------------------
 Line   Tests/Command/LoadDataFixturesDoctrineCommandTest.php
------ ------------------------------------------------------------------------------------------------------------------------------------------------
 27     Class Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader does not have a constructor and must be instantiated without any parameters.
 50     Class Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader does not have a constructor and must be instantiated without any parameters.
------ ------------------------------------------------------------------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Line   Tests/IntegrationTest.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 467    Return type mixed of method Doctrine\Bundle\FixturesBundle\Tests\ForwardCompatibleEntityManager::wrapInTransaction() is not covariant with return type mixed of method Doctrine\ORM\EntityManagerInterface::wrapInTransaction().
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

All of them happen in the context of compatibility layers. The last one cannot be ignored for some reason.

Running the latest PHPStan produces this output:

```
------ --------------------------------------------------------------------------------------------------------------
 Line   Loader/SymfonyFixturesLoader.php
------ --------------------------------------------------------------------------------------------------------------
 62     Call to an undefined static method Doctrine\Bundle\FixturesBundle\Loader\SymfonyBridgeLoader::addFixture().
 96     Call to an undefined static method Doctrine\Bundle\FixturesBundle\Loader\SymfonyBridgeLoader::getFixtures().
------ --------------------------------------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------------------------------------------------------------------------
 Line   Tests/Command/LoadDataFixturesDoctrineCommandTest.php
------ ------------------------------------------------------------------------------------------------------------------------------------------------
 27     Class Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader does not have a constructor and must be instantiated without any parameters.
 50     Class Doctrine\Bundle\FixturesBundle\Loader\SymfonyFixturesLoader does not have a constructor and must be instantiated without any parameters.
------ ------------------------------------------------------------------------------------------------------------------------------------------------

------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Line   Tests/IntegrationTest.php
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 467    Return type mixed of method Doctrine\Bundle\FixturesBundle\Tests\ForwardCompatibleEntityManager::wrapInTransaction() is not covariant with return type mixed of method Doctrine\ORM\EntityManagerInterface::wrapInTransaction().
------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```

All of them happen in the context of compatibility layers. The last one
cannot be ignored for some reason.
Copy link
Member

@SenseException SenseException left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last one cannot be ignored for some reason.

If PHPStan itself is even telling this and suggests excludePaths, then this will be the route to go.

@greg0ire greg0ire merged commit e1db891 into doctrine:3.5.x Mar 28, 2024
13 checks passed
@greg0ire greg0ire deleted the baseline-issues branch March 28, 2024 06:50
@greg0ire greg0ire added this to the 3.5.2 milestone Mar 28, 2024
@greg0ire
Copy link
Member Author

Yes, that was the case.

@greg0ire greg0ire modified the milestones: 3.5.2, 3.6.0 May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants