Skip to content

Commit f797293

Browse files
committedMar 7, 2016
[2.7] update readme files for new components
1 parent 0af081b commit f797293

File tree

1 file changed

+8
-47
lines changed

1 file changed

+8
-47
lines changed
 

‎README.md

+8-47
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,11 @@ PHPUnit Bridge
33

44
Provides utilities for PHPUnit, especially user deprecation notices management.
55

6-
It comes with the following features:
7-
8-
* enforce a consistent `C` locale;
9-
* auto-register `class_exists` to load Doctrine annotations;
10-
* print a user deprecation notices summary at the end of the test suite.
11-
12-
By default any non-legacy-tagged or any non-@-silenced deprecation notices will
13-
make tests fail.
14-
This can be changed by setting the `SYMFONY_DEPRECATIONS_HELPER` environment
15-
variable to `weak`. This will make the bridge ignore deprecation notices and
16-
is useful to projects that must use deprecated interfaces for backward
17-
compatibility reasons.
18-
19-
A summary of deprecation notices is displayed at the end of the test suite:
20-
21-
* **Unsilenced** reports deprecation notices that were triggered without the
22-
recommended @-silencing operator;
23-
* **Legacy** deprecation notices denote tests that explicitly test some legacy
24-
interfaces. There are four ways to mark a test as legacy:
25-
- make its class start with the `Legacy` prefix;
26-
- make its method start with `testLegacy`;
27-
- make its data provider start with `provideLegacy` or `getLegacy`;
28-
- add the `@group legacy` annotation to its class or method.
29-
* **Remaining/Other** deprecation notices are all other (non-legacy)
30-
notices, grouped by message, test class and method.
31-
32-
Usage
33-
-----
34-
35-
Add this bridge to the `require-dev` section of your `composer.json` file
36-
(not in `require`) with e.g. `composer require --dev "symfony/phpunit-bridge"`.
37-
38-
When running `phpunit`, you will see a summary of deprecation notices at the end
39-
of the test suite.
40-
41-
Deprecation notices in the **Unsilenced** section should just be @-silenced:
42-
`@trigger_error('...', E_USER_DEPRECATED);`. Without the @-silencing operator,
43-
users would need to opt-out from deprecation notices. Silencing by default swaps
44-
this behavior and allows users to opt-in when they are ready to cope with them
45-
(by adding a custom error handler like the one provided by this bridge.)
46-
47-
Deprecation notices in the **Remaining/Other** section need some thought.
48-
You have to decide either to:
49-
50-
* update your code to not use deprecated interfaces anymore, thus gaining better
51-
forward compatibility;
52-
* or move them to the **Legacy** section (by using one of the above way).
6+
Resources
7+
---------
8+
9+
* [Documentation](https://symfony.com/doc/current/components/phpunit_bridge.html)
10+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
11+
* [Report issues](https://github.com/symfony/symfony/issues) and
12+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
13+
in the [main Symfony repository](https://github.com/symfony/symfony)

0 commit comments

Comments
 (0)
Please sign in to comment.