idealogica / orm-helper
Collection of classes to simplify Doctrine ORM everyday usage
Installs: 1 133
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.2.0
- ext-json: *
- doctrine/orm: ~2.7.4
- idealogica/log-x: ~1.1.0
- psr/simple-cache: ~1.0.0
- respect/validation: ~1.1.31
Requires (Dev)
- idealogica/debug: ~1.1.3
- phpunit/phpunit: ~9.4.3
README
1. Installation
composer require idealogica/orm-helper:~1.0.0
2. Basic example
$repositoryFactory = null;
$em = EntityManager::createFromParams(
function ($name, DoctrineEntityManager $em, ClassMetadata $metadata) use (&$repositoryFactory) {
$className = $name . 'Repository';
return new $className($em, $metadata, $repositoryFactory);
},
$modelsPath,
[
'driver' => 'pdo_sqlite',
'path' => $dbPath,
],
$logFilePath,
$cachePath,
true
);
$repositoryFactory = new RepositoryFactory($em);
$testEntities = $repositoryFactory->getTestEntityRepository()->findAll();
3. License
OrmHelper is licensed under a MIT License.