Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-765

\Symfony\Components renamed to \Symfony\Component (singular) ... refactoring unfinished. console cannot be invoked

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA3
    • Fix Version/s: 2.0-BETA4
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None
    • Environment:
      winXP, PHP 5.3.3

      Description

      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 4a9f36800e3f55bc2cf61033573e1103594b4742
      Author: S<C3><A9>bastien 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

        Activity

        Radomirs Cirskis created issue -
        Radomirs Cirskis made changes -
        Field Original Value New Value
        Summary \Symfony\Components renamed to \Symfony\Components ... refactoring unfinished. console cannot be invoked \Symfony\Components renamed to \Symfony\Component (singular) ... refactoring unfinished. console cannot be invoked
        Roman S. Borschel made changes -
        Assignee Roman S. Borschel [ romanb ] Jonathan H. Wage [ jwage ]
        Roman S. Borschel made changes -
        Fix Version/s 2.0-BETA4 [ 10072 ]
        Hide
        Nico Kaiser added a comment -

        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.

        Show
        Nico Kaiser added a comment - 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.
        Hide
        Benjamin Eberlei added a comment - - edited

        Yes this sucks, unfortunately for ORM depending on DBAL Beta 3 we cannot easily change this.

        Workaround until the next release of DBAL is uncommenting the following two lines instantiating DBAL Commands from your doctrine.php:

        $cli->addCommands(array(
            // DBAL Commands
            //new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(),
            //new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(),
        

        For the next release this week this will be resolved.

        Show
        Benjamin Eberlei added a comment - - edited Yes this sucks, unfortunately for ORM depending on DBAL Beta 3 we cannot easily change this. Workaround until the next release of DBAL is uncommenting the following two lines instantiating DBAL Commands from your doctrine.php: $cli->addCommands(array( // DBAL Commands // new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(), // new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(), For the next release this week this will be resolved.
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Jonathan H. Wage [ jwage ] Benjamin Eberlei [ beberlei ]
        Resolution Fixed [ 1 ]
        Hide
        Sherri Flemings added a comment -

        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:

        1. make sure the PEAR directory is part of your php.ini include path
        2. move the Symfony directory from 'PEAR/Doctrine/Symfony' to 'PEAR/Symfony'
        3. 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 <pre> tag & [code] weren't recognized.)

        <?php

        require_once 'Doctrine/Common/ClassLoader.php';

        $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\ORM', realpath(_DIR_ . 'Doctrine/ORM'));
        $classLoader->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)
        );

        Show
        Sherri Flemings added a comment - 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: 1. make sure the PEAR directory is part of your php.ini include path 2. move the Symfony directory from 'PEAR/Doctrine/Symfony' to 'PEAR/Symfony' 3. 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 <pre> tag & [code] weren't recognized.) <?php require_once 'Doctrine/Common/ClassLoader.php'; $classLoader = new \Doctrine\Common\ClassLoader('Doctrine\ORM', realpath(_ DIR _ . 'Doctrine/ORM')); $classLoader->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) );
        Benjamin Eberlei made changes -
        Workflow jira [ 11821 ] jira-feedback [ 14550 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 14550 ] jira-feedback2 [ 16414 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 16414 ] jira-feedback3 [ 18667 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-765, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Radomirs Cirskis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: