Accessing OutputInterface Command in Loading Doctrine Fixtures

I am generating massive amounts of data using the awesome Faker Library , also using lorempixel.com to have some random images in my Symfony2 project. It takes a while (currently ~ 10 minutes), so I was wondering if there is some way to access the Command OutputInterface through the container interface and print the progress that way, not echo'ing

everything ..

Maybe also have nice output with ProgressBar

+3


source to share


1 answer


Looks like ConsoleOutput doesn't need anything special and can be instantiated directly.



use Symfony\Component\Console\Output\ConsoleOutput;

// ...

public function load(ObjectManager $manager)
{
    $output = new ConsoleOutput();

    $output->writeln('<inf>this works... </info>');
} 

      

+3


source







All Articles