Codeception / Codeception/module-doctrine

"The EntityManager is closed" with Symfony and Doctrine2 modules

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

説明

#### What are you trying to achieve?

Use the Symfony and Doctrine2 modules together, to allow "cleanup" by reversing transactions between tests, in functional tests against an SQLite database.

#### What do you get instead?

Many tests are simply failing with

```bash
[Doctrine\ORM\ORMException] The EntityManager is closed.
```
If I do not enable the Doctrine2 module, the tests all succeed. But without it enabled, the transactions are not implemented and reversed between tests.

functional.suite.yml is as follows

```yml
class_name: FunctionalTester
modules:
enabled:
- \Helper\Functional
- Asserts
- Cli
- Filesystem
- REST
- Symfony:
environment: test
var_path: 'var'
- Doctrine2:
depends: Symfony
cleanup: true
```
### Details

* Codeception version: 2.4.5
* PHP Version: 7.2
* Operating System: Linux Mint
* Installation type: Composer

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

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

調査の方向性

Start by reproducing the failure with functional.suite.yml, Symfony in the test environment, and Doctrine2 with cleanup enabled against SQLite. Trace the interaction between transaction cleanup and the closed EntityManager; done means the functional tests pass with transactions reversed between tests and without the exception.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
php, symfony
領域
database, testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
32/100

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

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