kohana / minion

Everyone loves having a minion they can boss around
113 stars 76 forks source link

Minion needs isolating #28

Closed ThePixelDeveloper closed 13 years ago

ThePixelDeveloper commented 13 years ago

Because minion makes use of the cascading file system, you get interference from class overloads. Here's an example.

I have a custom Controller that makes use of a table in my newest migration. If I want to test against an old database to see if the migrations work then minion will fail.

Database_Exception [ 0 ]: [1146] Table 'exchange.resources' doesn't exist ( 
        SELECT id, name, parent 
        FROM resources 
        ORDER BY (parent IS NOT NULL) ASC, parent DESC
) ~ MODPATH/database/classes/kohana/database/mysql.php [ 181 ]

Code that runs in my overloaded controller

I would have to roll-back the code to when it was using the old database schema; This is a lot of work when done frequently.

The solution would be to extend Kohana_Controller instead of Controller. There might be other places which need to be isolated.

Let me know what you think.

ThePixelDeveloper commented 13 years ago

No need for this, check the pull request.