Adjust error_reporting to allow deprecation messages for 3.0

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #12623
| License       | MIT
| Doc PR        | 
Can you add the expression that is equivalent to the number in the comment so that it looks less magical?