Skip to content

Instantly share code, notes, and snippets.

@pierrejoye
Last active August 29, 2015 14:22
Show Gist options
  • Save pierrejoye/96b7617d54e2e6118929 to your computer and use it in GitHub Desktop.
Save pierrejoye/96b7617d54e2e6118929 to your computer and use it in GitHub Desktop.
$isDevMode = true;
$dbParams = $container->get('app.config')['doctrine'];
$config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode, null, null, FALSE);
$em = EntityManager::create($dbParams, $config);
$league = new \Pool\Entity\League;
$leagueRepository = $em->getRepository('\Pool\Entity\League');
result:
Details
Type: Doctrine\Common\Persistence\Mapping\MappingException
Message: Class 'Pool/Entity/League' does not exist
File: /var/www/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php
Line: 96
Trace
#0 /var/www/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php(41): Doctrine\Common\Persistence\Mapping\MappingException::nonExistingClass('Pool/Entity/Lea...')
#1 /var/www/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(281): Doctrine\Common\Persistence\Mapping\RuntimeReflectionService->getParentClasses('Pool/Entity/Lea...')
#2 /var/www/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(311): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getParentClasses('Pool/Entity/Lea...')
#3 /var/www/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(78): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->loadMetadata('Pool/Entity/Lea...')
#4 /var/www/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(216): Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata('Pool/Entity/Lea...')
#5 /var/www/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(281): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getMetadataFor('Pool/Entity/Lea...')
#6 /var/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(44): Doctrine\ORM\EntityManager->getClassMetadata('Pool/Entity/Lea...')
#7 /var/www/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(698): Doctrine\ORM\Repository\DefaultRepositoryFactory->getRepository(Object(Doctrine\ORM\EntityManager), 'Pool/Entity/Lea...')
#8 /var/www/src/Controller/AdminLeagueController.php(130): Doctrine\ORM\EntityManager->getRepository('Pool/Entity/Lea...')
#9 [internal function]: Pool\Controller\AdminLeagueController->listAction()
#10 /var/www/vendor/akrabat/rka-slim-controller/RKA/Slim.php(79): call_user_func_array(Array, Array)
#11 [internal function]: RKA\Slim->RKA\{closure}()
#12 /var/www/vendor/slim/slim/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#13 /var/www/vendor/slim/slim/Slim/Slim.php(1357): Slim\Route->dispatch()
#14 /var/www/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#15 /var/www/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#16 /var/www/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#17 /var/www/vendor/slim/slim/Slim/Slim.php(1302): Slim\Middleware\PrettyExceptions->call()
#18 /var/www/src/Application.php(195): Slim\Slim->run()
#19 /var/www/html/index.php(213): Pool\Application->run()
#20 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment