Closed emelchiordev closed 6 months ago
Hi !
in DBAL 3.6 =>
DBAL ships with a new and configurable DSN parser that can be used to parse a database URL into connection parameters understood by DriverManager.
Before $connection = DriverManager::getConnection( ['url' => 'mysql://my-user:t0ps3cr3t@my-host/my-database'] );
$connection = DriverManager::getConnection( ['url' => 'mysql://my-user:t0ps3cr3t@my-host/my-database'] );
After $dsnParser = new DsnParser(['mysql' => 'pdo_mysql']); $connection = DriverManager::getConnection( $dsnParser->parse('mysql://my-user:t0ps3cr3t@my-host/my-database') );
$dsnParser = new DsnParser(['mysql' => 'pdo_mysql']); $connection = DriverManager::getConnection( $dsnParser->parse('mysql://my-user:t0ps3cr3t@my-host/my-database') );
I have modified the service file DbService.php in my project.
Thanx for share this issue I will Create a PR for it
Hi !
in DBAL 3.6 =>
DBAL ships with a new and configurable DSN parser that can be used to parse a database URL into connection parameters understood by DriverManager.
Before
$connection = DriverManager::getConnection( ['url' => 'mysql://my-user:t0ps3cr3t@my-host/my-database'] );
After
$dsnParser = new DsnParser(['mysql' => 'pdo_mysql']); $connection = DriverManager::getConnection( $dsnParser->parse('mysql://my-user:t0ps3cr3t@my-host/my-database') );
I have modified the service file DbService.php in my project.