doctrine / data-fixtures

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

Add correct return type to DependentFixtureInterface::getDependencies #332

Closed ruudk closed 4 years ago

ruudk commented 4 years ago

This makes it easier for PHPStan to understand what's going on.

alcaeus commented 4 years ago

How does PhpStorm handle the class-string type? I’m worried that it may not understand what’s going on...

ruudk commented 4 years ago

I checked. It just sees it as array of mixed, and that was already the case :)

Screenshot 2019-12-28 at 11 48 42
ruudk commented 4 years ago

I'm sure PHPStorm will soon support all the new PHPStan/Psalm notations.

alcaeus commented 4 years ago

Great. I’ll take care of this after the holidays, as I need to check the branches and do some more work here for the persistence deprecations.

I believe this should be fixed in a patch release, would you agree?

ruudk commented 4 years ago

Thanks! I agree.

greg0ire commented 4 years ago

@ruudk this means you shouldn't target master

ruudk commented 4 years ago

@greg0ire Sorry, didn't get the hint. Changed the base branch now.

greg0ire commented 4 years ago

Triggering a new build, since #333 fixed it

ruudk commented 4 years ago

@greg0ire Can we merge it? :)

greg0ire commented 4 years ago

I'm not sure: 1.3 is still maintained, isn't it affected by this too?

ruudk commented 4 years ago

@greg0ire Changed base branch and rebased it :shipit:

greg0ire commented 4 years ago

Aaaaand the test fail… please cherry-pick b7532e4, that should fix it.

ruudk commented 4 years ago

Sorry, but that's not part of this PR. Clearly 1.3.x- branch is broken. I tried to cherry pick it but that forces me to fix a merge conflict. This such a small change, that I already spend too much time on.

greg0ire commented 4 years ago

Ok don't worry, I'm going to take care of fixing the branch, just leave this open.

greg0ire commented 4 years ago

Ok so apparently it is no longer maintained (see https://github.com/doctrine/data-fixtures/pull/335), so targeting 1.4.x was the right thing to do, sorry.

greg0ire commented 4 years ago

Thanks @ruudk !

vitek-rostislav commented 4 years ago

Hi, this made my phpstan in version 0.11.6 fail on

invalid type Doctrine\Common\DataFixtures\class

:disappointed:

Luckily, upgrading to ^0.12 version helped.