doctrine / DoctrineFixturesBundle

Symfony integration for the doctrine/data-fixtures library
MIT License
2.44k stars 202 forks source link

How to get command verbosity in fixtures ? #378

Open CaptainFalcon92 opened 1 year ago

CaptainFalcon92 commented 1 year ago

Hello.

I had a special request from a customer for verbosity-level-aware fixtures but could not deliver such a feature. I simply wanted to know the verbosity level the doctrine:fixture:load command was run at in order to display messages.

I wonder if there is a way of getting access to the verbosity level within a fixture load() or method ? Even better would be to access the Output instance. So far i found no such consideration in the bundle.

I wanted to extends the SymfonyFixturesLoader service but of course the class is final.. I am now trying to either set $output into all fixtures

Sad it is not passed as argument in $executor->execute($fixtures, $input->getOption('append'));

Thanks.