indigophp / fuel-dbal
Fuel DBAL integration
Installs: 74
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:fuel-package
pkg:composer/indigophp/fuel-dbal
Requires
- composer/installers: ~1.0
- doctrine/dbal: ~2.4
- indigophp/fuel-core: dev-develop
Requires (Dev)
- codeception/codeception: ~2.0.0
- codeception/mockery-module: dev-master
- indigophp/codeception-fuel-module: dev-develop
This package is not auto-updated.
Last update: 2022-02-01 12:38:28 UTC
README
This package is a wrapper around doctrine/dbal package.
Install
Via Composer
{
"require": {
"indigophp/fuel-dbal": "@stable"
}
}
Usage
You can use the fuel db configuration or you can place your configuration in dbal. dbal is checked first and it must be in DBAL compatible format, only the legacy db configurations are converted.
// Returns a DBAL Connection object $conn \Dbal::forge('default');
Dbal class extends Facade and uses Facade\Instance from indigophp/fuel-core.
Configuration
'dbname' => 'database' 'host' => 'localhost' 'port' => 1234 'user' => 'user', 'password' => 'secret', 'driver' => 'pdo_mysql', 'driver_class' => 'MyNamespace\\MyDriverImpl', // the DBAL driverClass option 'options' => array( // the DBAL driverOptions option 'foo' => 'bar', ), 'path' => '', 'wrapper_class' => 'MyDoctrineDbalConnectionWrapper', // the DBAL wrapperClass option 'charset' => 'UTF8', 'profiling' => true, 'mapping_types' => array( 'enum' => 'string', ), 'types' => array( 'custom' => 'MyCustomType', ),
Profiling
No configuration is required beyond enabling profiling for your connection. Queries sent through DBAL will automatically appear in the Fuel profiler.
Note: You can use the package even without loading it since composer handles autoloading.
Testing
$ codecept run
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.