-
Notifications
You must be signed in to change notification settings - Fork 63
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
Not working on multiple connections #284
Comments
I'm using this bundle myself on a project with 2 connections and it works fine. Can you reproduce the issue on a small project and provide a repository? |
Closing this for now. Let me know in case you can provide a reproducer. |
Thank you for the quick feedback, and sorry I was not able to prepare
a reproducer, not enough time :( but I will definitely come back to
you. Thanks!
Le samedi, 2 mars 2024 à 09:28, David Maicher
***@***.***> a écrit :
… Closing this for now. Let me know in case you can provide a
reproducer.
—
Reply to this email directly, view it on GitHub
[#284 (comment)],
or unsubscribe
[https://github.com/notifications/unsubscribe-auth/ALSNCD4XUH5PSC2R3AST6YTYWGETLAVCNFSM6AAAAABDWLFMP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUG4YDKNBXGY].
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi @dmaicher so I did a few more tests and realized it has nothing to do with the multiple connections: when I keep only the default connection and try again, the same behaviour occurs. I even tried to copy the content of |
I would start by checking if the connection is kept inside |
Thanks for your help & patience @dmaicher so I did as you proposed and found out that |
Then maybe check next why |
The Middleware seems to be properly registered and invoked (and so is the <?php
namespace App\Tests\Entity;
use App\Entity\Brand;
use Faker\Factory;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
class BrandTest extends KernelTestCase
{
public function testCreateBrand(): void
{
$faker = Factory::create();
$brand = (new Brand())
->setName($faker->regexify('[A-Z]{10}'))
->setSlug($faker->slug())
;
$manager = static::getContainer()->get('doctrine')->getManager();
$manager->persist($brand);
$manager->flush();
}
} |
Then I'm afraid you need to find out why |
Hello @dmaicher, I think there was a regression of some kind between v8.0.2 and v8.1.0. Today I realized that rollbacks were not working after a composer update. I could boil it down to the fact that with As you suggested before here I checked if With 8.0.2
With 8.1.0Same but just dumping
if (!self::isKeepStaticConnections() || !isset($params['dama.connection_key'])) {
return parent::connect($params);
}
|
@SirTomme can you please open a new issue? also with more details on the Doctrine DBAL config or how to reproduce that issue please. |
Hi @dmaicher ,
First of all thanks a lot for this bundle, I have a project with a single connection where it works perfectly and it helps us work without worrying about DB conflicts 🙂
Now I am trying to use the bundle on another project which has multiple connections, and although I do not see/get any error message data is not rolled back after each test. I have properly set
use_savepoints
on all connections as I am using dbal 3.8.Do you have any idea why this is not working? Let me know which Information could help you, as I am not able to share a repository since this is a big project.
Many thanks in advance for your support.
The text was updated successfully, but these errors were encountered: