-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
remove duplicate calls to initObjectManager in bootstrap class #9140
Conversation
@@ -279,7 +279,6 @@ protected function assertMaintenance() | |||
if (null === $isExpected) { | |||
return; | |||
} | |||
$this->initObjectManager(); | |||
/** @var \Magento\Framework\App\MaintenanceMode $maintenance */ | |||
$this->maintenance = $this->objectManager->get(\Magento\Framework\App\MaintenanceMode::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could also be removed :) Maintenance is now also initialized in constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Bartlomiejsz i think we can remove Maintenance initialization from constructor .
I don't know why Maintenance initialization happens in two times (assertMaintenance method,initObjectManager method)
i think Its enough in assertMaintenance.
anyway I'm looking for core team feedback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sivajik34 @Bartlomiejsz To me it looks like it is enough only once. Seems to be some artifacts from legacy code. Going to look into it more deeply.
@sivajik34 thank you for your contribution! |
There are duplicate calls for initobjectManager method,i think we can initialize objectmanager in constructor,so that object manager class will be available at the time of bootstrap object creation.