Your app's configuration by default is in Yaml, but you can configure any part of Symfony to use any configuration type you want.
To configure your app to use PHP, you need to change the code that loads your configuration in the app/AppKernel.php:
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
You'll need to change this to .php and write your configuration file in PHP.
Here is what the config.php file should looks like:
$this->import('parameters.ini');
$this->import('security.yml');
$container->loadFromExtension('framework', array(
'secret' => '%secret%',
'charset' => 'UTF-8',
'router' => array('resource' => '%kernel.root_dir%/config/routing.php'),
'form' => array(),
'csrf-protection' => array(),
'validation' => array('annotations' => true),
'templating' => array(
'engines' => array('twig'),
#'assets_version' => "SomeVersionScheme",
),
'session' => array(
'default_locale' => "%locale%",
'auto_start' => true,
),
));
// Twig Configuration
$container->loadFromExtension('twig', array(
'debug' => '%kernel.debug%',
'strict_variables' => '%kernel.debug%',
));
You can read more about it here: http://symfony.com/doc/current/book/page_creation.html#application-configuration