Closed johanadivare closed 1 year ago
OrderedFixtureInterface
doesn't extend FixtureInterface
, which probably means something like OrderedFixtureInterface&FixtureInterface
should be used somewhere.
Hard to tell where without the source code of tests/Functional/FunctionalTestCase.php
, of course.
@greg0ire this is what the class looks like:
xxx
protected function refreshFixtures(): void
{
$loader = new Doctrine\Common\DataFixtures\Loader();
$fixture = new CustomFixture();
$fixture->setContainer($this->getKernelBrowser()->getContainer());
$loader->addFixture($fixture);
$purger = new Doctrine\Common\DataFixtures\Purger\ORMPurger();
$executor = new Doctrine\Common\DataFixtures\Executor\ORMExecutor($this->getEntityManager(), $purger);
$executor->execute($loader->getFixtures());
}
Ok, so the issue is with https://github.com/doctrine/data-fixtures/blob/1a4232c15143ca3c127812d19b23a7961c41eeed/lib/Doctrine/Common/DataFixtures/Loader.php#L184
Do you feel up to making it more precise?
Kind of makes me wonder why OrderedFixtureInterface
doesn't extend FixtureInterface
in the first place though :thinking:
Ok, so the issue is with
Do you feel up to making it more precise?
Kind of makes me wonder why
OrderedFixtureInterface
doesn't extendFixtureInterface
in the first place though thinking
Yes i think its in the Loader.php
, i haven't debugged the issue much i could try to change the return types but i also wonder why that OrderedFixtureInterface
doesn't extend from FixtureInterface
haha i dont know who introduced it maybe they know best.
I saw docs updates where done in https://github.com/doctrine/data-fixtures/pull/389 but they made it consistent with the property $fixtures
docs
i dont know who introduced it maybe they know best
If only there was a way for us to know that, like some kind of code history tool :thinking:
Trolling aside it was introduced more than 10 years ago in #5 , so… long shot, but @l3pp4rd , super long shot, but maybe you have some input you can provide on this?
Haha fair, i didn't look that fair back ;p
I get the following error from latest versions:
I think it could be resolved if
OrderedFixtureInterface
extends fromFixtureInterface