-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
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
Text Wrapper crashes when calling rollback twice #960
Comments
hi @moritz-h, what are you putting in your |
@robmorgan I created a minimal example: https://gist.github.com/moritz-h/579f43c8af02f3644115d91185b73f6e I run The database settings in the phinx.php match to an existing mysql database and my php version is |
@robmorgan I found out where this error comes from: The TextWrapper creates a new Output Instance for each call: This OutputInterface Object is recieved by execute() of a command (i.e. Status) and then passed to bootstrap() AbstractCommand::bootstrap() passes this to AbstractCommand::loadManager() where a new Manager object is created, but only if no Manager was created before: The Manager object saves the OutputInterface as property. And that is the source of the error. To fix this, it would be possible to here create always a new Manager: |
When i try to call getRollback twice on a text wrapper i get a
Symfony\Component\Console\Exception\RuntimeException: Unable to write output.
Exception.Example:
When i setup a new wrapper in between it works:
Edit: Version is 0.6.4
The text was updated successfully, but these errors were encountered: