From 9bdfac3a94d2e1e2e37799bff1b1ca8dd8044036 Mon Sep 17 00:00:00 2001 From: sinansoezen Date: Tue, 31 Aug 2021 10:26:20 +0200 Subject: [PATCH 1/4] using token only when there is a master request --- .../Processor/ExceptionEnricherProcessor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; From 5a6c50c9971baa6ab37cb94a215e5c60a6cfcdba Mon Sep 17 00:00:00 2001 From: sinansoezen Date: Tue, 31 Aug 2021 10:34:35 +0200 Subject: [PATCH 2/4] updated main branch name for ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13fe89e..526e02d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ name: Continuous Integration on: pull_request: push: - branches: [ master ] + branches: [ main ] jobs: phpunit: From b48bc9d88845a4a504b0a2a17800442f295ac38b Mon Sep 17 00:00:00 2001 From: sinansoezen Date: Tue, 31 Aug 2021 10:40:48 +0200 Subject: [PATCH 3/4] updated readme badge --- .github/workflows/ci.yml | 3 +-- README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 526e02d..71afb03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ - -name: Continuous Integration +name: build on: pull_request: diff --git a/README.md b/README.md index 45ab403..c491dc9 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=main)](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) From e586f6016fa7ee26e0b9d791b8ca9cd40312bd5a Mon Sep 17 00:00:00 2001 From: sinansoezen Date: Tue, 31 Aug 2021 10:42:43 +0200 Subject: [PATCH 4/4] fixed badge branch --- .github/workflows/ci.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71afb03..42beb79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,9 @@ -name: build +name: GitHub Actions on: pull_request: push: - branches: [ main ] + branches: [ master ] jobs: phpunit: diff --git a/README.md b/README.md index c491dc9..7ed3643 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # sblum Exception Enricher Bundle -[![Build Status](https://github.com/sblum/exception-enricher/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/sblum/exception-enricher/actions) +[![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)