# config/my_config.yml
dirs:
  lib:    %SF_LIB_DIR%/my_lib
  custom: %SUPER_PATH%/is/here
sfConfig::set('super_path', '/the/super/path');

$configuration = sfYamlConfigHandler::parseYaml(sfConfig::get('sf_config_dir').'/my_config.yml');
$configuration = sfYamlConfigHandler::replaceConstants($configuration);

var_dump($configuration);
/*
array(1) {
  ["dirs"]=>
  array(2) {
    ["lib"]=>
    string(53) "/Users/cedric/Dev/workspace/my_sf_project/lib/my_lib"
    ["custom"]=>
    string(23) "/the/super/path/is/here"
  }
}
*/