foamycastle / doctrine-config
a generic doctrine configuration wrapper
dev-main
2025-12-07 01:38 UTC
Requires
- php: ^8.1
- doctrine/dbal: 4.4.*
- doctrine/orm: 3.5.*
- foamycastle/config: @dev
- foamycastle/helper: @dev
- symfony/cache: ^6
Requires (Dev)
- phpunit/phpunit: ^12
This package is auto-updated.
Last update: 2026-03-07 02:25:22 UTC
README
Use this package to configure Doctrine connections by using Symfony-style PHP configuration files.
Usage
use Foamycastle\Config\MySQLParams; $config = MySQLParams::fromConfigFile('configFile.php'); //configFile.php use Foamycastle\Config\MySQLSetParams; return static function (MySQLSetParams $config) { $config ->setHost('db_host.com') ->setUser('db_user') ->setPassword(env('DB_PASSWORD')) ->setPort(3306) ->setDatabase('db_name') ->setCharset('utf8mb4'); }