You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make db-credentials and db-backup compatible with ConfigReadShell #32
Our new approach to defining DB connection settings is to put them in Configure and have DATABASE_CONFIG::__construct() extract them into class properties. This has the side effect of breaking the db-credentials and db-backup "shell" scripts (which are actually implemented in PHP) since they both try to include('Config/database.php') in order to extract the connection values from the ::$default property.
This no longer works in a command line context because the DATABASE_CONFIG class now depends on the Configure class and a host of other associated Cake core libs. These classes are not available without the Cake bootstrapping process, so it's no longer possible to directly instantiate DATABASE_CONFIG. There are two alternatives:
Define our own very crude Configure class that has no other dependencies and use it to extract the values we need from Config/core.php.
Detect the presence of the Loadsys/ConfigReadShell plugin, and use bin/cake config_read.config_read Database.default to obtain the DB connection values we need. (This approach has already been implemented in the EducationUnlimited legacy app, which has its own static copies of db-credentials and db-backup.)
Ideally, both approaches should be used so that the db-* scripts remain as versatile and "unspecialized" as possible.
Activity
Move DB configs into Configure.
Move DB configs into Configure.
Overhauls db-* scripts to work with ConfigReadShell.