This borders a typo.... but it stops you from writing a driver called mysql_foo extending mysql.

CommentFileSizeAuthor
#3 dbtype.patch421 byteschx
dbtng_is_very_broken.patch640 byteschx

Comments

chx’s picture

Oh and note that core has all three equal driver and databaseType. So you do not see this. Also note that writing a test for this is impossible as drivers are hardwired into includes/database for D7.

carlos8f’s picture

Priority: Critical » Major

Oops. But Drupal works fine with the provided drivers, thus not critical.

chx’s picture

Title: It's impossible to write a custom DBTNG driver » DBTNG databaseType comment is confusing
Priority: Major » Normal
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new421 bytes
Crell’s picture

Status: Needs review » Reviewed & tested by the community

So to clarify here, we have two methods, driver() and databaseType(). The difference between the two is subtle and not exposed in core directly, but does exist. The documentation for driver() makes it clear how they differ but databaseType()'s does not. #3 makes databaseType()'s documentation clearer as well to reduce confusion (such as the confusion that prompted this issue in the first place).

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

chx’s picture

Title: DBTNG databaseType comment is confusing » DBTNG databaseType is confusing
Version: 7.x-dev » 8.x-dev
Category: bug » task
Status: Fixed » Active

We totally and absolutely should rename this to PDOdriver...

jhedstrom’s picture

Issue summary: View changes
Issue tags: +Needs issue summary update

Issue summary needs updating if #6 is still to be done.

chx’s picture

Assigned: chx » Unassigned

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • webchick committed 6cf421d on 8.3.x
    #1004850 by chx, Crell: Fixed DBTNG databaseType comment is confusing
    
    

  • webchick committed 6cf421d on 8.3.x
    #1004850 by chx, Crell: Fixed DBTNG databaseType comment is confusing
    
    
daffie’s picture

Status: Active » Closed (fixed)