You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently only the migration notes are displayed. But any other output from the base doctrine migrator won't be written to console.
Context
It would be nice to see the extra output from doctrine. I made a quick, dirty solution to show the difference.
Current behavior:
With doctrine output:
Possible Implementation
Doctrine's \Doctrine\DBAL\Migrations\Configuration\Configuration class has an outputWriter property. The property must be an instance of \Doctrine\DBAL\Migrations\OutputWriter. Here is my dirty workaround.
I set the output writer after retrieving the configuration from the provider.
$configuration->setOutputWriter(newOutputWriter(function($message){
// Get the current command's output handler.$output = $this->getOutput();
// Verify the handler exists and that we want extra output.if($output && $output->isVerbose()){
// Write the output to a new line.$output->write($message,true);
}
}));
I don't know how to get an Artisan command's output handler from the ConfigurationFactory. The only way I know how is to get it from the command itself.
Edit
The command could also pass it's output handler to the ConfigurationProvider::getForConnection() method.
The text was updated successfully, but these errors were encountered:
Detailed Description
Currently only the migration notes are displayed. But any other output from the base doctrine migrator won't be written to console.
Context
It would be nice to see the extra output from doctrine. I made a quick, dirty solution to show the difference.
Current behavior:
With doctrine output:
Possible Implementation
Doctrine's
\Doctrine\DBAL\Migrations\Configuration\Configuration
class has an outputWriter property. The property must be an instance of\Doctrine\DBAL\Migrations\OutputWriter
. Here is my dirty workaround.I set the output writer after retrieving the configuration from the provider.
migrations/src/Console/MigrateCommand.php
Lines 49 to 53 in f1292c3
I don't know how to get an Artisan command's output handler from the ConfigurationFactory. The only way I know how is to get it from the command itself.
Edit
The command could also pass it's output handler to the
ConfigurationProvider::getForConnection()
method.The text was updated successfully, but these errors were encountered: