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

Commit178fc17

Browse files
Fix doc about deprecations policy
1 parent95de32a commit178fc17

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

‎contributing/code/conventions.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ A feature is marked as deprecated by adding a ``@deprecated`` phpdoc to
9292
relevant classes, methods, properties, ...::
9393

9494
/**
95-
* @deprecated Deprecated since version 2.X, to be removed in2.Y. Use XXX instead.
95+
* @deprecated Deprecated since version 2.8, to be removed in3.0. Use XXX instead.
9696
*/
9797

9898
The deprecation message should indicate the version when the class/method was
@@ -103,4 +103,9 @@ A PHP ``E_USER_DEPRECATED`` error must also be triggered to help people with
103103
the migration starting one or two minor versions before the version where the
104104
feature will be removed (depending on the criticality of the removal)::
105105

106-
trigger_error('XXX() is deprecated since version 2.X and will be removed in 2.Y. Use XXX instead.', E_USER_DEPRECATED);
106+
@trigger_error('XXX() is deprecated since version 2.8 and will be removed in 3.0. Use XXX instead.', E_USER_DEPRECATED);
107+
108+
Without the @-silencing operator, users would need to opt-out from deprecation
109+
notices. Silencing swaps this behavior and allows users to opt-in when they are
110+
ready to cope with them (by adding a custom error handler like the one used by
111+
the Web Debug Toolbar or the PHPUnit bridge.)

‎cookbook/upgrade/major_version.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ There are a couple of steps to upgrading a major version:
2626
During the lifecycle of a major release, new features are added and method
2727
signatures and public API usages are changed. However,
2828
:doc:`minor versions</cookbook/upgrade/minor_version>` should not contain any
29-
backwardscompatibility changes. To accomplish this, the "old" (e.g. functions,
29+
backwardsincompatible changes. To accomplish this, the "old" (e.g. functions,
3030
classes, etc) code still works, but is marked as *deprecated*, indicating that
3131
it will be removed/changed in the future and that you should stop using it.
3232

@@ -35,9 +35,9 @@ functionality are removed. So, as long as you've updated your code to stop
3535
using these deprecated features in the last version before the major (e.g.
3636
2.8.*), you should be able to upgrade without a problem.
3737

38-
To help you with this,the last minor releases will trigger deprecated notices.
39-
For example, 2.7 and 2.8 triggerdeprecatednotices. When visiting your
40-
application in the:doc:`dev environment</cookbook/configuration/environments>`
38+
To help you with this,deprecation notices are triggered whenever you end up
39+
using adeprecatedfeature. When visiting your application in the
40+
:doc:`dev environment</cookbook/configuration/environments>`
4141
in your browser, these notices are shown in the web dev toolbar:
4242

4343
..image::/images/cookbook/deprecations-in-profiler.png
@@ -52,7 +52,7 @@ To make sure this doesn't happen, you can install the PHPUnit bridge:
5252

5353
..code-block::bash
5454
55-
$ composer require symfony/phpunit-bridge
55+
$ composer require--devsymfony/phpunit-bridge
5656
5757
Now, your tests execute normally and a nice summary of the deprecation notices
5858
is displayed at the end of the test report:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp