laracasts / TestDummy

Easy factories for PHP integration testing.
https://laracasts.com/lessons/whats-new-in-testdummy
MIT License
456 stars 80 forks source link

Class 'Symfony\Component\Yaml\Yaml' not found #7

Closed harshilmathur closed 10 years ago

harshilmathur commented 10 years ago

I get the following error when I attempt to call the factory class.

PHP Fatal error:  Class 'Symfony\Component\Yaml\Yaml' not found in /home/abhshkdz/projects/org/api/vendor/laracasts/testdummy/src/Laracasts/TestDummy/Factory.php on line 84
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:192
PHP   5. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/TextUI/TestRunner.php:325
PHP   6. PHPUnit_Framework_TestSuite->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:705
PHP   7. PHPUnit_Framework_TestSuite->runTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:745
PHP   8. PHPUnit_Framework_TestCase->run() /usr/share/php/PHPUnit/Framework/TestSuite.php:772
PHP   9. PHPUnit_Framework_TestResult->run() /usr/share/php/PHPUnit/Framework/TestCase.php:751
PHP  10. PHPUnit_Framework_TestCase->runBare() /usr/share/php/PHPUnit/Framework/TestResult.php:649
PHP  11. TestCase->setUp() /usr/share/php/PHPUnit/Framework/TestCase.php:801
PHP  12. Laracasts\TestDummy\Factory::create() /home/abhshkdz/projects/org/api/app/tests/TestCase.php:28
PHP  13. Laracasts\TestDummy\Factory::getInstance() /home/abhshkdz/projects/org/api/vendor/laracasts/testdummy/src/Laracasts/TestDummy/Factory.php:59
PHP  14. Laracasts\TestDummy\Factory::setFixtures() /home/abhshkdz/projects/org/api/vendor/laracasts/testdummy/src/Laracasts/TestDummy/Factory.php:32

Any suggestions?

warksit commented 10 years ago

I'm also having this issue

Added "symfony/yaml": "2.5.*@dev" into composer.json under dev requirements and now working but guess this needs included in the testdummy composer.json?

laracasts commented 10 years ago

Which version of TestDummy are you guys pulling in?

warksit commented 10 years ago

1.* so 1.1.1 I guess

laracasts commented 10 years ago

Ahh - looks like I forgot to tag it. 1.1.2 now includes Yaml as a Composer requirement. Thx.

warksit commented 10 years ago

Cool, thanks