-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix mysql via mariadb warns about being deprecated (#6183) #6189
base: 13.x
Are you sure you want to change the base?
Conversation
#6183 is for Drupal 7 which requires Drush 8.x. This PR is for Drush 13. Are you sure this is needed in Drush 13? |
I understand that the issue has the starting direction of Drupal-7. I can make a new issue if you like that more, but since both cases inside issue #6183 where SSL issues with a warning, which is fixed by this pr, This is to stop red-harrings and stop the warning from comming. |
Seems like this will be needed for anyone using the most recent versions of the mariadb client. I'm not sure which version introduced the behavior described in the above-referenced issue. |
It seems introduced in 11.4.x, we encounter it in 11.4.4 |
src/Sql/SqlMysql.php
Outdated
$process = Drush::shell('mysql --version'); | ||
$process->setSimulated(false); | ||
$process->run(); | ||
if ((!$process->isSuccessful() || strpos($process->getOutput(), 'MariaDB') !== false) && self::programExists('mariadb')) { |
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.
I can't figure out what the double parens do here. Did you mean to surround so that the ||
condition is more clearly evaluated? Also, lets keep using str_contains() and not strpos()
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.
Also needs code style fix
PSR12.Classes.OpeningBraceSpace.Found at /home/wodby/drush/src/Sql/SqlMariaDB.php (8:1)
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.
||
and &&
ordering is not always clear to read and changes in every language, so my nature makes them explicit so when im changing languages there is no question if the order is correct
"mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead"
f474a64
to
169c999
Compare
See #6183 for context
In short, this PR will prevent the following message while being fully compatible with mysql as a dropin replacement
"mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead"
When the mysql-binary is removed, this code-change will still be fully working with mariadb.