8000 Cannot run test suite · Issue #5402 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

Cannot run test suite #5402

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

Closed
sebastianbergmann opened this issue Aug 31, 2012 · 16 comments
Closed

Cannot run test suite #5402

sebastianbergmann opened this issue Aug 31, 2012 · 16 comments

Comments

@sebastianbergmann
Copy link
Contributor
➜  src  git clone git://github.com/symfony/symfony.git
Cloning into 'symfony'...
remote: Counting objects: 144068, done.
remote: Compressing objects: 100% (44515/44515), done.
remote: Total 144068 (delta 91155), reused 135518 (delta 83912)
Receiving objects: 100% (144068/144068), 22.84 MiB | 837 KiB/s, done.
Resolving deltas: 100% (91155/91155), done.

➜  src  cd symfony 

➜  symfony git:(master) composer install  
Installing dependencies
  - Installing doctrine/common (2.3.x-dev)
    Cloning 605b1b8b5a7bc8daf9111fb35483e5708e30de35

  - Installing twig/twig (dev-master)
    Cloning 459720ff3b74ee0c0d159277c6f2f5df89d8a4f6

Writing lock file
Generating autoload files

➜  symfony git:(master) phpunit           

Warning: require_once(/usr/local/src/symfony/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php): failed to open stream: No such file or directory in /usr/local/src/symfony/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php on line 59

Call Stack:
    0.0002     274896   1. {main}() /usr/local/src/phpunit/phpunit.php:0
    0.0254    2845976   2. PHPUnit_TextUI_Command::main() /usr/local/src/phpunit/phpunit.php:46
    0.0254    2846568   3. PHPUnit_TextUI_Command->run() /usr/local/src/phpunit/PHPUnit/TextUI/Command.php:130
    0.0254    2847120   4. PHPUnit_TextUI_Command->handleArguments() /usr/local/src/phpunit/PHPUnit/TextUI/Command.php:139
    0.0312    3242512   5. PHPUnit_TextUI_Command->handleBootstrap() /usr/local/src/phpunit/PHPUnit/TextUI/Command.php:615
    0.0314    3252840   6. PHPUnit_Util_Fileloader::checkAndLoad() /usr/local/src/phpunit/PHPUnit/TextUI/Command.php:787
    0.0314    3253224   7. PHPUnit_Util_Fileloader::load() /usr/local/src/phpunit/PHPUnit/Util/Fileloader.php:77
    0.0315    3260656   8. include_once('/usr/local/src/symfony/autoload.php.dist') /usr/local/src/phpunit/PHPUnit/Util/Fileloader.php:93
    0.0330    3385496   9. Doctrine\Common\Annotations\AnnotationRegistry::registerFile() /usr/local/src/symfony/autoload.php.dist:17
@dzuelke
Copy link
Contributor
dzuelke commented Aug 31, 2012

I think you need to install the composer stuff with --dev.

@stof
Copy link
Member
stof commented Aug 31, 2012

you need to ask composer to install the dev dependencies too (used in the testsuite but not mandatory deps) by adding the --dev option when running the command.
Btw, note that looking at the .travis.yml file allows to see what is nee 8000 ded to setup the testsuite (as it is the steps used to initialize it on Travis)

@sebastianbergmann
Copy link
Contributor Author

Information like this should not be hidden in JSON and YAML files.

Now I have a different issue:

➜  symfony git:(master) composer install --dev   
Installing dependencies from lock file
Nothing to install or update
Installing dev dependencies
  - Installing phing/phing (2.4.12)
    Downloading: 100%         

  - Installing propel/propel1 (dev-master)
    Cloning 6234fec72db2ad8fc0fe6e1ea6c1cd76abeeef5a

  - Installing monolog/monolog (dev-master)
    Cloning 1.2.1

  - Installing doctrine/dbal (2.3.x-dev)
    Cloning adb28e4e1f959d515971b8e8b7f05a01913a7b91

  - Installing doctrine/orm (2.3.x-dev)
    Cloning bbf527a27356414bfa9bf520f018c5cb7af67c77

  - Installing doctrine/data-fixtures (v1.0.0-ALPHA2)
    Downloading: 100%         

monolog/monolog suggests installing mlehner/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
doctrine/orm suggests installing symfony/yaml (If you want to use YAML Metadata Mapping Driver)
Generating autoload files
➜  symfony git:(master) phpunit                  

Fatal error: Cannot redeclare class Symfony\Component\Yaml\Tests\DumperTest in /usr/local/src/symfony/src/Symfony/Component/Yaml/Tests/DumperTest.php on line 161

Call Stack:
    0.0002     274984   1. {main}() /usr/local/src/phpunit/phpunit.php:0
    0.0757    2845976   2. PHPUnit_TextUI_Command::main() /usr/local/src/phpunit/phpunit.php:46
    0.0757    2846568   3. PHPUnit_TextUI_Command->run() /usr/local/src/phpunit/PHPUnit/TextUI/Command.php:130
    0.0757    2847120   4. PHPUnit_TextUI_Command->handleArguments() /usr/local/src/phpunit/PHPUnit/TextUI/Command.php:139
    0.0974    3814688   5. PHPUnit_Util_Configuration->getTestSuiteConfiguration() /usr/local/src/phpunit/PHPUnit/TextUI/Command.php:666
    0.0974    3816464   6. PHPUnit_Util_Configuration->getTestSuite() /usr/local/src/phpunit/PHPUnit/Util/Configuration.php:771
    0.5300   11648312   7. PHPUnit_Framework_TestSuite->addTestFiles() /usr/local/src/phpunit/PHPUnit/Util/Configuration.php:855
    6.5017  138748672   8. PHPUnit_Framework_TestSuite->addTestFile() /usr/local/src/phpunit/PHPUnit/Framework/TestSuite.php:417
    6.5027  138749056   9. PHPUnit_Util_Fileloader::checkAndLoad() /usr/local/src/phpunit/PHPUnit/Framework/TestSuite.php:356
    6.5027  138749336  10. PHPUnit_Util_Fileloader::load() /usr/local/src/phpunit/PHPUnit/Util/Fileloader.php:77

@stof
Copy link
Member
stof commented Aug 31, 2012

This is weird. I don't find any duplicated class declaration for this test. Could it be possible that phpunit includes the file twice ?

@pborreli
Copy link
Contributor

fabpot added a commit that referenced this issue Aug 31, 2012
Commits
-------

7ef6295 Removed the unnecessary file include

Discussion
----------

Removed the unnecessary file include

As of Doctrine 2.2, the ORM annotations can be found by the autoloader directly.

This will also avoid breaking the testsuite in case the dev deps have not been installed as the ORM would not be available in this case (the tests relying on the ORM should already be skipped when it is not available). See #5402
@sebastianbergmann
Copy link
Contributor Author

True, I did not know about http://symfony.com/doc/master/contributing/code/tests.html. Why? Because I expect this information in a README file in the repository. Oh, well.

@webmozart
Copy link
Contributor

@sebastianbergmann Could you send a PR updating the README file with your expected information?

@dzuelke
Copy link
Contributor
dzuelke commented Aug 31, 2012

Less snark, more pull requests maybe, @sebastianbergmann?

FWIW, I'd put this into a CONTRIBUTING file.

@sebastianbergmann
Copy link
Contributor Author

I do not like your attitude, @dzuelke. What you "demand" already happened.

@dzuelke
Copy link
Contributor
dzuelke commented Aug 31, 2012

I do not like your tone, @sebastianbergmann.

@sebastianbergmann
Copy link
Contributor Author

I do not like yours, either. I asked for feedback on PHPUnit 3.7RC. @fabpot replied mentioning an issue with Symfony. To research this issue I need to run the Symfony test suite. I ran into problems, I opened this ticket asking for help. And while others are helping ... you are attacking me for not contributing.

@dzuelke
Copy link
Contributor
dzuelke commented Aug 31, 2012

Right, I'm not helping, I was just the first person who told you how to install the required dependencies (here and on Twitter). All of your comments this PR are unnecessarily passive-aggressive. If you don't see that, then figure out a way to get out of your bubble until you do please.

@sebastianbergmann
Copy link
Contributor Author

Indeed, you helped in the beginning. Sorry that I forgot about that. I overreacted because of your "Less snark, more pull requests maybe" remark. At least to me, such a remark is offensive.

I do not use Composer, Symfony, Travis, etc. This is why I ran into the original issue. For me it was clear from the beginning that I would send a pull request once I gathered all the information I needed, that's just what I do. If my comments came across as passive-aggressive or offended in any way: my apologies.

@gquemener
Copy link
Contributor

And finally, did you find a solution for your Cannot redeclare class Symfony\Component\Yaml\Tests\DumperTest issue @sebastianbergmann ?

@sebastianbergmann
Copy link
Contributor Author

Yes, it was PHPUnit's fault: sebastianbergmann/dbunit@4ca6667

@schmittjoh
Copy link
Contributor

@sebastianbergmann, I see that you require a few more Symfony files there, how does that work when we want to test the Yaml component with PHPUnit, wouldn't we test the classes that are in PEAR then?

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

7 participants
0