Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| /** | ||
| * @group legacy | ||
| * @expectedDeprecation This "%s" method is deprecated. | ||
| * @expectedDeprecation The second argument of the "%s" method is deprecated. |
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.
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)
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.
yes it is, open for discussion for sure
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.
Note added above
javiereguiluz left a comment
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.
👍
components/phpunit_bridge.rst Outdated
| * 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. |
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.
helpers class ->helper classes
db04ea6 to845d094Compare…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
…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
…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
components/phpunit_bridge.rst Outdated
| Write Assertions about Deprecations | ||
| ----------------------------------- | ||
| When adding deprecations to your code, you might like writting tests that verify |
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.
typo: writting -> writing
components/phpunit_bridge.rst Outdated
| 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 |
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.
"[...] that you can use on your test methods. It requires you to pass the expected message, [...]"
components/phpunit_bridge.rst Outdated
| ``@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 |
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.
"messages" -> "message"
| ..tip:: | ||
| Set the ``SYMFONY_PHPUNIT_REMOVE`` env var to ``symfony/yaml`` if you need | ||
| ``prophecy`` but not ``symfony/yaml``. |
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.
What does "if you need" mean? Am I not able to use Prophecy if I don't set this env var tosymfony/yaml?
nicolas-grekasOct 23, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
Yes: as stated before, the default is to have prophecy and symfony/yaml removed
components/phpunit_bridge.rst Outdated
| 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 |
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.
"PHPUnit's assertStringMatchesFormat() method"
nicolas-grekas commentedOct 23, 2016
Comments addressed |
wouterj commentedOct 23, 2016
👍 |
xabbuh commentedOct 26, 2016
Thank you@nicolas-grekas. |
…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
Related tosymfony/symfony#20255 &symfony/symfony#20256