doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.77k stars 224 forks source link

return type class-string[] causes issues with phpstan #339

Closed MattNunnWork closed 4 years ago

MattNunnWork commented 4 years ago

https://github.com/doctrine/data-fixtures/blob/265b209150ce6bfa22c3825bfcd512f5b5c32d3b/lib/Doctrine/Common/DataFixtures/DependentFixtureInterface.php#L16

When running PHPstan against my codebase in strict mode, due to the return type now being class-string[] rather than array the following errors are returned:

Return type (array) of method FIXTURENAME::getDependencies() should be compatible with return type (Doctrine\Common\DataFixtures\class) of method  
         Doctrine\Common\DataFixtures\DependentFixtureInterface::getDependencies() 

Admittedly its not a massive massive problem as we can ignore this folder for now. But ideally the return should be of a valid type, i would suggest string[] with a comment above suggesting its the FQDN of a class

greg0ire commented 4 years ago

Duplicate of #337

MattNunnWork commented 4 years ago

@greg0ire apologies, I did do a search for phpstan and Stan but nothing came up. Will close and track #337

greg0ire commented 4 years ago

No worries :)