diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 0bf5f52..200da95 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -4,14 +4,18 @@ on: [push] jobs: build: - name: ${{matrix.operating-system}}, PHP ${{ matrix.php }} + name: PHP ${{ matrix.php }}, Mode ${{ matrix.mode }} runs-on: ${{ matrix.operating-system }} strategy: matrix: operating-system: [ ubuntu-latest ] - php: ['8.1' ] + php: ['8.0', '8.3' ] + mode: ['stable', 'lowest'] + exclude: + - php: '8.3' + mode: 'lowest' steps: - uses: actions/checkout@master @@ -21,8 +25,13 @@ jobs: with: php-version: ${{ matrix.php }} - - name: Install dependencies - run: composer install + - name: Install dependencies in stable mode + if: matrix.mode == 'stable' + run: composer update --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Install lowest supported dependencies in lowest mode + if: matrix.mode == 'lowest' + run: composer update --prefer-lowest --no-interaction --no-progress --optimize-autoloader --ansi - name: Run psalm run: php vendor/bin/psalm diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e3dab0..8ef6633 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,14 +4,22 @@ on: [push] jobs: build: - name: ${{matrix.operating-system}}, PHP ${{ matrix.php }} + name: PHP ${{ matrix.php }}, Mode ${{ matrix.mode }} runs-on: ${{ matrix.operating-system }} strategy: matrix: - operating-system: [ ubuntu-latest, ubuntu-20.04 ] - php: [ '8.0', '8.1' ] + operating-system: [ ubuntu-latest ] + php: [ '8.0', '8.1', '8.2', '8.3' ] + mode: ['stable', 'lowest'] + exclude: + - php: '8.1' + mode: 'lowest' + - php: '8.2' + mode: 'lowest' + - php: '8.3' + mode: 'lowest' steps: - uses: actions/checkout@master @@ -21,8 +29,13 @@ jobs: with: php-version: ${{ matrix.php }} - - name: Install dependencies - run: composer install + - name: Install dependencies in stable mode + if: matrix.mode == 'stable' + run: composer update --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Install lowest supported dependencies in lowest mode + if: matrix.mode == 'lowest' + run: composer update --prefer-lowest --no-interaction --no-progress --optimize-autoloader --ansi - name: Run tests run: php vendor/bin/codecept run diff --git a/composer.json b/composer.json index 3322a63..cdf5781 100644 --- a/composer.json +++ b/composer.json @@ -12,8 +12,8 @@ "require": { "php": ">=8.0", "ext-json": "*", - "psr/http-message": "^1.0", - "psr/log": "^1.0" + "psr/http-message": "^1 | ^2", + "psr/log": "^1 | ^2 | ^3" }, "require-dev": { "nyholm/psr7": "^1.0", diff --git a/src/Extensions/BreadcrumbLogger.php b/src/Extensions/BreadcrumbLogger.php index e858143..4d3c90a 100644 --- a/src/Extensions/BreadcrumbLogger.php +++ b/src/Extensions/BreadcrumbLogger.php @@ -57,7 +57,7 @@ public function __construct( /** * @inheritdoc */ - public function log($level, $message, array $context = []) + public function log($level, $message, array $context = []): void { $this->breadcrumbs[] = new Breadcrumb( $this->createTimestamp(),