From 93fead20bf58a053fa348e9e9d94c5523e42ac77 Mon Sep 17 00:00:00 2001 From: Scott Aubrey Date: Fri, 8 Nov 2024 08:50:41 +0000 Subject: [PATCH] Revert "Revert "Update to PHP 8.3"" --- Dockerfile | 4 +- composer.json | 4 +- composer.lock | 139 +++++++++++++----- .../Elasticsearch/Response/SearchResponse.php | 10 -- src/Search/Api/Query/QueryResponse.php | 3 +- 5 files changed, 106 insertions(+), 54 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8229ecfc..1ed24ee3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ## ## base image setup # -FROM php:8.0-apache AS base +FROM php:8.3-apache AS base USER root @@ -40,7 +40,7 @@ COPY --from=composer:2.8 /usr/bin/composer /usr/bin/composer RUN apt-get update && apt-get install retry -y # install tools and config for xdebug -RUN pecl install xdebug-3.1.6 && docker-php-ext-enable xdebug +RUN pecl install xdebug && docker-php-ext-enable xdebug # Use the PHP dev server to run the app CMD ["php", "-S", "0.0.0.0:80", "-t", "./web", "./web/app_dev.php"] diff --git a/composer.json b/composer.json index f886c326..9d085cd1 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } }, "require": { - "php": "8.0.*", + "php": "8.3.*", "aws/aws-sdk-php": "3.288.1", "clue/block-react": "^1.1", "doctrine/annotations": "^1.4", @@ -28,7 +28,7 @@ "elife/content-negotiator": "^1.1", "elife/logging-sdk": "^1.1", "elife/ping": "^1.2", - "guzzlehttp/guzzle": "^6.3", + "guzzlehttp/guzzle": "^7.3", "jms/serializer": "^3.0", "justinrainbow/json-schema": "^5.1", "mindplay/composer-locator": "^2.1", diff --git a/composer.lock b/composer.lock index 2df13c1b..68d3a445 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "557820b15c776a9b8d727cb13e9f9ba8", + "content-hash": "4fdb4d8e99284c0fae2452e12da5c63e", "packages": [ { "name": "aws/aws-crt-php", @@ -659,30 +659,30 @@ }, { "name": "doctrine/instantiator", - "version": "1.5.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", - "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9 || ^11", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.30 || ^5.4" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -709,7 +709,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.5.0" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -725,7 +725,7 @@ "type": "tidelift" } ], - "time": "2022-12-30T00:15:36+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { "name": "doctrine/lexer", @@ -1462,37 +1462,47 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.8", + "version": "7.8.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" + "reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4152d9eb85c445fe1f992001d1748e8bec070d2", + "reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.9", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17" + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^1.9.1 || ^2.6.3", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "6.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -1545,19 +1555,20 @@ } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5.8" + "source": "https://github.com/guzzle/guzzle/tree/7.8.2" }, "funding": [ { @@ -1573,7 +1584,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:07+00:00" + "time": "2024-07-18T11:12:18+00:00" }, { "name": "guzzlehttp/promises", @@ -2458,6 +2469,58 @@ }, "time": "2021-11-05T16:50:12+00:00" }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, { "name": "psr/http-factory", "version": "1.1.0", @@ -3140,25 +3203,25 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v3.5.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -3187,7 +3250,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" }, "funding": [ { @@ -3203,7 +3266,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2024-04-18T09:32:20+00:00" }, { "name": "symfony/error-handler", @@ -7066,7 +7129,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "8.0.*" + "php": "8.3.*" }, "platform-dev": {}, "plugin-api-version": "2.6.0" diff --git a/src/Search/Api/Elasticsearch/Response/SearchResponse.php b/src/Search/Api/Elasticsearch/Response/SearchResponse.php index a16c1731..76dd4f1c 100644 --- a/src/Search/Api/Elasticsearch/Response/SearchResponse.php +++ b/src/Search/Api/Elasticsearch/Response/SearchResponse.php @@ -53,16 +53,6 @@ public function rewind(): void $this->cursor = 0; } - public function serialize() - { - // TODO: Implement serialize() method. - } - - public function unserialize($serialized) - { - // TODO: Implement unserialize() method. - } - public function getTypeTotals() : array { if (isset($this->aggregations['type_agg']['buckets'])) { diff --git a/src/Search/Api/Query/QueryResponse.php b/src/Search/Api/Query/QueryResponse.php index 1fb9b923..cfad684c 100644 --- a/src/Search/Api/Query/QueryResponse.php +++ b/src/Search/Api/Query/QueryResponse.php @@ -3,9 +3,8 @@ namespace eLife\Search\Api\Query; use Iterator; -use Serializable; -interface QueryResponse extends Iterator, Serializable +interface QueryResponse extends Iterator { public function getTotalResults() : int;