doctrine / data-fixtures

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

Fix return type in DependentFixtureInterface #346

Closed groovytron closed 4 years ago

groovytron commented 4 years ago

This fixes the return type in the DependentFixtureInterface's getDependencies() method. class-string[] is not a valid type and makes static code analyzers like PHPStan to fail due to this invalid type.

I hope this fix helps.

Thanks for your feedback.

greg0ire commented 4 years ago

The scrutinizer build is failing because it's using 7.4 code on a non-7.4 platform (there is an ignore-platform-reqs flag, does anyone know where it is configured?): https://github.com/Ocramius/PackageVersions/blob/master/src/PackageVersions/Installer.php#L34

SenseException commented 4 years ago

@greg0ire In Scrutinizer itself, Settings -> Configuration, but if a .scrutinizer.yml file exists in the repository, this will be used instead. We should think about versioning of Scrutinizer files in repos.

I'm not sure if it is

build:
    environment:
        php:
            version: 7.4

or

build:
    nodes:
        analysis:
            environment:
                php:
                    version: 7.4

that influences the build. I have to look into the docs for that.

groovytron commented 4 years ago

Is there something I can do to fix it in my pull request?

greg0ire commented 4 years ago

I think you should let @SenseException fix it, either by pushing the correct file or tweaking the settings. @SenseException , please do the thing.

ruudk commented 4 years ago

class-string is supported by PHPStan, see https://github.com/phpstan/phpstan/commit/77eb14115b425213e38c91cf0b105fbadcb44901

groovytron commented 4 years ago

class-string is supported by PHPStan, see phpstan/phpstan@77eb141

You are right. Updating PHPStan seems to have fixed the issue. Do you want to close this merge request then?

alcaeus commented 4 years ago

Works as expected - let's hope this is the last time we're dealing with this ;)