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

Symfony Integration issue with TestConnectionFactory #22

Open
hantsy opened this issue Dec 6, 2024 · 1 comment
Open

Symfony Integration issue with TestConnectionFactory #22

hantsy opened this issue Dec 6, 2024 · 1 comment

Comments

@hantsy
Copy link

hantsy commented Dec 6, 2024

I have updated packages to testcontainrs/testcontainers.

I followed the guide in the readme, created a TestConnectionFactory, and declared in the config/packages/test/services.yml.

But when running the tests, it can not find the host 127.0.0.1 and port 5432.

Check the test file: https://github.com/hantsy/symfony-rest-sample/blob/69e8c0d5f91ee999eb2b949bde6a6bf4a21876de/tests/Repository/PostRepositoryTestWithTestConnectionFactory.php

And services.yml file: https://github.com/hantsy/symfony-rest-sample/blob/69e8c0d5f91ee999eb2b949bde6a6bf4a21876de/config/packages/test/services.yml

And the TestConnnectionFactory file :https://github.com/hantsy/symfony-rest-sample/blob/69e8c0d5f91ee999eb2b949bde6a6bf4a21876de/tests/TestConnectionFactory.php

It seems the TestConnectonFactory is not applied at all.

@rw4lll
Copy link
Collaborator

rw4lll commented Dec 28, 2024

Hi @hantsy! We're currently working on the big tc-php update to align its implementation closer with others. Could you pls check the 0.2 branch from GitHub (https://github.com/testcontainers/testcontainers-php/tree/0.2)? It's not released yet, but probably it will solve the issues you have.

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

2 participants