Download the PHP package carlinhus/database-config-bundle without Composer

On this page you can find all versions of the php package carlinhus/database-config-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package database-config-bundle

carlinhusDatabaseConfigBundle

Attention! This bundle was previously know as FlexyDatabaseConfigBundle. Make sure to update your composer.json project file to reflect the name change.


carlinhusDatabaseConfigBundle allows you to store configurations from the configuration tree of a bundle and parameters in a database table. Those configurations and parameters will override those defined in the and files.

Configurations are all cached using Symfony's container caching mechanism and do not hit the database.

Content

Installation

  1. Add this to your composer.json :

  2. Run a composer update :

  3. Register the bundle in your AppKernel.php :

  4. Extend the getContainerBuilder() method in AppKernel.php :

  5. Update the database schema :

How to use

Add a configuration to the database

carlinhusDatabaseConfigBundle reproduces the configuration tree of a bundle in the database table named . If you want to add a configuration in the database table, you have to first add the extension name in the table. After that, you will have to add each parent node of the configuration tree that leads to the configuration you have to override.

For example, if you have the following configuration and you want to override :

First, we have to add to the table :

id name
1 twig

Then, we add every node that leads to in the table :

id parent_id extension_id name value
1 NULL 1 globals NULL
2 1 1 project_title My New Project Title

Add a parameter to the database

Parameters are stored in the table in the database. To add a parameter to the database, you just add its name and value to the table.

id name value
1 custom_parameter My custom parameter value

Clear the cache

As database configurations and parameters are cached, you will need to do a app/console cache:clear every time you wish to reload the configuration coming from the database.


All versions of database-config-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/symfony Version ~2.1 | ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package carlinhus/database-config-bundle contains the following files

Loading the files please wait ....