-
Notifications
You must be signed in to change notification settings - Fork 112
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
Adding mysqlAttributes to default connection #103
Conversation
|
||
foreach ($mysqlAttributesArray as $value) { | ||
if (isset($config[$value])) { | ||
$configArray['environments']['default']['mysql_attr'.$value] = $config[$value]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concatenate is missing spaces e.g : 'mysql_attr' . $value
It is missing an underscore for this to work :
$configArray['environments']['default']['mysql_attr_' . $value] = $config[$value];
Good job. I however think this is not "general enough" and maybe too much "MySQL centric". Phinx also support this kind of configuration with SqlServer using the "sqlsrv_attr_" prefix. I was hoping we could find a more general way, implement it and be done with connection config argument missing (kind of like the Since I do not have not a better alternative to submit right now, I guess this can be merged after corrections to support SSL for MySQL for the time being. |
@@ -92,10 +92,19 @@ public function getConfig() | |||
'port' => isset($config['port']) ? $config['port'] : null, | |||
'name' => $config['database'], | |||
'charset' => isset($config['encoding']) ? $config['encoding'] : null, | |||
'unix_socket' => isset($config['unix_socket']) ? $config['unix_socket'] : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be removed.
@HavokInspiration Can this be merged? |
@lorenzo Nope, there are errors that would make this not work. |
Closing in favor of #122 |
Here is a fix that allows ssl_cert, ssl_ca and ssl_key parameters to be added to the mysql connection string. A developer could add additional parameters as needed.
This is pull request to issue #99