Skip to content

Commit 53fc964

Browse files
Ethan3600torhoehn
authored andcommitted
Use object manager to pass unit tests
1 parent 66873e3 commit 53fc964

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/internal/Magento/Framework/App/Bootstrap.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,6 @@ class Bootstrap
107107
*/
108108
private $factory;
109109

110-
/**
111-
* Logger
112-
*
113-
* @var LoggerInterface
114-
*/
115-
private $logger;
116-
117110
/**
118111
* Static method so that client code does not have to create Object Manager Factory every time Bootstrap is called
119112
*
@@ -214,7 +207,6 @@ public function __construct(ObjectManagerFactory $factory, $rootDir, array $init
214207
$this->rootDir = $rootDir;
215208
$this->server = $initParams;
216209
$this->objectManager = $this->factory->create($this->server);
217-
$this->logger = $this->objectManager->create(LoggerInterface::class);
218210
}
219211

220212
/**
@@ -267,7 +259,7 @@ public function run(AppInterface $application)
267259
\Magento\Framework\Profiler::stop('magento');
268260
} catch (\Exception $e) {
269261
\Magento\Framework\Profiler::stop('magento');
270-
$this->logger->error($e->getMessage());
262+
$this->objectManager->get(LoggerInterface::class)->error($e);
271263
if (!$application->catchException($this, $e)) {
272264
throw $e;
273265
}

0 commit comments

Comments
 (0)