From 6596f3dc3bcd0565332401aed4c4f5c29e423790 Mon Sep 17 00:00:00 2001 From: Leonardo Lemos Date: Tue, 5 Dec 2023 14:41:23 -0300 Subject: [PATCH] Php8.3 (#314) * add PHP8.3 Support * fix risk tests --- .github/workflows/continous-integration.yml | 2 +- CHANGELOG.md | 4 ++++ Dockerfile | 2 +- composer.json | 2 +- tests/Unit/ResolverTest.php | 9 ++++++--- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index e40805d..950626e 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -59,7 +59,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - php-versions: ['8.1', '8.2'] + php-versions: ['8.1', '8.2', '8.3'] steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index c94afd7..b4f84d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [v2.3.0] +### Added +- Support PHP 8.3 + ## [v2.2.1] ### Removed - Remove webpatser/uuid dependency. diff --git a/Dockerfile b/Dockerfile index d0986f1..068bd9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2-fpm-alpine +FROM php:8.3-fpm-alpine COPY --from=composer:latest /usr/bin/composer /usr/bin/composer RUN apk --no-cache --update add libmemcached-dev zlib-dev libpng-dev libjpeg-turbo-dev freetype-dev libxml2-dev diff --git a/composer.json b/composer.json index 2f89734..4c52c94 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } ], "require": { - "php": ">=7.3|>=8.1", + "php": ">=7.3", "ext-json": "*", "ext-sockets": "*", "php-amqplib/php-amqplib": "^3.1", diff --git a/tests/Unit/ResolverTest.php b/tests/Unit/ResolverTest.php index 0b241b1..c7c1f58 100644 --- a/tests/Unit/ResolverTest.php +++ b/tests/Unit/ResolverTest.php @@ -37,7 +37,8 @@ public function test_it_should_ack_message() //assert $this->channel->shouldReceive('basic_ack') - ->with($delivery_tag); + ->with($delivery_tag) + ->once(); // act $resolver->ack(); @@ -56,7 +57,8 @@ public function test_it_should_reject_message_without_requeue() //assert $this->channel->shouldReceive('basic_nack') - ->with($delivery_tag, false, $requeue); + ->with($delivery_tag, false, $requeue) + ->once(); // act $resolver->reject($requeue); @@ -75,7 +77,8 @@ public function test_it_should_reject_message_with_requeue() //assert $this->channel->shouldReceive('basic_nack') - ->with($delivery_tag, false, $requeue); + ->with($delivery_tag, false, $requeue) + ->once(); // act $resolver->reject($requeue);