diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 59781f7a..48266838 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -4,6 +4,9 @@ on: - push - pull_request +permissions: + contents: read # to fetch code (actions/checkout) + jobs: tests: name: "CI (PHP ${{ matrix.php-version }}, ${{ matrix.dependencies }} deps)" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5011a321..eb249e5b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,6 +4,9 @@ on: push: pull_request: +permissions: + contents: read # to fetch code (actions/checkout) + jobs: tests: name: "Lint" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index a5ee083c..cfb94fd9 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -7,6 +7,9 @@ on: env: COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist" +permissions: + contents: read # to fetch code (actions/checkout) + jobs: tests: name: "PHPStan" diff --git a/src/Monolog/Handler/WhatFailureGroupHandler.php b/src/Monolog/Handler/WhatFailureGroupHandler.php index 2dbc5fe8..2d4e817a 100644 --- a/src/Monolog/Handler/WhatFailureGroupHandler.php +++ b/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -63,4 +63,18 @@ class WhatFailureGroupHandler extends GroupHandler } } } + + /** + * {@inheritDoc} + */ + public function close(): void + { + foreach ($this->handlers as $handler) { + try { + $handler->close(); + } catch (\Throwable $e) { + // What failure? + } + } + } }