You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Http\Client\Socket\Exception\ConnectionException: Unable to find the socket transport "unix" - did you forget to enable it when you configured PHP?
...vendor\php-http\socket-client\src\Client.php:117
The text was updated successfully, but these errors were encountered:
@hantsy I couldn't reproduce the issue. This code works well:
$container = new PostgresContainer('16');
$container->withPostgresDatabase('blogdb');
$container->withPostgresUser('user');
$container->withPostgresPassword('password');
$container->withExposedPorts("5432");
$container->start();
Make sure your PHP installation has php-sockets enabled. Without it, Testcontainers-PHP cannot connect to the default Docker socket (unix:///var/run/docker.sock).
See: https://www.php.net/manual/en/sockets.installation.php
If you are running Windows or don't have Unix socket support, you can try switch to TCP by setting the DOCKER_HOST environment variable:
Check the testing codes in the PR https://github.com/hantsy/symfony-rest-sample/blob/5e7d022e62d046933ff8117a7370e3842ca9c20b/tests/Repository/PostRepositoryTestWithTestcontainers.php
The text was updated successfully, but these errors were encountered: