diff --git a/UPGRADE-4.4.md b/UPGRADE-4.4.md index 8caa363e9913..39d128e9006e 100644 --- a/UPGRADE-4.4.md +++ b/UPGRADE-4.4.md @@ -108,6 +108,11 @@ Security * Implementations of `PasswordEncoderInterface` and `UserPasswordEncoderInterface` should add a new `needsRehash()` method +Stopwatch +--------- + + * Deprecated passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead. + TwigBridge ---------- diff --git a/src/Symfony/Component/Stopwatch/CHANGELOG.md b/src/Symfony/Component/Stopwatch/CHANGELOG.md index 36d0c25f1a9f..85a62f018119 100644 --- a/src/Symfony/Component/Stopwatch/CHANGELOG.md +++ b/src/Symfony/Component/Stopwatch/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +4.4.0 +----- + + * Deprecated passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead. + 3.4.0 ----- diff --git a/src/Symfony/Component/Stopwatch/Section.php b/src/Symfony/Component/Stopwatch/Section.php index 8f9c3e960a51..de1beb61483e 100644 --- a/src/Symfony/Component/Stopwatch/Section.php +++ b/src/Symfony/Component/Stopwatch/Section.php @@ -62,6 +62,10 @@ public function __construct(float $origin = null, bool $morePrecision = false) */ public function get($id) { + if (null === $id) { + @trigger_error(sprintf('Passing null as 1st ("$id") argument of the "%s()" method is deprecated since Symfony 4.4, pass a valid child section identifier instead.', __METHOD__), E_USER_DEPRECATED); + } + foreach ($this->children as $child) { if ($id === $child->getId()) { return $child;