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 9f1acc1

Browse filesBrowse files
committed
bug #25264 [DI] Trigger deprecation when setting a to-be-private synthetic service (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [DI] Trigger deprecation when setting a to-be-private synthetic service | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #25253 | License | MIT | Doc PR | - Commits ------- 2817576 [DI] Trigger deprecation when setting a to-be-private synthetic service
2 parents 9401afd + 2817576 commit 9f1acc1
Copy full SHA for 9f1acc1

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎src/Symfony/Component/DependencyInjection/Container.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Container.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function set($id, $service)
174174
}
175175

176176
if (isset($this->privates[$id]) || !(isset($this->fileMap[$id]) || isset($this->methodMap[$id]))) {
177-
if (isset($this->syntheticIds[$id]) || (!isset($this->privates[$id]) && !isset($this->getRemovedIds()[$id]))) {
177+
if (!isset($this->privates[$id]) && !isset($this->getRemovedIds()[$id])) {
178178
// no-op
179179
} elseif (null === $service) {
180180
@trigger_error(sprintf('The "%s" service is private, unsetting it is deprecated since Symfony 3.2 and will fail in 4.0.', $id), E_USER_DEPRECATED);

0 commit comments

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