@@ -196,12 +196,12 @@ arbitrary threshold by setting ``SYMFONY_DEPRECATIONS_HELPER`` to
196
196
higher number of deprecation notices is reached (``0 `` is the default
197
197
value).
198
198
199
- You can even finer-grained control by using other keys of the ``max ``
200
- array, which are ``internal ``, ``direct ``, and ``indirect ``. The
199
+ You can have even finer-grained control by using other keys of the ``max ``
200
+ array, which are ``self ``, ``direct ``, and ``indirect ``. The
201
201
``SYMFONY_DEPRECATIONS_HELPER `` environment variable accept a
202
202
url-encoded string, meaning you can combine thresholds and any other
203
203
configuration setting, like this:
204
- ``SYMFONY_DEPRECATIONS_HELPER=max[total]=42&max[internal ]=0&verbose=0 ``
204
+ ``SYMFONY_DEPRECATIONS_HELPER=max[total]=42&max[self ]=0&verbose=0 ``
205
205
206
206
Internal deprecations
207
207
.....................
221
221
* forget to fix the deprecated calls if there are any;
222
222
* forget to mark appropriate tests with the ``@group legacy `` annotations.
223
223
224
- By using ``SYMFONY_DEPRECATIONS_HELPER=max[internal ]=0 ``,
224
+ By using ``SYMFONY_DEPRECATIONS_HELPER=max[self ]=0 ``,
225
225
deprecations that are triggered outside the ``vendors `` directory will
226
226
be accounted for seperately, while deprecations triggered from a library
227
227
inside it will not (unless you reach 999999 of these), giving you
@@ -234,33 +234,34 @@ When working on a project, you might be more interested in
234
234
``max[direct] ``. Let's say you want to fix deprecations as soon as
235
235
they appear. A problem many people experience is that some dependencies
236
236
they have tend to lag behind their own dependencies, meaning they do not
237
- fix deprecations as soon as possible, which means there is nothing you
238
- can do to fix those (apart from a pull request on the outdated vendor).
239
- This key allows you to put a threshold on direct deprecations only,
240
- allowing you to notice when *your code * is using deprecated APIs, and to
241
- keep up with the changes. You can of course still use ``max[indirect] ``
242
- if you want to keep indirect deprecations under a given threshold.
237
+ fix deprecations as soon as possible, which means you should create a pull
238
+ request on the outdated vendor, and ignore these deprecations until your
239
+ pull request is merged. This key allows you to put a threshold on direct
240
+ deprecations only,allowing you to notice when *your code * is using
241
+ deprecated APIs, and to keep up with the changes. You can of course
242
+ still use ``max[indirect] `` if you want to keep indirect deprecations
243
+ under a given threshold.
243
244
244
245
Here is a summary that should help you pick the right configuration:
245
246
246
247
+------------------------+-----------------------------------------------------+
247
248
| Value | Recommended situation |
248
249
+========================+=====================================================+
249
250
| max[total]=0 | Recommended for actively maintained projects |
250
- | | with little to no dependencies |
251
+ | | with robust/ no dependencies |
251
252
+------------------------+-----------------------------------------------------+
252
253
| max[direct]=0 | Recommended for projects with dependencies |
253
254
| | that fail to keep up with new deprecations. |
254
255
+------------------------+-----------------------------------------------------+
255
- | max[internal ]=0 | Recommended for libraries that use |
256
+ | max[self ]=0 | Recommended for libraries that use |
256
257
| | the deprecation system themselves and |
257
258
| | cannot afford to use one of the modes above. |
258
259
+------------------------+-----------------------------------------------------+
259
260
260
261
Disabling the verbose output
261
262
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
262
263
263
- By default, the brige will display a detailed output with the number of
264
+ By default, the bridge will display a detailed output with the number of
264
265
deprecations and where they arise. If this is too much for you, you can
265
266
use ``SYMFONY_DEPRECATIONS_HELPER=verbose=0 `` to turn the verbose output
266
267
off.
0 commit comments