We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi !
I'd like to use a custom ReferenceRepository (https://github.com/doctrine/data-fixtures/blob/1.6.x/src/ReferenceRepository.php),
Currently:
The ReferenceRepository is always set inside the AbstractExecutor, even if the fixture already has a referenceRepository https://github.com/doctrine/data-fixtures/blob/1.6.x/src/Executor/AbstractExecutor.php#L119-L121 it could be nice to only set the referenceRepository if some method hasReferenceRepository() return false.
hasReferenceRepository()
false
The ReferenceRepository of the AbstractExecutor is hardcoded https://github.com/doctrine/data-fixtures/blob/1.6.x/src/Executor/AbstractExecutor.php#L47 It could be useful to have the referenceRepository as optional argument...
The Executor is hardcoded in the command https://github.com/doctrine/DoctrineFixturesBundle/blob/3.5.x/Command/LoadDataFixturesDoctrineCommand.php#L154
I see two way/improvements to solve my issue:
$fixture = new class(); $fixture->setReferenceRepository($myCustomRepository);
AND I'll need to add a check in the AbstractExecutor (https://github.com/doctrine/data-fixtures/blob/1.6.x/src/Executor/AbstractExecutor.php#L119) to not set the ReferenceRepository if one is already set (But how do I know this since currently no method is exposed ?)
$executor = new ORMExecutor($em, $purger); $executor->setReferenceRepository($myCustomRepository);
What do you think of this problem ? Any suggestion/preferred solution @greg0ire @derrabus ? Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi !
I'd like to use a custom ReferenceRepository (https://github.com/doctrine/data-fixtures/blob/1.6.x/src/ReferenceRepository.php),
Currently:
The ReferenceRepository is always set inside the AbstractExecutor, even if the fixture already has a referenceRepository
https://github.com/doctrine/data-fixtures/blob/1.6.x/src/Executor/AbstractExecutor.php#L119-L121
it could be nice to only set the referenceRepository if some method
hasReferenceRepository()
returnfalse
.The ReferenceRepository of the AbstractExecutor is hardcoded
https://github.com/doctrine/data-fixtures/blob/1.6.x/src/Executor/AbstractExecutor.php#L47
It could be useful to have the referenceRepository as optional argument...
The Executor is hardcoded in the command https://github.com/doctrine/DoctrineFixturesBundle/blob/3.5.x/Command/LoadDataFixturesDoctrineCommand.php#L154
I see two way/improvements to solve my issue:
AND I'll need to add a check in the AbstractExecutor (https://github.com/doctrine/data-fixtures/blob/1.6.x/src/Executor/AbstractExecutor.php#L119) to not set the ReferenceRepository if one is already set (But how do I know this since currently no method is exposed ?)
What do you think of this problem ? Any suggestion/preferred solution @greg0ire @derrabus ?
Thanks
The text was updated successfully, but these errors were encountered: