You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I pulled from github the whole thing, but still stuck with sandbox:
\doctrine\tools\sandbox>php doctrine.php
.PHP Warning: require(doctrine\lib\vendor\Symfony\Components\Console\Helper\Helper.php): failed to open st
ream: No such file or directory in C:\Inetpub\wwwroot\BugTrackerORM\doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\ClassLoader.php
on line 148
PHP Stack trace:
PHP 1. {main}() ..... doctrine\tools\sandbox\doctrine.php:0
PHP 2. require() .... doctrine\tools\sandbox\doctrine.php:21
PHP 3. Doctrine\Common\ClassLoader->loadClass() ... doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\C
lassLoader.php:0
PHP 4. require() ... doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\ClassLoader.php:148
PHP 5. Doctrine\Common\ClassLoader->loadClass() C:\Inetpub\wwwroot\BugTrackerORM\doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\C
lassLoader.php:0
Warning: require(.... doctrine\lib\vendor\Symfony\Components\Console\Helper\Helper.php): failed to open stream:
No such file or directory in.... doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\ClassLoader.php on lin
e 148
well, it seams that at some stage Symfony\Components got renamed to Symfony\Coponet:
When I copied Component into Componets I got:
.PHP Fatal error: Cannot redeclare class Symfony\Component\Console\Helper\Helper in doctrine\lib\vendor\Sy
mfony\Components\Console\Helper\Helper.php on line 21
The text was updated successfully, but these errors were encountered:
Same for me, even worse, despite git submodule dependencies, the submodules (and their submodules) have different versions of "Components" vs. "Component", so the CLI is broken now.
I came across this issue today. I installed Doctrine via PEAR and had to do a few things to get the sandbox example working, which might help as a workaround until the next release:
make sure the PEAR directory is part of your php.ini include path
move the Symfony directory from 'PEAR/Doctrine/Symfony' to 'PEAR/Symfony'
update the paths to Doctrine & Symfony inside 'tools/sandbox/doctrine.php' & 'tools/sandbox/cli-config.php'
I can now work with the sandbox examples.
As a reference, this is what my cli-config.php source looks like now: (sorry for the unformatted code
tag & [code] weren't recognized.)
register();
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', realpath(__DIR__ . 'Doctrine/DBAL'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', realpath(__DIR__ . 'Doctrine/Common'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', realpath(__DIR__ . 'Symfony'));
$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);
$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__."/Entities"));
$config->setMetadataDriverImpl($driverImpl);
$config->setProxyDir(__DIR__ . '/Proxies');
$config->setProxyNamespace('Proxies');
$connectionOptions = array(
'driver' => 'pdo_sqlite',
'path' => 'database.sqlite'
);
$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);
$helpers = array(
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
);
Jira issue originally created by user nad2000:
I pulled from github the whole thing, but still stuck with sandbox:
\doctrine\tools\sandbox>php doctrine.php
.PHP Warning: require(doctrine\lib\vendor\Symfony\Components\Console\Helper\Helper.php): failed to open st
ream: No such file or directory in C:\Inetpub\wwwroot\BugTrackerORM\doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\ClassLoader.php
on line 148
PHP Stack trace:
PHP 1. {main}() ..... doctrine\tools\sandbox\doctrine.php:0
PHP 2. require() .... doctrine\tools\sandbox\doctrine.php:21
PHP 3. Doctrine\Common\ClassLoader->loadClass() ... doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\C
lassLoader.php:0
PHP 4. require() ... doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\ClassLoader.php:148
PHP 5. Doctrine\Common\ClassLoader->loadClass() C:\Inetpub\wwwroot\BugTrackerORM\doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\C
lassLoader.php:0
Warning: require(.... doctrine\lib\vendor\Symfony\Components\Console\Helper\Helper.php): failed to open stream:
No such file or directory in.... doctrine\lib\vendor\doctrine-common\lib\Doctrine\Common\ClassLoader.php on lin
e 148
well, it seams that at some stage Symfony\Components got renamed to Symfony\Coponet:
$ git log Component
commit 4a9f368
Author: Sbastien HOUZE sebastienhouze@mbash.livebox.home
Date: Mon Aug 23 08:21:41 2010 +0200
Symfony/Components renamed into Symfony/Component
When I copied Component into Componets I got:
.PHP Fatal error: Cannot redeclare class Symfony\Component\Console\Helper\Helper in doctrine\lib\vendor\Sy
mfony\Components\Console\Helper\Helper.php on line 21
The text was updated successfully, but these errors were encountered: