Skip to content
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

Error in Generators #142

Open
titanrat opened this issue Nov 1, 2017 · 0 comments
Open

Error in Generators #142

titanrat opened this issue Nov 1, 2017 · 0 comments

Comments

@titanrat
Copy link

titanrat commented Nov 1, 2017

I have a similar problem with #66

When i try to mock laravel database (v5.2.45) file /vendor/illuminate/database/Query/Builder.php

/** * Get a generator for the given query. * * @return \Generator */ public function cursor() { if (is_null($this->columns)) { $this->columns = ['*']; } return $this->connection->cursor( $this->toSql(), $this->getBindings(), ! $this->useWritePdo ); }
Something goes wrong with this function, and tests fails with

PHP Fatal error: Generators cannot return values using "return" in /www/backend/vendor/illuminate/database/Query/Builder.php on line 1750

How can I fix this?

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

No branches or pull requests

1 participant