{"action":"opened","issue":{"url":"https://api.github.com/repos/laravel-doctrine/migrations/issues/62","repository_url":"https://api.github.com/repos/laravel-doctrine/migrations","labels_url":"https://api.github.com/repos/laravel-doctrine/migrations/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/laravel-doctrine/migrations/issues/62/comments","events_url":"https://api.github.com/repos/laravel-doctrine/migrations/issues/62/events","html_url":"https://github.com/laravel-doctrine/migrations/issues/62","id":297287007,"number":62,"title":"[Feature]  Display the migration output from the base Doctrine migrator.","user":{"login":"garret-gunter","id":8146238,"avatar_url":"https://avatars1.githubusercontent.com/u/8146238?v=4","gravatar_id":"","url":"https://api.github.com/users/garret-gunter","html_url":"https://github.com/garret-gunter","followers_url":"https://api.github.com/users/garret-gunter/followers","following_url":"https://api.github.com/users/garret-gunter/following{/other_user}","gists_url":"https://api.github.com/users/garret-gunter/gists{/gist_id}","starred_url":"https://api.github.com/users/garret-gunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garret-gunter/subscriptions","organizations_url":"https://api.github.com/users/garret-gunter/orgs","repos_url":"https://api.github.com/users/garret-gunter/repos","events_url":"https://api.github.com/users/garret-gunter/events{/privacy}","received_events_url":"https://api.github.com/users/garret-gunter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-14T23:51:19Z","updated_at":"2018-02-14T23:51:19Z","closed_at":null,"author_association":"NONE","body":"<!--- Provide a general summary of the issue in the Title above -->\r\n\r\n## Detailed Description\r\n<!--- Provide a detailed description of the change or addition you are proposing -->\r\nCurrently only the migration notes are displayed.  But any other output from the base doctrine migrator won't be written to console. \r\n\r\n## Context\r\n<!--- Why is this change important to you? How would you use it? -->\r\n<!--- How can it benefit other users? -->\r\nIt would be nice to see the extra output from doctrine.  I made a quick, dirty solution to show the difference.\r\n\r\n**Current behavior:**\r\n![image](https://user-images.githubusercontent.com/8146238/36233947-a3db062a-11a5-11e8-85b9-ce66e49f916a.png)\r\n\r\n**With doctrine output:**\r\n![image](https://user-images.githubusercontent.com/8146238/36233993-e5eaf30e-11a5-11e8-82be-ee9f4a41595a.png)\r\n\r\n\r\n## Possible Implementation\r\n<!--- Not obligatory, but suggest an idea for implementing addition or change -->\r\nDoctrine'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.  \r\n\r\n I set the output writer after retrieving the configuration from the provider.  \r\nhttps://github.com/laravel-doctrine/migrations/blob/f1292c3dcb894bf5d310775e4bb1d9bd9e74d658/src/Console/MigrateCommand.php#L49-L53\r\n\r\n```php\r\n\r\n        $configuration->setOutputWriter(new OutputWriter(function($message){\r\n                // Get  the current command's output handler.\r\n        \t$output = $this->getOutput();\r\n               // Verify the handler exists and that we want extra output.\r\n        \tif($output && $output->isVerbose()){\r\n                        // Write the output to a new line.\r\n        \t\t$output->write($message,true);\r\n\t        }\r\n        }));\r\n```   \r\n\r\nI 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."}}
{"actor":{"display_login":"garret-gunter"}}