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 499ad6d

Browse filesBrowse files
committed
minor #32408 [Stopwatch] Deprecate passing null in Section::get() method. (jschaedl)
This PR was merged into the 4.4 branch. Discussion ---------- [Stopwatch] Deprecate passing null in Section::get() method. | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #32179<!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | N/A This PR is related to #32242 Commits ------- ea48176 [Stopwatch] Deprecate passing null in Section::get() method.
2 parents a640c30 + ea48176 commit 499ad6d
Copy full SHA for 499ad6d

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.