he instalado Doctrine en C:\xampp\htdocs\biblioteca\library:
Cita:
el cli-config.php es:bin
- cli-config.php
- doctrine
- doctrine.php
- doctrine.bat
Doctrine
- Common
- DBAL
- ORM
- Symfony
- cli-config.php
- doctrine
- doctrine.php
- doctrine.bat
Doctrine
- Common
- DBAL
- ORM
- Symfony
Código PHP:
la ejecución de 'php doctrine' no tiene ningun problema, pero cuando ejecuto: 'php doctrine orm:schema-tool:create' me lanza lo siguiente:Ver original
require_once '/../Doctrine/Common/ClassLoader.php'; $classLoader->register(); $classLoader->register(); $classLoader->register(); $classLoader->register(); $classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); $classLoader->register(); $classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); $classLoader->register(); $config = new \Doctrine\ORM\Configuration(); $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache); $config->setMetadataDriverImpl($driverImpl); $config->setProxyDir(__DIR__ . '/Proxies'); $config->setProxyNamespace('Proxies'); /*$connectionOptions = array( 'driver' => 'pdo_sqlite', 'path' => 'database.sqlite' );*/ 'driver' => 'pdo_mysql', 'user' => 'root', 'password' => '', 'dbname' => 'biblioteca', ); $em = \Doctrine\ORM\EntityManager::create($dbParams, $config); 'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) ));
Cita:
no se cuanto tenga que ver el siguiente comando 'php cli-config.php' me da esto: [Doctrine\ORM\Mapping\MappingException]
File mapping drivers must have a valid directory path, however the given path
[C:\xampp\htdocs\biblioteca\library\bin/Entities] seems to be incorrect!
File mapping drivers must have a valid directory path, however the given path
[C:\xampp\htdocs\biblioteca\library\bin/Entities] seems to be incorrect!
Cita:
Quisiera aprender más sobre ORM, agradecería su ayuda. Warning: require(C:\xampp\htdocs\biblioteca\library\bin\Doc trine\ORM\Configuration.php): failed to open stream: No such file or directory in C:\xampp\htdocs\biblioteca\library\Doctrine\Common \ClassLoader.php on line 148
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\biblioteca\library\bin\Doctrine\O RM\Configuration.php' (include_path='.;C:\xampp\php\library;C:\xampp\php \PEAR') in C:\xampp\htdocs\biblioteca\library\Doctrine\Common \ClassLoader.php on line 148
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\biblioteca\library\bin\Doctrine\O RM\Configuration.php' (include_path='.;C:\xampp\php\library;C:\xampp\php \PEAR') in C:\xampp\htdocs\biblioteca\library\Doctrine\Common \ClassLoader.php on line 148