Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[PhpUnitBridge] Doc for @expectedDeprecation & new configuration env vars#7074

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
xabbuh merged 1 commit intosymfony:masterfromnicolas-grekas:phpunit-new
Oct 26, 2016

Conversation

@nicolas-grekas
Copy link
Member

theofidry reacted with thumbs up emoji
/**
* @group legacy
* @expectedDeprecation This "%s" method is deprecated.
* @expectedDeprecation The second argument of the "%s" method is deprecated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

is the order of annotations important ? If they must be in the same order than the triggered deprecation, this should be documented (or changed in the code)

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

yes it is, open for discussion for sure

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Note added above

Copy link
Member

@javiereguiluzjaviereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

* Displays the stack trace of a deprecation on-demand;

* Provides a ``ClockMock``helperclass for time-sensitive tests.
* Provides a ``ClockMock``and ``DnsMock`` helpersclass for time or network-sensitive tests.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

helpers class ->helper classes

@nicolas-grekasnicolas-grekasforce-pushed thephpunit-new branch 2 times, most recently fromdb04ea6 to845d094CompareOctober 21, 2016 15:43
fabpot added a commit to symfony/symfony that referenced this pull requestOct 21, 2016
…cation` (nicolas-grekas)This PR was merged into the 3.2-dev branch.Discussion----------[PhpUnitBridge] Replace ErrorAssert by `@expectedDeprecation`| Q             | A| ------------- | ---| Branch?       | 3.2| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#18880| License       | MIT| Doc PR        |symfony/symfony-docs#7074For 3.2, that's what the feat. freeze is for in this case. ping@xabbuhSeehttps://github.com/symfony/symfony/pull/20255/files?w=1Commits-------c344203 [PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
fabpot added a commit to symfony/symfony that referenced this pull requestOct 21, 2016
…unit versions (nicolas-grekas)This PR was merged into the 3.2-dev branch.Discussion----------[PhpUnitBridge] Allow configuring removed deps and phpunit versions| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | no| Fixed tickets | -| License       | MIT| Doc PR        |symfony/symfony-docs#7074Allowing greater reuse of the wrapper.Commits-------fb1c5b8 [PhpUnitBridge] Allow configuring removed deps and phpunit versions
symfony-splitter pushed a commit to symfony/phpunit-bridge that referenced this pull requestOct 21, 2016
…unit versions (nicolas-grekas)This PR was merged into the 3.2-dev branch.Discussion----------[PhpUnitBridge] Allow configuring removed deps and phpunit versions| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | no| Fixed tickets | -| License       | MIT| Doc PR        |symfony/symfony-docs#7074Allowing greater reuse of the wrapper.Commits-------fb1c5b8 [PhpUnitBridge] Allow configuring removed deps and phpunit versions
Write Assertions about Deprecations
-----------------------------------

When adding deprecations to your code, you might like writting tests that verify
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

typo: writting -> writing

When adding deprecations to your code, you might like writting tests that verify
that they are triggered as required. To do so, the bridge provides the
``@expectedDeprecation`` annotation that you can use on your test methods,
alongside with the expected message, given in the same format than for the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

"[...] that you can use on your test methods. It requires you to pass the expected message, [...]"

``@expectedDeprecation`` annotation that you can use on your test methods,
alongside with the expected message, given in the same format than for the
`PHPUnit assertStringMatchesFormat()`_ method. If you expect more than one
deprecation messages for a given test method, you can use the annotation several
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

"messages" -> "message"

..tip::

Set the ``SYMFONY_PHPUNIT_REMOVE`` env var to ``symfony/yaml`` if you need
``prophecy`` but not ``symfony/yaml``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What does "if you need" mean? Am I not able to use Prophecy if I don't set this env var tosymfony/yaml?

Copy link
MemberAuthor

@nicolas-grekasnicolas-grekasOct 23, 2016
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yes: as stated before, the default is to have prophecy and symfony/yaml removed

that they are triggered as required. To do so, the bridge provides the
``@expectedDeprecation`` annotation that you can use on your test methods,
alongside with the expected message, given in the same format than for the
`PHPUnit assertStringMatchesFormat()`_ method. If you expect more than one
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

"PHPUnit's assertStringMatchesFormat() method"

@nicolas-grekas
Copy link
MemberAuthor

Comments addressed
Status: needs review

@wouterj
Copy link
Member

👍
status: reviewed

@xabbuh
Copy link
Member

Thank you@nicolas-grekas.

@xabbuhxabbuh merged commita1682de intosymfony:masterOct 26, 2016
xabbuh added a commit that referenced this pull requestOct 26, 2016
…iguration env vars (nicolas-grekas)This PR was merged into the master branch.Discussion----------[PhpUnitBridge] Doc for @expectedDeprecation & new configuration env varsRelated tosymfony/symfony#20255 &symfony/symfony#20256Commits-------a1682de [PhpUnitBridge] Doc for @expectedDeprecation & new configuration env vars
xabbuh added a commit that referenced this pull requestOct 26, 2016
@nicolas-grekasnicolas-grekas deleted the phpunit-new branchJuly 1, 2018 20:44
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@wouterjwouterjwouterj approved these changes

+1 more reviewer

@stofstofstof left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@nicolas-grekas@wouterj@xabbuh@javiereguiluz@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp