Skip to content

[DependencyInjection] fix creating 2nd container instances #44063

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
Nov 15, 2021
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ private function addInlineRequires(bool $hasProxyClasses): string
}

if ($hasProxyClasses) {
$code .= "\n include __DIR__.'/proxy-classes.php';";
$code .= "\n include_once __DIR__.'/proxy-classes.php';";
}

return $code ? sprintf("\n \$this->privates['service_container'] = function () {%s\n };\n", $code) : '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ProjectServiceContainer extends Container
$this->aliases = [];

$this->privates['service_container'] = function () {
include __DIR__.'/proxy-classes.php';
include_once __DIR__.'/proxy-classes.php';
};
}

Expand Down