<commit_before><?php
require __DIR__ . '/vendor/autoload.php';

use \Doctrine\ORM\Tools\Setup;
use \Doctrine\ORM\EntityManager;
use \Doctrine\Common\EventManager;
use \SimpleThings\EntityAudit\AuditConfiguration;
use \SimpleThings\EntityAudit\AuditManager;

define('PASS_SALT', '<PASSWORD>!');

$isDev = true;
$paths = array(__DIR__ . '/lib/Application/Model');
$config = Setup::createAnnotationMetadataConfiguration($paths, $isDev);
$config->setAutoGenerateProxyClasses($isDev);
$config->setProxyDir(__DIR__ . '/tmp');

$conn = array(
    'host'     => 'localhost',
    'user'     => 'root',
    'password' => '',
    'dbname'   => '',
    'driver'   => 'pdo_mysql'
);

$auditconfig = new AuditConfiguration();
$auditconfig->setAuditedEntityClasses(array(
    //'Application\Model\AuditableModelHere'
));
$evm = new EventManager();
$auditManager = new AuditManager($auditconfig);
$auditManager->registerEvents($evm);

$entityManager = EntityManager::create($conn, $config, $evm);<commit_msg>annotation alias improve<commit_after><?php
require __DIR__ . '/vendor/autoload.php';

use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
use Doctrine\Common\EventManager;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;

define('PASS_SALT', '<PASSWORD>!');

$isDev = true;
$paths = array(__DIR__ . '/src/Application/Model');
$driver = new AnnotationDriver(new AnnotationReader(), $paths);
AnnotationRegistry::registerLoader('class_exists');
$config = Setup::createConfiguration($isDev);
$config->setMetadataDriverImpl($driver);
$config->setAutoGenerateProxyClasses($isDev);
$config->setProxyDir(__DIR__ . '/tmp');


$conn = array(
    'host'     => 'localhost',
    'user'     => 'root',
    'password' => '',
    'dbname'   => '',
    'driver'   => 'pdo_mysql',
    'charset' => 'UTF8',
    'driverOptions' => array(
       'SET NAMES utf8;'
    )
);

$entityManager = EntityManager::create($conn, $config, $evm);
{'fraction_non_alphanumeric': 0.17268678871845622, 'fraction_numerical': 0.0009896091044037606, 'mean_word_length': 5.460063897763578, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7607277', 'n_tokens_mistral': 658, 'n_tokens_neox': 652, 'n_words': 110}