{"action":"created","issue":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/3479","repository_url":"https://api.github.com/repos/Codeception/Codeception","labels_url":"https://api.github.com/repos/Codeception/Codeception/issues/3479/labels{/name}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/3479/comments","events_url":"https://api.github.com/repos/Codeception/Codeception/issues/3479/events","html_url":"https://github.com/Codeception/Codeception/issues/3479","id":174754671,"number":3479,"title":"Problem with doctrine connections","user":{"login":"kooso","id":1823691,"avatar_url":"https://avatars.githubusercontent.com/u/1823691?v=3","gravatar_id":"","url":"https://api.github.com/users/kooso","html_url":"https://github.com/kooso","followers_url":"https://api.github.com/users/kooso/followers","following_url":"https://api.github.com/users/kooso/following{/other_user}","gists_url":"https://api.github.com/users/kooso/gists{/gist_id}","starred_url":"https://api.github.com/users/kooso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kooso/subscriptions","organizations_url":"https://api.github.com/users/kooso/orgs","repos_url":"https://api.github.com/users/kooso/repos","events_url":"https://api.github.com/users/kooso/events{/privacy}","received_events_url":"https://api.github.com/users/kooso/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Codeception/Codeception/labels/Doctrine","name":"Doctrine","color":"bdc3c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-02T13:02:04Z","updated_at":"2016-09-05T08:24:07Z","closed_at":null,"body":"We are currently using version 2.0 of Codeception, however we want to upgrade to the latest version (2.2) that supports PHPUnit 5.\r\nWe have some code we use Doctrine's entity manager for persisting, but for reading we make use of the Doctrine's connection. It seems that in this situation when using Codeception v2.1 and v2.2, the Doctrine's entity manager uses one connection and Doctrine's connection a different one. You can see this repo https://github.com/kooso/codeception_doctrine_bug_example on how to reproduce it. \r\n\r\nHere is the sample output from the example repo above:\r\n- In version [2.0](https://github.com/kooso/codeception_doctrine_bug_example/blob/2.0/mysql.log#L17) all the queries run inside of the same transaction and all works fine\r\n- In version [2.1](https://github.com/kooso/codeception_doctrine_bug_example/blob/2.1/mysql.log#L17) and [2.2](https://github.com/kooso/codeception_doctrine_bug_example/blob/master/mysql.log#L17) (master in that repo), we can see that a new connection happens in the middle causing that the select doesn't see the changes from insert "},"comment":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/comments/244687269","html_url":"https://github.com/Codeception/Codeception/issues/3479#issuecomment-244687269","issue_url":"https://api.github.com/repos/Codeception/Codeception/issues/3479","id":244687269,"user":{"login":"kooso","id":1823691,"avatar_url":"https://avatars.githubusercontent.com/u/1823691?v=3","gravatar_id":"","url":"https://api.github.com/users/kooso","html_url":"https://github.com/kooso","followers_url":"https://api.github.com/users/kooso/followers","following_url":"https://api.github.com/users/kooso/following{/other_user}","gists_url":"https://api.github.com/users/kooso/gists{/gist_id}","starred_url":"https://api.github.com/users/kooso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kooso/subscriptions","organizations_url":"https://api.github.com/users/kooso/orgs","repos_url":"https://api.github.com/users/kooso/repos","events_url":"https://api.github.com/users/kooso/events{/privacy}","received_events_url":"https://api.github.com/users/kooso/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T08:24:07Z","updated_at":"2016-09-05T08:24:07Z","body":"@Naktibalda that doesn't solve the problem, I just tried in the repo example calling `$this->integration->persistService('doctrine.dbal.backend_connection', true)` from `_before` method and the behaviour its the same, should I call it from somewhere else?"}}
{"actor":{"display_login":"kooso"}}