webmasters / doctrine-extensions
Doctrine2 extensions
Installs: 2 858
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: >=7.1
- doctrine/orm: >=2.6.3,<2.7-dev
README
Webmasters Doctrine Extensions
Just Another Doctrine2 Extension
Bootstrap
<?php // MySQL database configuration $connectionOptions = [ 'default' => [ 'driver' => 'pdo_mysql', 'dbname' => 'example_db', 'host' => 'localhost', 'user' => 'root', 'password' => '', 'prefix' => '', ], ]; // Application/Doctrine configuration $applicationOptions = [ 'debug_mode' => true, // in production environment false ]; // Use Composer autoloading require_once 'vendor/autoload.php'; // Get Doctrine entity manager $bootstrap = Webmasters\Doctrine\Bootstrap::getInstance( $connectionOptions, $applicationOptions ); $em = $bootstrap->getEm();
Changelog
2019-09-08
Now supporting PHP 7.3 (Doctrine 2.6.3 or above)
2019-06-08
Changed method name validateData to executeValidation, to prevent collisions with an attribute $data in the validated class (thx Peter R).