Skip to content


DDC-560: Fix DBAL PostConnect code example in docs #5069

doctrinebot opened this Issue · 2 comments

2 participants


Jira issue originally created by user mjh_ca:

Two small corrections to

  • There should be a semi-colon after new EventManager() instead of a comma ** The parameter to the MysqlSessionInit constructor should be UTF8 and not UTF-8*. The parameter with the dash causes a PDOException:
  SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown character set: 'UTF'

Corrected code:


$evm = new EventManager();
$evm->addEventSubscriber(new MysqlSessionInit('UTF8'));

$conn = DriverManager::getConnection($connectionParams, null, $evm);

Comment created by @beberlei:



Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0-BETA2 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.