DDC-1063: Yaml mapping driver cant find Symfony/Component/Yaml/Yaml.php #1655

Closed
doctrinebot opened this Issue Mar 8, 2011 · 8 comments

2 participants

@doctrinebot

Jira issue originally created by user nikola.petkanski:

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

{quote}
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
{quote}

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

{quote}

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
{quote}

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

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

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.

{quote}
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
{quote}

{quote}
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#
{quote}

{quote}
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#
{quote}

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

@doctrinebot

Comment created by @beberlei:

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

@doctrinebot

Comment created by nikola.petkanski:

Yes, only the LICENSE file is present.

{quote}

root@nikola-pc:<sub># 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:</sub># 

{quote}

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

@doctrinebot

Comment created by @beberlei:

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
@doctrinebot

Comment created by nikola.petkanski:

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:<sub># 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:</sub># 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:~#

@doctrinebot

Comment created by nikola.petkanski:

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.

@doctrinebot

Comment created by @beberlei:

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

@doctrinebot

Comment created by @beberlei:

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 :-)

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment