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

Skip to content

[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

Merged
merged 1 commit into from
Mar 27, 2016
Merged

[phpunit] disable prophecy #18304

merged 1 commit into from
Mar 27, 2016

Conversation

nicolas-grekas
Copy link
Member

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).

@stof
Copy link
Member

stof commented Mar 25, 2016

phpunit-mock-objects is forced to v3.1.1 until we fix our test suite

Isn't it fixed already ? A bunch of PRs related to it have been merged already

@stof
Copy link
Member

stof commented Mar 25, 2016

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\"");
Copy link
Member

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

Copy link
Member

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

@stof
Copy link
Member

stof commented Mar 25, 2016

@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

@xabbuh
Copy link
Member

xabbuh commented Mar 25, 2016

@stof I fixed a lot of mocks Sebastian Bergmann reported for the master branch. But we still have some issues that are only present on the other branches. I am going to prepare pull requests.

@nicolas-grekas
Copy link
Member Author

@stof comments addressed
@xabbuh don't forget to change the cache id and revert forcing mock-objects to 3.1.1 in your PRs

@nicolas-grekas nicolas-grekas changed the title [phpunit] disable prophecy and force mock-objects to v3.1.1 [phpunit] disable prophecy Mar 25, 2016
@nicolas-grekas
Copy link
Member Author

Rebased on top of #18306

@nicolas-grekas
Copy link
Member Author

No need to change the cache id btw here

@xabbuh
Copy link
Member

xabbuh commented Mar 25, 2016

@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)?

@nicolas-grekas
Copy link
Member Author

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.

@dunglas
Copy link
Member

dunglas commented Mar 25, 2016

A PR to fix Prophecy is ready: phpspec/prophecy#264

@nicolas-grekas
Copy link
Member Author

@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.

@fabpot
Copy link
Member

fabpot commented Mar 27, 2016

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.

@fabpot
Copy link
Member

fabpot commented Mar 27, 2016

And if we start using it, we would then be able to add it explicitly.

@fabpot
Copy link
Member

fabpot commented Mar 27, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit ae9bae7 into symfony:2.3 Mar 27, 2016
fabpot added a commit that referenced this pull request Mar 27, 2016
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
@dunglas
Copy link
Member

dunglas commented Mar 27, 2016

@nicolas-grekas it was just a side note.

@nicolas-grekas nicolas-grekas deleted the no-prophecy branch March 30, 2016 06:44
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.

6 participants