From 1790f465d7e57b30721ce86a159108a110b50987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Glawaty?= Date: Mon, 14 Oct 2024 06:41:57 +0200 Subject: [PATCH 1/2] Allowed `symfony/yaml` v7 and added PHP 8.3 between tested versions --- .github/workflows/tests.yml | 2 +- Dockerfile | 16 +++++++++++++++- Makefile | 1 + composer.json | 2 +- docker-compose.yml | 11 +++++++++-- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f9223f5..886a375 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['7.4', '8.0', '8.1', '8.2'] + php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3'] steps: - name: Checkout uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index ed6ba91..bb6ff1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN apk add --no-cache ${PHPIZE_DEPS} \ CMD tail -f /dev/null -FROM php:8.2.7RC1-cli-alpine3.18 AS php82 +FROM php:8.2.24-cli-alpine3.20 AS php82 CMD ["/bin/sh"] WORKDIR /var/www/html @@ -49,3 +49,17 @@ RUN apk add --no-cache ${PHPIZE_DEPS} \ && docker-php-ext-enable pcov CMD tail -f /dev/null + +FROM php:8.3.12-cli-alpine3.20 AS php83 + +CMD ["/bin/sh"] +WORKDIR /var/www/html + +RUN apk add --no-cache --update git +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer +RUN apk add --no-cache ${PHPIZE_DEPS} \ + && pecl install pcov \ + && pecl install uopz-7.1.1 \ + && docker-php-ext-enable pcov uopz + +CMD tail -f /dev/null diff --git a/Makefile b/Makefile index 7807b69..27be3fb 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ tests.all: PHP=80 make tests.run PHP=81 make tests.run PHP=82 make tests.run + PHP=83 make tests.run cs.fix: PHP=74 make composer.update diff --git a/composer.json b/composer.json index c4cf8e9..ffefd3e 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "ext-json": "*", "guzzlehttp/guzzle": "^7.7", "jms/serializer": "^3.24", - "symfony/yaml": "^5.4" + "symfony/yaml": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.17", diff --git a/docker-compose.yml b/docker-compose.yml index fe6ea16..a887063 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.7" - services: php74: build: @@ -36,3 +34,12 @@ services: container_name: 68publishers.crawler-client-php.82 volumes: - .:/var/www/html:cached + + php83: + build: + context: . + dockerfile: Dockerfile + target: php83 + container_name: 68publishers.crawler-client-php.83 + volumes: + - .:/var/www/html:cached From d21d5e7108d74ffa8cfdcef9dc9558aa2cb82586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Glawaty?= Date: Mon, 14 Oct 2024 06:46:21 +0200 Subject: [PATCH 2/2] Fixed PHPStan --- src/Serializer/Handler/ObjectOrArrayHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Serializer/Handler/ObjectOrArrayHandler.php b/src/Serializer/Handler/ObjectOrArrayHandler.php index a015744..e07f076 100644 --- a/src/Serializer/Handler/ObjectOrArrayHandler.php +++ b/src/Serializer/Handler/ObjectOrArrayHandler.php @@ -33,7 +33,7 @@ public static function getSubscribingMethods(): array * @param mixed $data * @param array $type * - * @return array|ArrayObject + * @return array|ArrayObject|null */ public function serialize(SerializationVisitorInterface $visitor, $data, array $type, SerializationContext $context) {