Development

Symfony11Documentation/myFirstProject (diff)

You must first sign up to be able to contribute.

Changes between Version 5 and Version 6 of Symfony11Documentation/myFirstProject

Show
Ignore:
Author:
eustache (IP: 200.122.176.221)
Timestamp:
08/18/08 04:24:42 (9 years ago)
Comment:

a few notes about the intruction:: php symfony configure:database mysql://root:pa$$word@localhost/symfony_project

Legend:

Unmodified
Added
Removed
Modified
  • Symfony11Documentation/myFirstProject

    v5 v6  
    2929}}} 
    3030 
     31Comments from "eustache": These changes must be done because the function execute() in the class sfConfigureDatabaseTask.class.php just updates the dns parameter, and leaves both the phptype and the database parameters unchanged. 
     32 
     33What I did was to add this code after the line 82 of the sfConfigureDatabaseTask.class.php 
     34{{{ 
     35    $param_array = split("://",$arguments['dsn']); 
     36    $param["phptype"] = $param_array[0]; 
     37    $param_array = split("/",$param_array[1]); 
     38    $param["database"] = $param_array[1]; 
     39}}} 
     40 
     41and edit (in the same file): 
     42{{{ 
     43-this line: 
     44'param' => array_merge(isset($config[$options['env']][$options['name']]['param']) ? $config[$options['env']][$options['name']]['param'] : array(), array('dsn' => $arguments['dsn'])), 
     45-to: 
     46'param' => array_merge(isset($config[$options['env']][$options['name']]['param']) ? $config[$options['env']][$options['name']]['param'] : array(), array('dsn' => $arguments['dsn'],'phptype' => $param['phptype'],'database' => $param['database'])), 
     47}}} 
     48 
     49so each time you run: 
     50{{{ 
     51 $ php symfony configure:database mysql://root:pa$$word@localhost/symfony_project 
     52}}} 
     53 
     54these values will be updated from that string 
    3155== 3 == 
    3256