add support for passing connection from PHP configuration