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 ea48176

Browse filesBrowse files
committed
[Stopwatch] Deprecate passing null in Section::get() method.
1 parent 6811aaa commit ea48176
Copy full SHA for ea48176

File tree

3 files changed

+14
-0
lines changed
Filter options

3 files changed

+14
-0
lines changed

‎UPGRADE-4.4.md

Copy file name to clipboardExpand all lines: UPGRADE-4.4.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ Security
108108

109109
* Implementations of `PasswordEncoderInterface` and `UserPasswordEncoderInterface` should add a new `needsRehash()` method
110110

111+
Stopwatch
112+
---------
113+
114+
* Deprecated passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead.
115+
111116
TwigBridge
112117
----------
113118

‎src/Symfony/Component/Stopwatch/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Stopwatch/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.4.0
5+
-----
6+
7+
* Deprecated passing `null` as 1st (`$id`) argument of `Section::get()` method, pass a valid child section identifier instead.
8+
49
3.4.0
510
-----
611

‎src/Symfony/Component/Stopwatch/Section.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Stopwatch/Section.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public function __construct(float $origin = null, bool $morePrecision = false)
6262
*/
6363
public function get($id)
6464
{
65+
if (null === $id) {
66+
@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);
67+
}
68+
6569
foreach ($this->children as $child) {
6670
if ($id === $child->getId()) {
6771
return $child;

0 commit comments

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