diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13fe89e..42beb79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ - -name: Continuous Integration +name: GitHub Actions on: pull_request: diff --git a/README.md b/README.md index 45ab403..7ed3643 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # sblum Exception Enricher Bundle -[![Build Status](https://travis-ci.org/sblum/exception-enricher.svg?branch=master)](https://travis-ci.org/sblum/exception-enricher) +[![Build Status](https://github.com/sblum/exception-enricher/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/sblum/exception-enricher/actions) [![Latest Stable Version](https://poser.pugx.org/sblum/exception-enricher/v/stable)](https://packagist.org/packages/sblum/exception-enricher) [![License](https://poser.pugx.org/sblum/exception-enricher/license)](https://packagist.org/packages/sblum/exception-enricher) diff --git a/src/ExceptionEnricher/Processor/ExceptionEnricherProcessor.php b/src/ExceptionEnricher/Processor/ExceptionEnricherProcessor.php index 681a9b2..555cab9 100644 --- a/src/ExceptionEnricher/Processor/ExceptionEnricherProcessor.php +++ b/src/ExceptionEnricher/Processor/ExceptionEnricherProcessor.php @@ -47,11 +47,11 @@ public function __invoke(array $record): array if ($this->requestStack->getMainRequest()) { $record['extra']['request_ip'] = $this->requestStack->getMainRequest()->getClientIp(); - } - } - if ($this->tokenStorage && $this->tokenStorage->getToken()) { - $record['extra']['username'] = $this->tokenStorage->getToken()->getUserIdentifier(); + if ($this->tokenStorage && $this->tokenStorage->getToken()) { + $record['extra']['username'] = $this->tokenStorage->getToken()->getUserIdentifier(); + } + } } return $record;