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

Appearance settings

Commit eb4026b

Browse filesBrowse files
committed
bug #32090 [Debug] workaround BC break in PHP 7.3 (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [Debug] workaround BC break in PHP 7.3 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | https://github.com/symfony/symfony-standard/issues/1138 symfony/website-skeleton#231 | License | MIT | Doc PR | - A new warning has been added in PHP 7.3 that is breaking BC with Symfony, since we turn warnings into exceptions. This PR turns the new warning into a deprecation, so that we will be able to remove the added "if" in 5.0. I noticed a few other similar BC breaks in 7.1 and 7.2, but *unless someone reports that they block them*, I don't think we need to care. - 7.1 A non well formed numeric value encountered E_NOTICE - 7.1 A non-numeric value encountered E_WARNING - 7.2 count() now raises a warning when an invalid parameter is passed. See https://github.com/php/php-src/blob/PHP-7.1/UPGRADING + same in upper branches. Commits ------- d8d43e6 [Debug] workaround BC break in PHP 7.3
2 parents 459e791 + d8d43e6 commit eb4026b
Copy full SHA for eb4026b

File tree

1 file changed

+5
-0
lines changed
Filter options

1 file changed

+5
-0
lines changed

‎src/Symfony/Component/Debug/ErrorHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/ErrorHandler.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,11 @@ private function reRegister($prev)
382382
*/
383383
public function handleError($type, $message, $file, $line)
384384
{
385+
// @deprecated to be removed in Symfony 5.0
386+
if (\PHP_VERSION_ID >= 70300 && $message && '"' === $message[0] && 0 === strpos($message, '"continue') && preg_match('/^"continue(?: \d++)?" targeting switch is equivalent to "break(?: \d++)?"\. Did you mean to use "continue(?: \d++)?"\?$/', $message)) {
387+
$type = E_DEPRECATED;
388+
}
389+
385390
// Level is the current error reporting level to manage silent error.
386391
$level = error_reporting();
387392
$silenced = 0 === ($level & $type);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.