Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1063

Yaml mapping driver cant find Symfony/Component/Yaml/Yaml.php

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None
    • Environment:
      Ubuntu 10.10; PHP 5.3;

      Description

      As of the release of Doctrine ORM 2.0.2 I cannot seem to be able to use the Yaml mapping driver.

      PHP Warning: require(/usr/share/php/Doctrine/Symfony/Component/Yaml/Yaml.php): failed to open stream: No such file or directory in /usr/share/php/Doctrine/Common/ClassLoader.php on line 148

      I do have the Doctrine 2.0.2 packages installed, here's the output from my console:

      Installed packages, channel pear.doctrine-project.org:
      ======================================================
      Package Version State
      DoctrineCommon 2.0.1 stable
      DoctrineDBAL 2.0.2 stable
      DoctrineORM 2.0.2 stable
      DoctrineSymfonyConsole 2.0.2 stable
      DoctrineSymfonyYaml 2.0.2 stable

      It is all up to date, so I am not missing anything.

      root@nikola-pc:/usr/share/php# pear upgrade-all
      Nothing to upgrade-all

      Navigating to the /usr/share/php folder, where the PEAR and all other stuff is located I can't seem to find the Yaml.php file, which should be distributed by some of the newly formed packages.

      root@nikola-pc:/usr/share/php# find -iname 'yaml*'
      ./Doctrine/ORM/Mapping/Driver/YamlDriver.php
      ./Doctrine/ORM/Tools/Export/Driver/YamlExporter.php
      ./.registry/.channel.pear.symfony-project.com/yaml.reg
      ./data/DoctrineSymfonyYaml/Doctrine/Symfony/Component/Yaml
      ./PHPUnit/Extensions/Database/DataSet/YamlDataSet.php
      ./PHPUnit/Extensions/Database/DataSet/Persistors/Yaml.php
      ./PHPUnit/Extensions/Database/DataSet/Specs/Yaml.php
      ./SymfonyComponents/YAML

      root@nikola-pc:/usr/share/php# find -iname 'yaml.php'
      ./PHPUnit/Extensions/Database/DataSet/Persistors/Yaml.php
      ./PHPUnit/Extensions/Database/DataSet/Specs/Yaml.php
      root@nikola-pc:/usr/share/php#

      root@nikola-pc:/usr/share/php/data/DoctrineSymfonyYaml# find
      .
      ./LICENSE
      ./Doctrine
      ./Doctrine/Symfony
      ./Doctrine/Symfony/Component
      ./Doctrine/Symfony/Component/Yaml
      ./Doctrine/Symfony/Component/Yaml/LICENSE
      ./bin
      ./bin/doctrine.bat
      ./bin/doctrine
      root@nikola-pc:/usr/share/php/data/DoctrineSymfonyYaml#

      Please advise me what the possible solution would be in this case?

        Activity

        Hide
        Benjamin Eberlei added a comment -

        What Files are in the ./Doctrine/Symfony/Component/YAML Directory? Only LICENSE? Then maybe my build failed somehow.

        Show
        Benjamin Eberlei added a comment - What Files are in the ./Doctrine/Symfony/Component/YAML Directory? Only LICENSE? Then maybe my build failed somehow.
        Hide
        Nikola Petkanski added a comment - - edited

        Yes, only the LICENSE file is present.

        root@nikola-pc:~# ls -lha /usr/share/php/data/DoctrineSymfonyYaml/Doctrine/Symfony/Component/Yaml/
        total 12K
        drwxr-xr-x 2 root root 4.0K 2011-03-07 14:21 .
        drwxr-xr-x 3 root root 4.0K 2011-03-07 14:21 ..
        -rw-r--r-- 1 root root 1.1K 2011-03-07 14:21 LICENSE
        root@nikola-pc:~# 
        

        P.S It would be nice for the documentation to be updated with recommendations on how to setup the autoloader for versions 2.0.2+.
        http://www.doctrine-project.org/docs/orm/2.0/en/reference/configuration.html#additional-symfony-components

        Show
        Nikola Petkanski added a comment - - edited Yes, only the LICENSE file is present. root@nikola-pc:~# ls -lha /usr/share/php/data/DoctrineSymfonyYaml/Doctrine/Symfony/Component/Yaml/ total 12K drwxr-xr-x 2 root root 4.0K 2011-03-07 14:21 . drwxr-xr-x 3 root root 4.0K 2011-03-07 14:21 .. -rw-r--r-- 1 root root 1.1K 2011-03-07 14:21 LICENSE root@nikola-pc:~# P.S It would be nice for the documentation to be updated with recommendations on how to setup the autoloader for versions 2.0.2+. http://www.doctrine-project.org/docs/orm/2.0/en/reference/configuration.html#additional-symfony-components
        Hide
        Benjamin Eberlei added a comment - - edited

        It works for me, i have installed DoctrineSYmfonyYaml on another machine and it contains all the relevant contents.

        Have you tried uninstall and install the package again?

        pear uninstall doctrine/DoctrineSymfonyYaml
        pear install doctrine/Doctrine/SymfonyYaml
        
        Show
        Benjamin Eberlei added a comment - - edited It works for me, i have installed DoctrineSYmfonyYaml on another machine and it contains all the relevant contents. Have you tried uninstall and install the package again? pear uninstall doctrine/DoctrineSymfonyYaml pear install doctrine/Doctrine/SymfonyYaml
        Hide
        Nikola Petkanski added a comment -

        I cannot understand the commands you've gave me - utilizing phpunit to uninstall PEAR component? Really?

        Anyway.. I've tried to uninstall and re-install, but it does not seem to be fixed.

        Please, check the output from my console and inform me if I am doing something wrong.

        root@nikola-pc:~# pear list -a | grep Doctrine
        DoctrineCommon         2.0.1   stable
        DoctrineDBAL           2.0.2   stable
        DoctrineORM            2.0.2   stable
        DoctrineSymfonyConsole 2.0.2   stable
        DoctrineSymfonyYaml    2.0.2   stable
        
        root@nikola-pc:~# pear uninstall Doctrine/DoctrineSymfonyYaml 
        doctrine/DoctrineSymfonyYaml (version >= 2.0.0) is required by installed package "doctrine/DoctrineORM"
        doctrine/DoctrineSymfonyYaml cannot be uninstalled, other installed packages depend on this package
        
        root@nikola-pc:~# pear uninstall Doctrine/DoctrineORM
        uninstall ok: channel://pear.doctrine-project.org/DoctrineORM-2.0.2
        
        root@nikola-pc:~# pear list -a | grep Doctrine
        DoctrineCommon         2.0.1   stable
        DoctrineDBAL           2.0.2   stable
        DoctrineSymfonyConsole 2.0.2   stable
        DoctrineSymfonyYaml    2.0.2   stable
        
        root@nikola-pc:~# pear uninstall Doctrine/DoctrineSymfonyYaml 
        uninstall ok: channel://pear.doctrine-project.org/DoctrineSymfonyYaml-2.0.2
        root@nikola-pc:~# pear list -a | grep Doctrine
        DoctrineCommon         2.0.1   stable
        DoctrineDBAL           2.0.2   stable
        DoctrineSymfonyConsole 2.0.2   stable
        
        root@nikola-pc:~# pear upgrade-all
        Nothing to upgrade-all
        
        root@nikola-pc:~# pear update-channels
        Updating channel "components.ez.no"
        Channel "components.ez.no" is up to date
        Updating channel "doc.php.net"
        Channel "doc.php.net" is up to date
        Updating channel "pear.doctrine-project.org"
        Channel "pear.doctrine-project.org" is up to date
        Updating channel "pear.pdepend.org"
        Channel "pear.pdepend.org" is up to date
        Updating channel "pear.phing.info"
        Channel "pear.phing.info" is up to date
        Updating channel "pear.php.net"
        Channel "pear.php.net" is up to date
        Updating channel "pear.phpunit.de"
        Channel "pear.phpunit.de" is up to date
        Updating channel "pear.symfony-project.com"
        Channel "pear.symfony-project.com" is up to date
        Updating channel "pecl.php.net"
        Channel "pecl.php.net" is up to date
        
        root@nikola-pc:~# pear install Doctrine/DoctrineORM
        downloading DoctrineORM-2.0.2.tgz ...
        Starting to download DoctrineORM-2.0.2.tgz (194,608 bytes)
        .........................................done: 194,608 bytes
        downloading DoctrineSymfonyYaml-2.0.2.tgz ...
        Starting to download DoctrineSymfonyYaml-2.0.2.tgz (19,883 bytes)
        ...done: 19,883 bytes
        install ok: channel://pear.doctrine-project.org/DoctrineSymfonyYaml-2.0.2
        install ok: channel://pear.doctrine-project.org/DoctrineORM-2.0.2
        
        root@nikola-pc:~# ls -lha /usr/share/php/data/DoctrineSymfonyYaml/Doctrine/Symfony/Component/Yaml/
        total 12K
        drwxr-xr-x 2 root root 4.0K 2011-03-14 11:15 .
        drwxr-xr-x 3 root root 4.0K 2011-03-14 11:15 ..
        -rw-r--r-- 1 root root 1.1K 2011-03-14 11:15 LICENSE
        root@nikola-pc:~# 
        
        Show
        Nikola Petkanski added a comment - I cannot understand the commands you've gave me - utilizing phpunit to uninstall PEAR component? Really? Anyway.. I've tried to uninstall and re-install, but it does not seem to be fixed. Please, check the output from my console and inform me if I am doing something wrong. root@nikola-pc:~# pear list -a | grep Doctrine DoctrineCommon 2.0.1 stable DoctrineDBAL 2.0.2 stable DoctrineORM 2.0.2 stable DoctrineSymfonyConsole 2.0.2 stable DoctrineSymfonyYaml 2.0.2 stable root@nikola-pc:~# pear uninstall Doctrine/DoctrineSymfonyYaml doctrine/DoctrineSymfonyYaml (version >= 2.0.0) is required by installed package "doctrine/DoctrineORM" doctrine/DoctrineSymfonyYaml cannot be uninstalled, other installed packages depend on this package root@nikola-pc:~# pear uninstall Doctrine/DoctrineORM uninstall ok: channel: //pear.doctrine-project.org/DoctrineORM-2.0.2 root@nikola-pc:~# pear list -a | grep Doctrine DoctrineCommon 2.0.1 stable DoctrineDBAL 2.0.2 stable DoctrineSymfonyConsole 2.0.2 stable DoctrineSymfonyYaml 2.0.2 stable root@nikola-pc:~# pear uninstall Doctrine/DoctrineSymfonyYaml uninstall ok: channel: //pear.doctrine-project.org/DoctrineSymfonyYaml-2.0.2 root@nikola-pc:~# pear list -a | grep Doctrine DoctrineCommon 2.0.1 stable DoctrineDBAL 2.0.2 stable DoctrineSymfonyConsole 2.0.2 stable root@nikola-pc:~# pear upgrade-all Nothing to upgrade-all root@nikola-pc:~# pear update-channels Updating channel "components.ez.no" Channel "components.ez.no" is up to date Updating channel "doc.php.net" Channel "doc.php.net" is up to date Updating channel "pear.doctrine-project.org" Channel "pear.doctrine-project.org" is up to date Updating channel "pear.pdepend.org" Channel "pear.pdepend.org" is up to date Updating channel "pear.phing.info" Channel "pear.phing.info" is up to date Updating channel "pear.php.net" Channel "pear.php.net" is up to date Updating channel "pear.phpunit.de" Channel "pear.phpunit.de" is up to date Updating channel "pear.symfony-project.com" Channel "pear.symfony-project.com" is up to date Updating channel "pecl.php.net" Channel "pecl.php.net" is up to date root@nikola-pc:~# pear install Doctrine/DoctrineORM downloading DoctrineORM-2.0.2.tgz ... Starting to download DoctrineORM-2.0.2.tgz (194,608 bytes) .........................................done: 194,608 bytes downloading DoctrineSymfonyYaml-2.0.2.tgz ... Starting to download DoctrineSymfonyYaml-2.0.2.tgz (19,883 bytes) ...done: 19,883 bytes install ok: channel: //pear.doctrine-project.org/DoctrineSymfonyYaml-2.0.2 install ok: channel: //pear.doctrine-project.org/DoctrineORM-2.0.2 root@nikola-pc:~# ls -lha /usr/share/php/data/DoctrineSymfonyYaml/Doctrine/Symfony/Component/Yaml/ total 12K drwxr-xr-x 2 root root 4.0K 2011-03-14 11:15 . drwxr-xr-x 3 root root 4.0K 2011-03-14 11:15 .. -rw-r--r-- 1 root root 1.1K 2011-03-14 11:15 LICENSE root@nikola-pc:~#
        Hide
        Nikola Petkanski added a comment -

        It seems to be fixed. Perhaps you've fixed the package and during my uninstall-install it was set properly.

        root@nikola-pc:/usr/share/php# find -iname 'yaml.php'
        ./Doctrine/Symfony/Component/Yaml/Yaml.php
        ./PHPUnit/Extensions/Database/DataSet/Persistors/Yaml.php
        ./PHPUnit/Extensions/Database/DataSet/Specs/Yaml.php
        

        Thanks for fixing it up

        P.S I was having the same issue with the symfony console, but re-installing the ORM and the DBAL packages helped.

        Show
        Nikola Petkanski added a comment - It seems to be fixed. Perhaps you've fixed the package and during my uninstall-install it was set properly. root@nikola-pc:/usr/share/php# find -iname 'yaml.php' ./Doctrine/Symfony/Component/Yaml/Yaml.php ./PHPUnit/Extensions/Database/DataSet/Persistors/Yaml.php ./PHPUnit/Extensions/Database/DataSet/Specs/Yaml.php Thanks for fixing it up P.S I was having the same issue with the symfony console, but re-installing the ORM and the DBAL packages helped.
        Hide
        Benjamin Eberlei added a comment -

        lol, i got confsued. I meant "pear" of course. Fixed my previous comment.

        Show
        Benjamin Eberlei added a comment - lol, i got confsued. I meant "pear" of course. Fixed my previous comment.
        Hide
        Benjamin Eberlei added a comment -

        I had the packages built wrong right after the 2.0.2 release, but only for 2-4 hours. After that they were complete. Good it works for you now, sorry for the difficulties

        Show
        Benjamin Eberlei added a comment - I had the packages built wrong right after the 2.0.2 release, but only for 2-4 hours. After that they were complete. Good it works for you now, sorry for the difficulties

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Nikola Petkanski
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: