Skip to content
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

use mysqli as default driver instead of mysql #156

Closed
iinfo-dev-mk opened this issue Nov 14, 2014 · 6 comments
Closed

use mysqli as default driver instead of mysql #156

iinfo-dev-mk opened this issue Nov 14, 2014 · 6 comments

Comments

@iinfo-dev-mk
Copy link

Mysql ext is deprecated in PHP 5.5.+ and will not be available in major future version of PHP. It throws deprecated error now, but it's hidden because of usage of @ - shut up operator - in dibi mysql driver.

It's much better use mysqli as default driver. It's BC break but small. Place for change -
https://github.com/dg/dibi/blob/master/dibi/libs/Dibi.php#L71

@JanTvrdik
Copy link
Contributor

👍

@Majkl578
Copy link

Actually, in these days, PDO might be even better. But 👍 either way.

@iinfo-dev-mk
Copy link
Author

@Majkl578, in these days maybe, but dibi is targeted for 5.2+ and PDO's quality in 5.2 is poor I think.

@JanTvrdik
Copy link
Contributor

@dg Any thoughts? Mysql extension will (probably) be removed in PHP 7 as a bundled extension and be available only as a PECL extension.

@dg
Copy link
Owner

dg commented Jan 13, 2015

I think that defaultDriver is a historical relic and should be removed at all.

@iinfo-dev-mk
Copy link
Author

It can be, but it's huge BC break, much bigger then switching to another default driver. I don't see many reasons for removing, default driver is useful case, there is mostly one type of db system in the small and middle sized companies and so all connections in all projects in such companies can benefit from default driver pattern.

@dg dg closed this as completed in 97b50bd Jan 13, 2015
jasir added a commit to jasir/dibi that referenced this issue Mar 2, 2015
* master: (37 commits)
  Released version 2.3.1
  removed version.txt
  dibi: named connections are allowed [Closes dg#161]
  Dibi: Dump now recognize MsSql2012 offset as keyword
  DibiPdoDriver: added support for MsSql2012 Offset
  Tracy\Panel: added vector icon
  added contributing.md
  Released version 2.3.0
  Postgre: added test for matching by %like
  Postgre: fixed %like escaping [Closes dg#159]
  Dibi: $defaultDriver changed to mysqli [Closes dg#156]
  Released 2.3.0-RC1
  removed bridge for Nette 2.0 (BC break)
  dibi: named connections and activate() are deprecated (BC break)
  DibiFluent: add `leftJoin` and `on` to phpdoc.
  DibiFirePhpLogger: save some header operations for sites with hundreds of sql queries.
  DibiFirePhpLogger: Allow user defined size of json stream chunks [Closes dg#148]
  DibiTranslator: respect %if blocks for %lmt and %ofs as well [Closes dg#145][Closes dg#87]
  DibiResult: float detection locale fix [Closes dg#154]
  DibiMySqliDriver.php: fixes for HHVM
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants