8000 [DI] Minor dumping logic simplification by nicolas-grekas · Pull Request #23560 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DI] Minor dumping logic simplification #23560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[DI] Minor dumping logic simplification
  • Loading branch information
nicolas-grekas committed Jul 17, 2017
commit 37d8495a59c14edf6aaadb07591eba41624344d3
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ private function getServiceCall($id, Reference $reference = null)
$code = sprintf('$this->get(\'%s\')', $id);
}

if ($this->container->hasDefinition($id) && (!$this->container->getDefinition($id)->isPublic() || $this->container->getDefinition($id)->isShared())) {
if ($this->container->hasDefinition($id) && $this->container->getDefinition($id)->isShared()) {
// The following is PHP 5.5 syntax for what could be written as "(\$this->services['$id'] ?? $code)" on PHP>=7.0

$code = "\${(\$_ = isset(\$this->services['$id']) ? \$this->services['$id'] : $code) && false ?: '_'}";
Expand Down
0