-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[phpunit] disable prophecy #18304
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
[phpunit] disable prophecy #18304
Conversation
Isn't it fixed already ? A bunch of PRs related to it have been merged already |
you forgot to update the cache id |
@@ -52,6 +52,8 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__ | |||
$zip->close(); | |||
chdir("phpunit-$PHPUNIT_VERSION"); | |||
passthru("$COMPOSER remove --no-update symfony/yaml"); | |||
passthru("$COMPOSER remove --no-update phpspec/prophecy"); | |||
passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"3.1.1\""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.1.1 is not compatible with PHP 5.3 to 5.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change should not be done for PHPUnit 4.8, as it depends on phpunit/phpunit-mock-objects ~2.3
@nicolas-grekas can you also try to debug failures in https://travis-ci.org/symfony/symfony/jobs/118326801#L1867 ? This looks weird as the PropertyAccess 2.3.0 component is installed, and it contains this class. This makes me think there might be a corruption of the installation in our Travis setup |
@stof I fixed a lot of mocks Sebastian Bergmann reported for the |
b9b78b4
to
3c8b116
Compare
3c8b116
to
ae9bae7
Compare
Rebased on top of #18306 |
No need to change the cache id btw here |
@nicolas-grekas What is the point in adding this but not updating the cache id? This way it doesn't have any affect, does it (seems I do miss something)? |
The real cache-id is the md5 of the phpunit file itself. The cache id in the comment is just a way to change this md5 without changing actual code. |
A PR to fix Prophecy is ready: phpspec/prophecy#264 |
@dunglas we don't use prophecy in Symfony's test suite. Should we allow using it? Until now, we've asked people submitting prophecy tests to rewrite them to regular phpunit mock tests. If we stick to this policy, then we should merge this PR. If we should allow prophecy, then not of course. |
IIUC, prophecy is not a direct dep, but installed but phpunit, right? In any case, we are not using prophecy in Symfony, so let's drop it. |
And if we start using it, we would then be able to add it explicitly. |
Thank you @nicolas-grekas. |
This PR was merged into the 2.3 branch. Discussion ---------- [phpunit] disable prophecy | Q | A | ------------- | --- | Branch? | 2.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Both Prophecy and Symfony require some phpdocumentor dependencies, but incompatible versions. Since we don't use Prophecy, let's disable it. phpunit-mock-objects is forced to v3.1.1 until we fix our test suite (see sebastianbergmann/phpunit-mock-objects#299). Commits ------- ae9bae7 [phpunit] disable prophecy
@nicolas-grekas it was just a side note. |
Both Prophecy and Symfony require some phpdocumentor dependencies, but incompatible versions.
Since we don't use Prophecy, let's disable it.
phpunit-mock-objects is forced to v3.1.1 until we fix our test suite (see sebastianbergmann/phpunit-mock-objects#299).