Skip to content

Commit 7364da4

Browse files
pronskiychr-hertel
andauthored
Update src/Server/ServerBuilder.php
Co-authored-by: Christopher Hertel <[email protected]>
1 parent ff48241 commit 7364da4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Server/ServerBuilder.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ public function withPrompt(callable|array|string $handler, ?string $name = null,
216216
*/
217217
public function build(): Server
218218
{
219-
if (null === $this->logger) {
220-
$this->withLogger();
221-
}
219+
$logger = $this->logger ?? new NullLogger();
222220

223221
$container = $this->container ?? new Container();
224222
$registry = new Registry(new ReferenceHandler($container), $this->eventDispatcher, $this->logger);

0 commit comments

Comments
 (0)