Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@snsanich
Copy link

@snsanich snsanich commented Dec 3, 2016

Hi.

PHPUnit feature @runInSeparateProcess cannot work properly if some extensions are not available.

Step by step:

  • include tests/travis/php.ini into php config
  • run php7.0 php --interactive, you will see error/errors:

Warning: PHP Startup: Unable to load dynamic library '...php-7.0.13/lib/php/extensions/no-debug-non-zts-20151012/mongo.so' - dlopen(...php-7.0.13/lib/php/extensions/no-debug-non-zts-20151012/mongo.so, 9): image not found in Unknown on line 0

  • now run phpunit - test set is failed
  • if you remove @runInSeparateProcess - pass!

@GrahamCampbell
Copy link
Contributor

PHPUnit feature @runInSeparateProcess cannot work properly if some extensions are not available

I don't think that's what that error means. That's PHP saying you have a problem with your config file, rather than being related to the testsuite. if you fix you fix your configuration files, then the tests should work correctly.

if you remove @runInSeparateProcess - pass!

Without knowing much about this project, there surely must have been a good reason why it's running in a separate process?

@snsanich
Copy link
Author

snsanich commented Dec 3, 2016

Without knowing much about this project, there surely must have been a good reason why it's running in a separate process?

No reasons to use a separate process were found.

I don't think that's what that error means. That's PHP saying you have a problem with your config file, rather than being related to the testsuite.

Currently I don't know how to implement easy fix for travis environment (php7. php7.1). I think it is affordable price to test project in the most easy way.

@Ocramius
Copy link
Member

Ocramius commented Dec 4, 2016

Indeed, this test does not deal with concurrency, so running it in a separate process is not needed.

The fact that a dynamic library can't be loaded is a bug in your own configuration though, and unrelated with this particular change.

Merging anyway, since the change is valid :-)

@Ocramius Ocramius added this to the 1.7.0 milestone Dec 4, 2016
@Ocramius Ocramius self-assigned this Dec 4, 2016
@Ocramius Ocramius merged commit 9fa5962 into doctrine:master Dec 4, 2016
@Ocramius Ocramius changed the title Disable PHPUnit feature @runInSeparateProcess Disable PHPUnit feature @runInSeparateProcess when not needed Jul 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants