foamycastle/doctrine-config

a generic doctrine configuration wrapper

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/foamycastle/doctrine-config

dev-main 2025-12-07 01:38 UTC

This package is auto-updated.

Last update: 2025-12-07 01:39:11 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');
}