Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'Symfony\Component\Yaml\Dumper' not found in /usr/share/php/PHPUnit/Util/Log/TAP.php on line 131 #1319

Closed
feridmovsumov opened this issue Jul 3, 2014 · 16 comments

Comments

@feridmovsumov
Copy link

Error occurs when I run my tests with following command

phpunit --tap .
PHP Fatal error:  Class 'Symfony\Component\Yaml\Dumper' not found in /usr/share/php/PHPUnit/Util/Log/TAP.php on line 131

https://github.com/sebastianbergmann/phpunit/blob/master/src/Util/Log/TAP.php#L131

Php version: PHP 5.5.14-2

Phpunit Version: 3.7.28

@whatthejeff
Copy link
Contributor

How did you install PHPUnit? Looks like an issue with files from an older version being included.

@faridmovsumov
Copy link

I upgraded my php version from 5.3 to 5.5 maybe it is source of problem

@whatthejeff
Copy link
Contributor

This shouldn't be a problem as PHPUnit is tested against 5.5. How did you install PHPUnit?

@faridmovsumov
Copy link

I installed phpunit with apt-get install phpunit command

@faridmovsumov
Copy link

This problem occured when I work in vagrant

@whatthejeff
Copy link
Contributor

Which version of linux are you running?

@faridmovsumov
Copy link

My linux version is 12.04

@sebastianbergmann
Copy link
Owner

We cannot offer support for distribution-packaged versions of PHPUnit.

@whatthejeff
Copy link
Contributor

Seems like an outdated version of PHPUnit. Does this solve your problem http://zechim.com/blog/2012/05/16/install-phpunit-on-ubuntu/?

@whatthejeff
Copy link
Contributor

Alright, going to close this since @sebastianbergmann says we cannot support distribution-packed versions of PHPUnit. Unfortunately, many of these packages are either broken or very dated.

If the link I sent you doesn't work, I'd recommend downloading the phar or using composer to install PHPUnit.

@tomtom87
Copy link

I am having this same issue currently on Ubuntu 13.04 with PHP 5.4.9 running in Vagrant using packages from apt-get

@sebastianbergmann
Copy link
Owner

Follow the instructions on http://phpunit.de/getting-started.html

@tomtom87
Copy link

Thanks Sebastian, I have followed those instructions for the phar and I still remain with this error below:

$ phpunit
PHP Fatal error: Uncaught exception 'Exception' with message 'Unknown class name PHPUnit_TextUI_Command. Not found at /var/www/lib/PHPUnit/TextUI/Command.php' in /home/vagrant/web/site/lib/Object.php:106
Stack trace:
#0 /home/vagrant/web/site/.php_auto_prepend_file(70): Object::loadClass('PHPUnit_TextUI_...')
#1 [internal function]: {closure}('PHPUnit_TextUI_...')
#2 /usr/local/bin/phpunit(585): spl_autoload_call('PHPUnit_TextUI_...')
#3 {main}
thrown in /home/vagrant/web/site/lib/Object.php on line 106

@sebastianbergmann
Copy link
Owner

I assume that phpunit invokes the binary installed by your system package.

@tomtom87
Copy link

How can I ensure that it invokes the other one, where is that getting installed and how can I remove the default system package..

@tomtom87
Copy link

It was a issue with a existing framework causing this, everything fixed. thanks very much for your help sebastian :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants