Codeception / Codeception/AspectMock

Error in Generators

オープン
#142 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
784
フォーク
132
PR マージ指標
30日以内にマージされた PR はありません

説明

I have a similar problem with https://github.com/Codeception/AspectMock/pull/66

When i try to mock laravel database (v5.2.45) file [/vendor/illuminate/database/Query/Builder.php](https://github.com/illuminate/database/blob/v5.2.45/Query/Builder.php#L1737)

`
/**
* 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?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。