Skip to content

Fixed notice when baking db config: Undefined variable 'driver'. #255

wants to merge 1 commit into from

3 participants

majna commented Oct 18, 2011

It happens when you already have database.php and try to add another config.

CakePHP member
lorenzo commented Oct 18, 2011

Thanks, will take a closer look at this in a moment before merging.

majna commented Oct 18, 2011

I've noticed that 'driver' is still used all over DbConfigTask and test, even deprecated:

Also there's 'driver' in database.php doc block and even not used in config bellow:

 * driver => The name of a supported driver; valid options are as follows:
 *      Database/Mysql      - MySQL 4 & 5,
 *      Database/Sqlite     - SQLite (PHP5 only),
 *      Database/Postgres   - PostgreSQL 7 and higher,
 *      Database/Sqlserver  - Microsoft SQL Server 2005 and higher
 * You can add custom database drivers (or override existing drivers) by adding the
 * appropriate file to app/Model/Datasource/Database.  Drivers should be named 'MyDriver.php',

And bake asks for driver:

Driver: (Mysql/Postgres/Sqlite/Sqlserver)
[Mysql] >

Can this be just renamed and refactored so 'driver' term is removed for consistency?

CakePHP member

It might make sense to rename it to 'datasource'.

CakePHP member

@majna Is there a way you could rebase the commit on 2.0? The commit won't cleanly apply anymore.

majna commented Nov 4, 2011

Ok, I'll rebase this one.

majna commented Nov 4, 2011

lorenzo committed change 4 days ago in d49096a
I cannot rebase easily now with clear history and just one commit.

Bug is still there, so I'll close this pull and send clean one again.

@majna majna closed this Nov 4, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.