Skip to content

Conversation

@thomseddon
Copy link
Contributor

@thomseddon thomseddon commented Aug 19, 2016

Hey,

Migration resets/rollbacks don't seem to work with this library, the suspect parts in Larvel are Migrator->rollback and Migrator->runDown

As you can see, rollback casts each migration to an object before passing to runDown, which then tries to access the object property. As php-rql returns ArrayObject's, this access fails.

This change is a bit hacky but converts ArrayObjects to native arrays!

Questions:

  • Has anybody else found down/rollback migrations to be broken?
  • Any idea why ArrayObject is used? (I have an issue open with php-rql)
  • Is there a better approach?

Thanks!

@thomseddon
Copy link
Contributor Author

Following up on this, the laravel-mongodb project specifically requests that documents be returned as native arrays here, so by returning an ArrayObject this project does have a different behaviour.

I've open danielmewes/php-rql#137 to see if php-rql fancy supporting something like this, in the interim this PR does fix the behaviour.

@duxet duxet merged commit a6e70b7 into duxet:master Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants