PHP code example of cube / composer-dist-installer
1. Go to this page and download the library: Download cube/composer-dist-installer library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cube / composer-dist-installer example snippets
return array(
'doctrine' => array(
'connection' => array(
// default connection name
'orm_default' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => '{{Database host []?|localhost}}',
'port' => '{{Database port []?|3306}}',
'user' => '{{Database user []?|=ENV[USER]}}',
'password' => '{{Database password?}}',
'dbname' => '{{Database name?}}',
)
),
)
),
);
return array(
'doctrine' => array(
'connection' => array(
// default connection name
'orm_default' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'test.db.acme.be',
'port' => '3306',
'user' => 'staging',
'password' => '1234test',
'dbname' => 'stage',
)
),
)
),
);
json
{
"scripts": {
"post-install-cmd": [
"Cube\\ComposerDistInstaller\\Bootstrap::install"
]
},
"extra": {
"dist-installer-params": {
"file": "config/autoload/database.config.php.dist"
}
}
}
json
{
"extra": {
"dist-installer-params": {
"file": "config/autoload/database.config.php",
"dist-file": "some/other/folder/file/database.dist"
}
}
}
json
{
"extra": {
"dist-installer-params": [
{
"file": "config/autoload/database.config.php",
"dist-file": "some/other/folder/file/database.dist"
},
{
"file": "config/autoload/session.config.php",
"dist-file": "some/other/folder/file/session.dist"
}
]
}
}