diff --git a/UPGRADE-4.4.md b/UPGRADE-4.4.md index 8caa363e99..39d128e900 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 36d0c25f1a..85a62f0181 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 8f9c3e960a..de1beb6148 100644 --- a/src/Symfony/Component/Stopwatch/Section.php +++ b/src/Symfony/Component/Stopwatch/Section.php @@ -62,6 +62,10 @@ class Section */ 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;