]> git.mxchange.org Git - friendica.git/commitdiff
[Composer] Bump guzzlehttp/guzzle to version 7 to suppress deprecation notices
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 12 Jan 2024 06:12:48 +0000 (01:12 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 12 Jan 2024 13:42:46 +0000 (08:42 -0500)
- Bump divineomega/password_exposed to version 3 to remove dependency on Guzzle version 6
- Add new ICanHandleHttpResponses->getBodyString method to solve inheritance mismatch with GuzzleHttp\Psr7\ResponseInterface->getBody return type

34 files changed:
composer.json
composer.lock
src/Contact/Avatar.php
src/Content/OEmbed.php
src/Core/Logger/Handler/ErrorHandler.php
src/Core/Search.php
src/Core/Storage/Type/ExternalResource.php
src/Core/System.php
src/Model/APContact.php
src/Model/Contact.php
src/Model/GServer.php
src/Model/Photo.php
src/Model/Post/Link.php
src/Model/User.php
src/Module/Contact/MatchInterests.php
src/Module/Magic.php
src/Module/OStatus/PubSubHubBub.php
src/Module/OStatus/Subscribe.php
src/Module/Proxy.php
src/Network/HTTPClient/Capability/ICanHandleHttpResponses.php
src/Network/HTTPClient/Client/HttpClient.php
src/Network/HTTPClient/Response/CurlResult.php
src/Network/HTTPClient/Response/GuzzleResponse.php
src/Network/Probe.php
src/Protocol/ActivityPub/Processor.php
src/Protocol/DFRN.php
src/Protocol/OStatus.php
src/Security/ExAuth.php
src/Util/HTTPSignature.php
src/Util/ParseUrl.php
src/Worker/CheckRelMeProfileLink.php
src/Worker/OnePoll.php
src/Worker/UpdateServerPeers.php
tests/src/Network/HTTPClient/Response/CurlResultTest.php

index 21603c7b2731bdb500f962dc611c2fd1bd6368cb..730c24bafaad4821eee8c76df2ccd2e971e9fee9 100644 (file)
                "ext-xml": "*",
                "asika/simple-console": "^1.0",
                "bacon/bacon-qr-code": "^2.0.0",
-               "divineomega/password_exposed": "^2.8",
+               "divineomega/password_exposed": "^3",
                "enyo/dropzone": "^5.9",
                "ezyang/htmlpurifier": "^4.7",
                "friendica/json-ld": "^1.0",
                "geekwright/po": "^2.0",
-               "guzzlehttp/guzzle": "^6.5",
+               "guzzlehttp/guzzle": "^7",
                "guzzlehttp/oauth-subscriber": "^0.6",
                "kornrunner/blurhash": "^1.2",
                "league/html-to-markdown": "^4.8",
index a541913811b7f87f0e6dff3585e3c332dfe2d7b8..a27b09497db5aca1ae6a8d9f67f589690958abed 100644 (file)
@@ -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": "082b16e2c88895f1a03d5b0ffe678ba7",
+    "content-hash": "356019e5d0c92aae938f5292dd0fd103",
     "packages": [
         {
             "name": "asika/simple-console",
         },
         {
             "name": "divineomega/password_exposed",
-            "version": "v2.8.0",
+            "version": "v3.2.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/DivineOmega/password_exposed.git",
-                "reference": "908ed8e62ef95411bd0f866e29c69cef2bbca880"
+                "reference": "327f93ee5cab54622077bcae721412b55be16720"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/DivineOmega/password_exposed/zipball/908ed8e62ef95411bd0f866e29c69cef2bbca880",
-                "reference": "908ed8e62ef95411bd0f866e29c69cef2bbca880",
+                "url": "https://api.github.com/repos/DivineOmega/password_exposed/zipball/327f93ee5cab54622077bcae721412b55be16720",
+                "reference": "327f93ee5cab54622077bcae721412b55be16720",
                 "shasum": ""
             },
             "require": {
                 "divineomega/do-file-cache-psr-6": "^2.0",
-                "guzzlehttp/guzzle": "^6.3",
-                "paragonie/certainty": "^1|^2",
-                "php": ">=5.6"
+                "divineomega/psr-18-guzzle-adapter": "^1.0",
+                "nyholm/psr7": "^1.0",
+                "paragonie/certainty": "^2.4",
+                "php": "^7.1||^8.0",
+                "php-http/discovery": "^1.6",
+                "psr/cache": "^1.0",
+                "psr/http-client": "^1.0",
+                "psr/http-factory-implementation": "^1.0",
+                "psr/http-message": "^1.0",
+                "psr/http-message-implementation": "^1.0"
             },
             "require-dev": {
                 "fzaninotto/faker": "^1.7",
+                "kriswallsmith/buzz": "^1.0",
                 "php-coveralls/php-coveralls": "^2.1",
-                "phpunit/phpunit": "^6.5",
-                "vimeo/psalm": "^1"
+                "phpunit/phpunit": "^7.0||^8.0",
+                "symfony/cache": "^4.2.12",
+                "vimeo/psalm": "^4"
             },
             "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.0-dev"
+                }
+            },
             "autoload": {
-                "psr-4": {
-                    "DivineOmega\\PasswordExposed\\": "src/"
-                },
                 "files": [
                     "src/PasswordExposedFunction.php"
-                ]
+                ],
+                "psr-4": {
+                    "DivineOmega\\PasswordExposed\\": "src/"
+                }
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
                 {
                     "name": "Jordan Hall",
                     "email": "jordan@hall05.co.uk"
+                },
+                {
+                    "name": "Contributors",
+                    "homepage": "https://github.com/DivineOmega/password_exposed/graphs/contributors"
                 }
             ],
             "description": "This PHP package provides a `password_exposed` helper function, that uses the haveibeenpwned.com API to check if a password has been exposed in a data breach.",
-            "time": "2019-01-25T12:00:28+00:00"
+            "homepage": "https://github.com/DivineOmega/password_exposed",
+            "funding": [
+                {
+                    "url": "https://github.com/DivineOmega",
+                    "type": "github"
+                }
+            ],
+            "time": "2021-04-20T09:34:23+00:00"
+        },
+        {
+            "name": "divineomega/psr-18-guzzle-adapter",
+            "version": "v1.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/DivineOmega/psr-18-guzzle-adapter.git",
+                "reference": "a2bdcddd4d4a17aac460e58d1e064e6bd2de5e57"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/DivineOmega/psr-18-guzzle-adapter/zipball/a2bdcddd4d4a17aac460e58d1e064e6bd2de5e57",
+                "reference": "a2bdcddd4d4a17aac460e58d1e064e6bd2de5e57",
+                "shasum": ""
+            },
+            "require": {
+                "guzzlehttp/guzzle": "^6.3||^7.0",
+                "php": "^7.1||^8.0",
+                "psr/http-client": "^1.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "DivineOmega\\Psr18GuzzleAdapter\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-3.0-only"
+            ],
+            "authors": [
+                {
+                    "name": "Jordan Hall",
+                    "email": "jordan@hall05.co.uk"
+                }
+            ],
+            "description": "PSR-18 adapter for the Guzzle HTTP client",
+            "funding": [
+                {
+                    "url": "https://github.com/DivineOmega",
+                    "type": "github"
+                }
+            ],
+            "time": "2021-04-20T08:50:57+00:00"
         },
         {
             "name": "enyo/dropzone",
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "6.5.8",
+            "version": "7.8.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981"
+                "reference": "41042bc7ab002487b876a0683fc8dce04ddce104"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981",
-                "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104",
+                "reference": "41042bc7ab002487b876a0683fc8dce04ddce104",
                 "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.1",
+                "guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
+                "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"
+                "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
+                "php-http/message-factory": "^1.1",
+                "phpunit/phpunit": "^8.5.36 || ^9.6.15",
+                "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": {
                 }
             ],
             "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"
             ],
                     "type": "tidelift"
                 }
             ],
-            "time": "2022-06-20T22:16:07+00:00"
+            "time": "2023-12-03T20:35:24+00:00"
         },
         {
             "name": "guzzlehttp/oauth-subscriber",
         },
         {
             "name": "guzzlehttp/promises",
-            "version": "1.5.3",
+            "version": "2.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/promises.git",
-                "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e"
+                "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e",
-                "reference": "67ab6e18aaa14d753cc148911d273f6e6cb6721e",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223",
+                "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.5"
+                "php": "^7.2.5 || ^8.0"
             },
             "require-dev": {
-                "symfony/phpunit-bridge": "^4.4 || ^5.1"
+                "bamarni/composer-bin-plugin": "^1.8.2",
+                "phpunit/phpunit": "^8.5.36 || ^9.6.15"
             },
             "type": "library",
+            "extra": {
+                "bamarni-bin": {
+                    "bin-links": true,
+                    "forward-command": false
+                }
+            },
             "autoload": {
-                "files": [
-                    "src/functions_include.php"
-                ],
                 "psr-4": {
                     "GuzzleHttp\\Promise\\": "src/"
                 }
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-05-21T12:31:43+00:00"
+            "time": "2023-12-03T20:19:20+00:00"
         },
         {
             "name": "guzzlehttp/psr7",
-            "version": "1.9.1",
+            "version": "2.6.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/psr7.git",
-                "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b"
+                "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b",
-                "reference": "e4490cabc77465aaee90b20cfc9a770f8c04be6b",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221",
+                "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.4.0",
-                "psr/http-message": "~1.0",
-                "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
+                "php": "^7.2.5 || ^8.0",
+                "psr/http-factory": "^1.0",
+                "psr/http-message": "^1.1 || ^2.0",
+                "ralouphie/getallheaders": "^3.0"
             },
             "provide": {
+                "psr/http-factory-implementation": "1.0",
                 "psr/http-message-implementation": "1.0"
             },
             "require-dev": {
-                "ext-zlib": "*",
-                "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10"
+                "bamarni/composer-bin-plugin": "^1.8.2",
+                "http-interop/http-factory-tests": "^0.9",
+                "phpunit/phpunit": "^8.5.36 || ^9.6.15"
             },
             "suggest": {
                 "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
             },
             "type": "library",
+            "extra": {
+                "bamarni-bin": {
+                    "bin-links": true,
+                    "forward-command": false
+                }
+            },
             "autoload": {
-                "files": [
-                    "src/functions_include.php"
-                ],
                 "psr-4": {
                     "GuzzleHttp\\Psr7\\": "src/"
                 }
                     "name": "Tobias Schultze",
                     "email": "webmaster@tubo-world.de",
                     "homepage": "https://github.com/Tobion"
+                },
+                {
+                    "name": "Márk Sági-Kazár",
+                    "email": "mark.sagikazar@gmail.com",
+                    "homepage": "https://sagikazarmark.hu"
                 }
             ],
             "description": "PSR-7 message implementation that also provides common utility methods",
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-04-17T16:00:37+00:00"
+            "time": "2023-12-03T20:05:35+00:00"
         },
         {
             "name": "kornrunner/blurhash",
         },
         {
             "name": "npm-asset/moment",
-            "version": "2.29.4",
+            "version": "2.30.1",
             "dist": {
                 "type": "tar",
-                "url": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz",
-                "shasum": "3dbe052889fe7c1b2ed966fcb3a77328964ef108"
+                "url": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
+                "shasum": "f8c91c07b7a786e30c59926df530b4eac96974ae"
             },
             "type": "npm-asset-library",
             "extra": {
                 "time",
                 "validate"
             ],
-            "time": "2022-07-06T16:01:32+00:00"
+            "time": "2023-12-27T10:38:43+00:00"
         },
         {
             "name": "npm-asset/perfect-scrollbar",
             ],
             "time": "2018-01-24T10:49:39+00:00"
         },
+        {
+            "name": "nyholm/psr7",
+            "version": "1.8.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Nyholm/psr7.git",
+                "reference": "aa5fc277a4f5508013d571341ade0c3886d4d00e"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Nyholm/psr7/zipball/aa5fc277a4f5508013d571341ade0c3886d4d00e",
+                "reference": "aa5fc277a4f5508013d571341ade0c3886d4d00e",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=7.2",
+                "psr/http-factory": "^1.0",
+                "psr/http-message": "^1.1 || ^2.0"
+            },
+            "provide": {
+                "php-http/message-factory-implementation": "1.0",
+                "psr/http-factory-implementation": "1.0",
+                "psr/http-message-implementation": "1.0"
+            },
+            "require-dev": {
+                "http-interop/http-factory-tests": "^0.9",
+                "php-http/message-factory": "^1.0",
+                "php-http/psr7-integration-tests": "^1.0",
+                "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4",
+                "symfony/error-handler": "^4.4"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.8-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Nyholm\\Psr7\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Tobias Nyholm",
+                    "email": "tobias.nyholm@gmail.com"
+                },
+                {
+                    "name": "Martijn van der Ven",
+                    "email": "martijn@vanderven.se"
+                }
+            ],
+            "description": "A fast PHP7 implementation of PSR-7",
+            "homepage": "https://tnyholm.se",
+            "keywords": [
+                "psr-17",
+                "psr-7"
+            ],
+            "funding": [
+                {
+                    "url": "https://github.com/Zegnat",
+                    "type": "github"
+                },
+                {
+                    "url": "https://github.com/nyholm",
+                    "type": "github"
+                }
+            ],
+            "time": "2023-11-13T09:31:12+00:00"
+        },
         {
             "name": "paragonie/certainty",
             "version": "v2.8.2",
             ],
             "time": "2018-01-25T20:47:17+00:00"
         },
+        {
+            "name": "php-http/discovery",
+            "version": "1.19.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-http/discovery.git",
+                "reference": "61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-http/discovery/zipball/61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb",
+                "reference": "61e1a1eb69c92741f5896d9e05fb8e9d7e8bb0cb",
+                "shasum": ""
+            },
+            "require": {
+                "composer-plugin-api": "^1.0|^2.0",
+                "php": "^7.1 || ^8.0"
+            },
+            "conflict": {
+                "nyholm/psr7": "<1.0",
+                "zendframework/zend-diactoros": "*"
+            },
+            "provide": {
+                "php-http/async-client-implementation": "*",
+                "php-http/client-implementation": "*",
+                "psr/http-client-implementation": "*",
+                "psr/http-factory-implementation": "*",
+                "psr/http-message-implementation": "*"
+            },
+            "require-dev": {
+                "composer/composer": "^1.0.2|^2.0",
+                "graham-campbell/phpspec-skip-example-extension": "^5.0",
+                "php-http/httplug": "^1.0 || ^2.0",
+                "php-http/message-factory": "^1.0",
+                "phpspec/phpspec": "^5.1 || ^6.1 || ^7.3",
+                "symfony/phpunit-bridge": "^6.2"
+            },
+            "type": "composer-plugin",
+            "extra": {
+                "class": "Http\\Discovery\\Composer\\Plugin",
+                "plugin-optional": true
+            },
+            "autoload": {
+                "psr-4": {
+                    "Http\\Discovery\\": "src/"
+                },
+                "exclude-from-classmap": [
+                    "src/Composer/Plugin.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Márk Sági-Kazár",
+                    "email": "mark.sagikazar@gmail.com"
+                }
+            ],
+            "description": "Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations",
+            "homepage": "http://php-http.org",
+            "keywords": [
+                "adapter",
+                "client",
+                "discovery",
+                "factory",
+                "http",
+                "message",
+                "psr17",
+                "psr7"
+            ],
+            "time": "2023-11-30T16:49:05+00:00"
+        },
         {
             "name": "phpseclib/phpseclib",
-            "version": "3.0.34",
+            "version": "3.0.35",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpseclib/phpseclib.git",
-                "reference": "56c79f16a6ae17e42089c06a2144467acc35348a"
+                "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56c79f16a6ae17e42089c06a2144467acc35348a",
-                "reference": "56c79f16a6ae17e42089c06a2144467acc35348a",
+                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4b1827beabce71953ca479485c0ae9c51287f2fe",
+                "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe",
                 "shasum": ""
             },
             "require": {
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-11-27T11:13:31+00:00"
+            "time": "2023-12-29T01:59:53+00:00"
         },
         {
             "name": "pragmarx/google2fa",
             "time": "2020-11-03T09:10:25+00:00"
         },
         {
-            "name": "symfony/polyfill-intl-idn",
-            "version": "v1.28.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-intl-idn.git",
-                "reference": "ecaafce9f77234a6a449d29e49267ba10499116d"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d",
-                "reference": "ecaafce9f77234a6a449d29e49267ba10499116d",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1",
-                "symfony/polyfill-intl-normalizer": "^1.10",
-                "symfony/polyfill-php72": "^1.10"
-            },
-            "suggest": {
-                "ext-intl": "For best performance"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.28-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Intl\\Idn\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Laurent Bassin",
-                    "email": "laurent@bassin.info"
-                },
-                {
-                    "name": "Trevor Rowbotham",
-                    "email": "trevor.rowbotham@pm.me"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "idn",
-                "intl",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2023-01-26T09:30:37+00:00"
-        },
-        {
-            "name": "symfony/polyfill-intl-normalizer",
-            "version": "v1.28.0",
+            "name": "symfony/deprecation-contracts",
+            "version": "v2.5.2",
             "source": {
                 "type": "git",
-                "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
-                "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92"
+                "url": "https://github.com/symfony/deprecation-contracts.git",
+                "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
-                "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
+                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
+                "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
                 "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
             },
-            "suggest": {
-                "ext-intl": "For best performance"
-            },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-main": "1.28-dev"
+                    "dev-main": "2.5-dev"
                 },
                 "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
+                    "name": "symfony/contracts",
+                    "url": "https://github.com/symfony/contracts"
                 }
             },
             "autoload": {
                 "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
-                },
-                "classmap": [
-                    "Resources/stubs"
+                    "function.php"
                 ]
             },
             "notification-url": "https://packagist.org/downloads/",
                     "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "description": "Symfony polyfill for intl's Normalizer class and related functions",
+            "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "intl",
-                "normalizer",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
             "funding": [
                 {
                     "url": "https://symfony.com/sponsor",
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-01-26T09:26:14+00:00"
+            "time": "2022-01-02T09:53:40+00:00"
         },
         {
             "name": "symfony/polyfill-php56",
             ],
             "time": "2020-10-23T14:02:19+00:00"
         },
-        {
-            "name": "symfony/polyfill-php72",
-            "version": "v1.28.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/symfony/polyfill-php72.git",
-                "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179",
-                "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=7.1"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-main": "1.28-dev"
-                },
-                "thanks": {
-                    "name": "symfony/polyfill",
-                    "url": "https://github.com/symfony/polyfill"
-                }
-            },
-            "autoload": {
-                "files": [
-                    "bootstrap.php"
-                ],
-                "psr-4": {
-                    "Symfony\\Polyfill\\Php72\\": ""
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Nicolas Grekas",
-                    "email": "p@tchwork.com"
-                },
-                {
-                    "name": "Symfony Community",
-                    "homepage": "https://symfony.com/contributors"
-                }
-            ],
-            "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
-            "homepage": "https://symfony.com",
-            "keywords": [
-                "compatibility",
-                "polyfill",
-                "portable",
-                "shim"
-            ],
-            "funding": [
-                {
-                    "url": "https://symfony.com/sponsor",
-                    "type": "custom"
-                },
-                {
-                    "url": "https://github.com/fabpot",
-                    "type": "github"
-                },
-                {
-                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
-                    "type": "tidelift"
-                }
-            ],
-            "time": "2023-01-26T09:26:14+00:00"
-        },
         {
             "name": "ua-parser/uap-php",
             "version": "v3.9.14",
         },
         {
             "name": "nikic/php-parser",
-            "version": "v4.18.0",
+            "version": "v5.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/nikic/PHP-Parser.git",
-                "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999"
+                "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/1bcbb2179f97633e98bbbc87044ee2611c7d7999",
-                "reference": "1bcbb2179f97633e98bbbc87044ee2611c7d7999",
+                "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc",
+                "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc",
                 "shasum": ""
             },
             "require": {
+                "ext-ctype": "*",
+                "ext-json": "*",
                 "ext-tokenizer": "*",
-                "php": ">=7.0"
+                "php": ">=7.4"
             },
             "require-dev": {
                 "ircmaxell/php-yacc": "^0.0.7",
-                "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0"
+                "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
             },
             "bin": [
                 "bin/php-parse"
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "4.9-dev"
+                    "dev-master": "5.0-dev"
                 }
             },
             "autoload": {
                 "parser",
                 "php"
             ],
-            "time": "2023-12-10T21:03:43+00:00"
+            "time": "2024-01-07T17:17:35+00:00"
         },
         {
             "name": "phar-io/manifest",
         },
         {
             "name": "phpunit/php-code-coverage",
-            "version": "9.2.29",
+            "version": "9.2.30",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
-                "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76"
+                "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6a3a87ac2bbe33b25042753df8195ba4aa534c76",
-                "reference": "6a3a87ac2bbe33b25042753df8195ba4aa534c76",
+                "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ca2bd87d2f9215904682a9cb9bb37dda98e76089",
+                "reference": "ca2bd87d2f9215904682a9cb9bb37dda98e76089",
                 "shasum": ""
             },
             "require": {
                 "ext-dom": "*",
                 "ext-libxml": "*",
                 "ext-xmlwriter": "*",
-                "nikic/php-parser": "^4.15",
+                "nikic/php-parser": "^4.18 || ^5.0",
                 "php": ">=7.3",
                 "phpunit/php-file-iterator": "^3.0.3",
                 "phpunit/php-text-template": "^2.0.2",
                     "type": "github"
                 }
             ],
-            "time": "2023-09-19T04:57:46+00:00"
+            "time": "2023-12-22T06:47:57+00:00"
         },
         {
             "name": "phpunit/php-file-iterator",
         },
         {
             "name": "sebastian/complexity",
-            "version": "2.0.2",
+            "version": "2.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/complexity.git",
-                "reference": "739b35e53379900cc9ac327b2147867b8b6efd88"
+                "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88",
-                "reference": "739b35e53379900cc9ac327b2147867b8b6efd88",
+                "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
+                "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
                 "shasum": ""
             },
             "require": {
-                "nikic/php-parser": "^4.7",
+                "nikic/php-parser": "^4.18 || ^5.0",
                 "php": ">=7.3"
             },
             "require-dev": {
                     "type": "github"
                 }
             ],
-            "time": "2020-10-26T15:52:27+00:00"
+            "time": "2023-12-22T06:19:30+00:00"
         },
         {
             "name": "sebastian/diff",
         },
         {
             "name": "sebastian/lines-of-code",
-            "version": "1.0.3",
+            "version": "1.0.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/lines-of-code.git",
-                "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc"
+                "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc",
-                "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc",
+                "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+                "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
                 "shasum": ""
             },
             "require": {
-                "nikic/php-parser": "^4.6",
+                "nikic/php-parser": "^4.18 || ^5.0",
                 "php": ">=7.3"
             },
             "require-dev": {
                     "type": "github"
                 }
             ],
-            "time": "2020-11-28T06:42:11+00:00"
+            "time": "2023-12-22T06:20:34+00:00"
         },
         {
             "name": "sebastian/object-enumerator",
index 28d277a1a21c8782a63c7a98cb8cb4a6607462d4..371e6452329066853fdcd73110e253e645cd4de0 100644 (file)
@@ -80,7 +80,7 @@ class Avatar
                        return $fields;
                }
 
-               $img_str = $fetchResult->getBody();
+               $img_str = $fetchResult->getBodyString();
                if (empty($img_str)) {
                        Logger::debug('Avatar is invalid', ['avatar' => $avatar]);
                        return $fields;
index 8a4634539a12a9f0011134d86c81e84f78b709fa..674728036bdd7790d6b0675e014232152336aa6c 100644 (file)
@@ -120,7 +120,7 @@ class OEmbed
                                                                ['https://www.youtube.com/', 'https://player.vimeo.com/'], $href);
                                                        $result = DI::httpClient()->fetchFull($href . '&maxwidth=' . $a->getThemeInfoValue('videowidth'));
                                                        if ($result->getReturnCode() === 200) {
-                                                               $json_string = $result->getBody();
+                                                               $json_string = $result->getBodyString();
                                                                break;
                                                        }
                                                }
index f08344b4eedc46cb2469737bcf94307bb6bcfb5c..ab959bbb17102e6fe4aa70572b6d3dbfaf86c389 100644 (file)
@@ -263,7 +263,7 @@ class ErrorHandler
        public function handleError(int $code, string $message, string $file = '', int $line = 0, ?array $context = []): bool
        {
                if ($this->handleOnlyReportedErrors && !(error_reporting() & $code)) {
-                       return false;
+                       return true;
                }
 
                // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries
index d59febc8a8330accef4118d7647d3e2d46ed102a..c0e39fcea2c0a1ab833e9d9145976833569915a4 100644 (file)
@@ -234,7 +234,7 @@ class Search
                        $p = $page > 1 ? 'p=' . $page : '';
                        $curlResult = DI::httpClient()->get(self::getGlobalDirectory() . '/search/people?' . $p . '&q=' . urlencode($search), HttpClientAccept::JSON);
                        if ($curlResult->isSuccess()) {
-                               $searchResult = json_decode($curlResult->getBody(), true);
+                               $searchResult = json_decode($curlResult->getBodyString(), true);
                                if (!empty($searchResult['profiles'])) {
                                        // Converting Directory Search results into contact-looking records
                                        $return = array_map(function ($result) {
index 6e04edde172945b1de92ab7972728d9a79377757..ee1e90f82bbc4640329597f3daf96bf5d6131ce9 100644 (file)
@@ -70,12 +70,12 @@ class ExternalResource implements ICanReadFromStorage
                }
                if (!empty($fetchResult) && $fetchResult->isSuccess()) {
                        $this->logger->debug('Got picture', ['Content-Type' => $fetchResult->getHeader('Content-Type'), 'uid' => $data->uid, 'url' => $data->url]);
-                       return $fetchResult->getBody();
+                       return $fetchResult->getBodyString();
                } else {
                        if (empty($fetchResult)) {
                                throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference));
                        } else {
-                               throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference), $fetchResult->getReturnCode(), new Exception($fetchResult->getBody()));
+                               throw new ReferenceStorageException(sprintf('External resource failed to get %s', $reference), $fetchResult->getReturnCode(), new Exception($fetchResult->getBodyString()));
                        }
                }
        }
index 04790535301cefa5b0bafdd15dc9292dba8c5983..df8cb9377e6bdd7f70ea61aae32d17e92e721866 100644 (file)
@@ -230,7 +230,7 @@ class System
         * @param int     $offset  How many calls to shave off the top of the stack, for example if
         *                         this is called from a centralized method that isn't relevant to the callstack
         * @param bool    $full    If enabled, the callstack is not compacted
-        * @param array   $exclude 
+        * @param array   $exclude
         * @return string
         */
        public static function callstack(int $depth = 4, int $offset = 0, bool $full = false, array $exclude = []): string
index 6f1f7d383423e603ea3b45458033a75b67581239..032dd37f39db21135b6b7f033faf6417621e3eee 100644 (file)
@@ -198,11 +198,11 @@ class APContact
 
                        try {
                                $curlResult = HTTPSignature::fetchRaw($url);
-                               $failed = empty($curlResult) || empty($curlResult->getBody()) ||
+                               $failed = empty($curlResult) || empty($curlResult->getBodyString()) ||
                                        (!$curlResult->isSuccess() && ($curlResult->getReturnCode() != 410));
 
                                if (!$failed) {
-                                       $data = json_decode($curlResult->getBody(), true);
+                                       $data = json_decode($curlResult->getBodyString(), true);
                                        $failed = empty($data) || !is_array($data);
                                }
 
index 8b9ed8c1ea632284f6c29f3ffb405bd7cadde2d1..4e4a41e7e3fd91726bb911dfa216b9707e88ffde 100644 (file)
@@ -2300,7 +2300,7 @@ class Contact
                                        try {
                                                $fetchResult = HTTPSignature::fetchRaw($avatar, 0, [HttpClientOptions::ACCEPT_CONTENT => [HttpClientAccept::IMAGE]]);
 
-                                               $img_str = $fetchResult->getBody();
+                                               $img_str = $fetchResult->getBodyString();
                                                if (!empty($img_str)) {
                                                        $image = new Image($img_str, Images::getMimeTypeByData($img_str));
                                                        if ($image->isValid()) {
index e7f9530498e6b77f7d1a96f8ebb0541eb88a5767..e40442384a35e6ef4b01fa638fd150ab4e0a49f1 100644 (file)
@@ -649,7 +649,7 @@ class GServer
                                }
 
                                if ($curlResult->isSuccess()) {
-                                       $json = json_decode($curlResult->getBody(), true);
+                                       $json = json_decode($curlResult->getBodyString(), true);
                                        if (!empty($json) && is_array($json)) {
                                                $data = self::fetchDataFromSystemActor($json, $serverdata);
                                                $serverdata = $data['server'];
@@ -657,7 +657,7 @@ class GServer
                                                if (!$html_fetched && !in_array($serverdata['detection-method'], [self::DETECT_SYSTEM_ACTOR, self::DETECT_AP_COLLECTION])) {
                                                        $curlResult = DI::httpClient()->get($url, HttpClientAccept::HTML);
                                                }
-                                       } elseif (!$html_fetched && (strlen($curlResult->getBody()) < 1000)) {
+                                       } elseif (!$html_fetched && (strlen($curlResult->getBodyString()) < 1000)) {
                                                $curlResult = DI::httpClient()->get($url, HttpClientAccept::HTML);
                                        }
 
@@ -667,7 +667,7 @@ class GServer
                                        }
                                }
 
-                               if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
+                               if (!$curlResult->isSuccess() || empty($curlResult->getBodyString())) {
                                        self::setFailureByUrl($url);
                                        return false;
                                }
@@ -677,7 +677,7 @@ class GServer
                                        $serverdata['network']          = Protocol::ACTIVITYPUB;
                                        $serverdata['platform']         = 'threads';
                                }
-               
+
                                if (($serverdata['network'] == Protocol::PHANTOM) || in_array($serverdata['detection-method'], self::DETECT_UNSPECIFIC)) {
                                        $serverdata = self::detectMastodonAlikes($url, $serverdata);
                                }
@@ -872,7 +872,7 @@ class GServer
                        return;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (!is_array($data)) {
                        return;
                }
@@ -967,7 +967,7 @@ class GServer
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $serverdata;
                }
@@ -1059,7 +1059,7 @@ class GServer
                        return [];
                }
 
-               $nodeinfo = json_decode($httpResult->getBody(), true);
+               $nodeinfo = json_decode($httpResult->getBodyString(), true);
 
                if (!is_array($nodeinfo) || empty($nodeinfo['links'])) {
                        return [];
@@ -1114,7 +1114,7 @@ class GServer
                        return [];
                }
 
-               $nodeinfo = json_decode($curlResult->getBody(), true);
+               $nodeinfo = json_decode($curlResult->getBodyString(), true);
 
                if (!is_array($nodeinfo)) {
                        return [];
@@ -1214,7 +1214,7 @@ class GServer
                        return [];
                }
 
-               $nodeinfo = json_decode($curlResult->getBody(), true);
+               $nodeinfo = json_decode($curlResult->getBodyString(), true);
                if (!is_array($nodeinfo)) {
                        return [];
                }
@@ -1331,7 +1331,7 @@ class GServer
                        return [];
                }
 
-               $nodeinfo = json_decode($httpResult->getBody(), true);
+               $nodeinfo = json_decode($httpResult->getBodyString(), true);
 
                if (!is_array($nodeinfo)) {
                        return [];
@@ -1434,7 +1434,7 @@ class GServer
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $serverdata;
                }
@@ -1587,11 +1587,11 @@ class GServer
        {
                $name = 'nomad';
                $curlResult = DI::httpClient()->get($url . '/manifest', 'application/manifest+json');
-               if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
+               if (!$curlResult->isSuccess() || ($curlResult->getBodyString() == '')) {
                        return $name;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $name;
                }
@@ -1608,11 +1608,11 @@ class GServer
        private static function getNomadVersion(string $url): string
        {
                $curlResult = DI::httpClient()->get($url . '/api/z/1.0/version', HttpClientAccept::JSON);
-               if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
+               if (!$curlResult->isSuccess() || ($curlResult->getBodyString() == '')) {
                        return '';
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return '';
                }
@@ -1634,7 +1634,7 @@ class GServer
                        return false;
                }
 
-               $xrd = XML::parseString($curlResult->getBody(), true);
+               $xrd = XML::parseString($curlResult->getBodyString(), true);
                if (!is_object($xrd)) {
                        return false;
                }
@@ -1733,7 +1733,7 @@ class GServer
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $serverdata;
                }
@@ -1763,7 +1763,7 @@ class GServer
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $serverdata;
                }
@@ -1786,11 +1786,11 @@ class GServer
        private static function detectPeertube(string $url, array $serverdata): array
        {
                $curlResult = DI::httpClient()->get($url . '/api/v1/config', HttpClientAccept::JSON);
-               if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
+               if (!$curlResult->isSuccess() || ($curlResult->getBodyString() == '')) {
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $serverdata;
                }
@@ -1834,11 +1834,11 @@ class GServer
        private static function detectNextcloud(string $url, array $serverdata, bool $validHostMeta): array
        {
                $curlResult = DI::httpClient()->get($url . '/status.php', HttpClientAccept::JSON);
-               if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
+               if (!$curlResult->isSuccess() || ($curlResult->getBodyString() == '')) {
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $serverdata;
                }
@@ -1870,11 +1870,11 @@ class GServer
        private static function fetchWeeklyUsage(string $url, array $serverdata): array
        {
                $curlResult = DI::httpClient()->get($url . '/api/v1/instance/activity', HttpClientAccept::JSON);
-               if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
+               if (!$curlResult->isSuccess() || ($curlResult->getBodyString() == '')) {
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $serverdata;
                }
@@ -1910,11 +1910,11 @@ class GServer
        private static function detectMastodonAlikes(string $url, array $serverdata): array
        {
                $curlResult = DI::httpClient()->get($url . '/api/v1/instance', HttpClientAccept::JSON);
-               if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
+               if (!$curlResult->isSuccess() || ($curlResult->getBodyString() == '')) {
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data)) {
                        return $serverdata;
                }
@@ -1982,11 +1982,11 @@ class GServer
        private static function detectHubzilla(string $url, array $serverdata): array
        {
                $curlResult = DI::httpClient()->get($url . '/api/statusnet/config.json', HttpClientAccept::JSON);
-               if (!$curlResult->isSuccess() || ($curlResult->getBody() == '')) {
+               if (!$curlResult->isSuccess() || ($curlResult->getBodyString() == '')) {
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data) || empty($data['site'])) {
                        return $serverdata;
                }
@@ -2079,11 +2079,11 @@ class GServer
        {
                // Test for GNU Social
                $curlResult = DI::httpClient()->get($url . '/api/gnusocial/version.json', HttpClientAccept::JSON);
-               if ($curlResult->isSuccess() && ($curlResult->getBody() != '{"error":"not implemented"}') &&
-                       ($curlResult->getBody() != '') && (strlen($curlResult->getBody()) < 30)) {
+               if ($curlResult->isSuccess() && ($curlResult->getBodyString() != '{"error":"not implemented"}') &&
+                       ($curlResult->getBodyString() != '') && (strlen($curlResult->getBodyString()) < 30)) {
                        $serverdata['platform'] = 'gnusocial';
                        // Remove junk that some GNU Social servers return
-                       $serverdata['version'] = str_replace(chr(239) . chr(187) . chr(191), '', $curlResult->getBody());
+                       $serverdata['version'] = str_replace(chr(239) . chr(187) . chr(191), '', $curlResult->getBodyString());
                        $serverdata['version'] = str_replace(["\r", "\n", "\t"], '', $serverdata['version']);
                        $serverdata['version'] = trim($serverdata['version'], '"');
                        $serverdata['network'] = Protocol::OSTATUS;
@@ -2097,11 +2097,11 @@ class GServer
 
                // Test for Statusnet
                $curlResult = DI::httpClient()->get($url . '/api/statusnet/version.json', HttpClientAccept::JSON);
-               if ($curlResult->isSuccess() && ($curlResult->getBody() != '{"error":"not implemented"}') &&
-                       ($curlResult->getBody() != '') && (strlen($curlResult->getBody()) < 30)) {
+               if ($curlResult->isSuccess() && ($curlResult->getBodyString() != '{"error":"not implemented"}') &&
+                       ($curlResult->getBodyString() != '') && (strlen($curlResult->getBodyString()) < 30)) {
 
                        // Remove junk that some GNU Social servers return
-                       $serverdata['version'] = str_replace(chr(239).chr(187).chr(191), '', $curlResult->getBody());
+                       $serverdata['version'] = str_replace(chr(239).chr(187).chr(191), '', $curlResult->getBodyString());
                        $serverdata['version'] = str_replace(["\r", "\n", "\t"], '', $serverdata['version']);
                        $serverdata['version'] = trim($serverdata['version'], '"');
 
@@ -2148,7 +2148,7 @@ class GServer
                        return $serverdata;
                }
 
-               $data = json_decode($curlResult->getBody(), true);
+               $data = json_decode($curlResult->getBodyString(), true);
                if (empty($data) || empty($data['version'])) {
                        return $serverdata;
                }
@@ -2466,7 +2466,7 @@ class GServer
                        $api = 'https://instances.social/api/1.0/instances/list?count=0';
                        $curlResult = DI::httpClient()->get($api, HttpClientAccept::JSON, [HttpClientOptions::HEADERS => ['Authorization' => ['Bearer ' . $accesstoken]]]);
                        if ($curlResult->isSuccess()) {
-                               $servers = json_decode($curlResult->getBody(), true);
+                               $servers = json_decode($curlResult->getBodyString(), true);
 
                                if (!empty($servers['instances'])) {
                                        foreach ($servers['instances'] as $server) {
index 10545eee880922847a25de9d056439de59275e12..d10d70b8eb9066e34bc4b00b447597ea20365943 100644 (file)
@@ -597,7 +597,7 @@ class Photo
                if (!empty($image_url)) {
                        $ret = DI::httpClient()->get($image_url, HttpClientAccept::IMAGE);
                        Logger::debug('Got picture', ['Content-Type' => $ret->getHeader('Content-Type'), 'url' => $image_url]);
-                       $img_str = $ret->getBody();
+                       $img_str = $ret->getBodyString();
                        $type = $ret->getContentType();
                } else {
                        $img_str = '';
@@ -1047,7 +1047,7 @@ class Photo
                if (!empty($image_url)) {
                        $ret = DI::httpClient()->get($image_url, HttpClientAccept::IMAGE);
                        Logger::debug('Got picture', ['Content-Type' => $ret->getHeader('Content-Type'), 'url' => $image_url]);
-                       $img_str = $ret->getBody();
+                       $img_str = $ret->getBodyString();
                        $type = $ret->getContentType();
                } else {
                        $img_str = '';
index 76b548baa99a07705a3f751ee150fd5e7c56e6fa..4146efe7611f272fef0add370e7f7ba8a71e62e8 100644 (file)
@@ -135,7 +135,7 @@ class Link
                }
                $fields = ['mimetype' => $curlResult->getHeader('Content-Type')[0]];
 
-               $img_str = $curlResult->getBody();
+               $img_str = $curlResult->getBodyString();
                $image = new Image($img_str, Images::getMimeTypeByData($img_str));
                if ($image->isValid()) {
                        $fields['mimetype'] = $image->getType();
index 2a8ce5330d43b2e3ca6ea3153d634d608eb38c79..544dace8151ec69d9fc25c46218964936b062d49 100644 (file)
@@ -1383,7 +1383,7 @@ class User
                        $curlResult = DI::httpClient()->get($photo, HttpClientAccept::IMAGE);
                        if ($curlResult->isSuccess()) {
                                Logger::debug('Got picture', ['Content-Type' => $curlResult->getHeader('Content-Type'), 'url' => $photo]);
-                               $img_str = $curlResult->getBody();
+                               $img_str = $curlResult->getBodyString();
                                $type = $curlResult->getContentType();
                        } else {
                                $img_str = '';
@@ -1597,8 +1597,8 @@ class User
                You may also wish to add some basic information to your default profile
                (on the "Profiles" page) so that other people can easily find you.
 
-               We recommend adding a profile photo, adding some profile "keywords" 
-               (very useful in making new friends) - and perhaps what country you live in; 
+               We recommend adding a profile photo, adding some profile "keywords"
+               (very useful in making new friends) - and perhaps what country you live in;
                if you do not wish to be more specific than that.
 
                We fully respect your right to privacy, and none of these items are necessary.
index 604a917cbf02524dc8bf5cca7b5e1b06a78e80e2..ac352440496e9ba71df435716fe4ea19fd2b4f4d 100644 (file)
@@ -132,7 +132,7 @@ class MatchInterests extends BaseModule
                                }
                        }
 
-                       $entries = $this->parseContacts(json_decode($result->getBody()), $entries, $limit);
+                       $entries = $this->parseContacts(json_decode($result->getBodyString()), $entries, $limit);
                }
 
                if (empty($entries)) {
index aa7a75aa701752d0511e94c887e935368926edd3..7b60299e20ded83dd6aef031283e2745aec0c706 100644 (file)
@@ -155,7 +155,7 @@ class Magic extends BaseModule
                        System::externalRedirect($dest);
                }
 
-               $j = json_decode($curlResult->getBody(), true);
+               $j = json_decode($curlResult->getBodyString(), true);
                if (empty($j) || !$j['success']) {
                        $this->logger->notice('Invalid JSON, redirecting to destination.', ['json' => $j, 'dest' => $dest]);
                        $this->app->redirect($dest);
index 431d603ee094b32e1283c780ed5d56da72714e76..e4cc5d72091004c615bfee79cbf13f8cfc1b5eaa 100644 (file)
@@ -154,7 +154,7 @@ class PubSubHubBub extends \Friendica\BaseModule
                $separator    = parse_url($hub_callback, PHP_URL_QUERY) === null ? '?' : '&';
 
                $fetchResult = $this->httpClient->fetchFull($hub_callback . $separator . $params);
-               $body        = $fetchResult->getBody();
+               $body        = $fetchResult->getBodyString();
                $returnCode  = $fetchResult->getReturnCode();
 
                // give up if the HTTP return code wasn't a success (2xx)
index 798e8342c2546a1599c47ad1568213bb652abca2..cee49d5b94f01766026ea3f076bd751cc8f68a79 100644 (file)
@@ -96,7 +96,7 @@ class Subscribe extends \Friendica\BaseModule
                                        return $o . $this->t('Couldn\'t fetch friends for contact.');
                                }
 
-                               $friends = $curlResult->getBody();
+                               $friends = $curlResult->getBodyString();
                                if (empty($friends)) {
                                        $this->pConfig->delete($uid, 'ostatus', 'legacy_contact');
                                        return $o . $this->t('Couldn\'t fetch following contacts.');
index a4a140e47c0e73263645fed727f78e4793f4cfec..0eb95d8a3fb1a6f2dd615227e8f29e3ac1e39030 100644 (file)
@@ -85,7 +85,7 @@ class Proxy extends BaseModule
                // Fetch the content with the local user
                try {
                        $fetchResult = HTTPSignature::fetchRaw($request['url'], DI::userSession()->getLocalUserId(), [HttpClientOptions::ACCEPT_CONTENT => [HttpClientAccept::IMAGE], 'timeout' => 10]);
-                       $img_str = $fetchResult->getBody();
+                       $img_str = $fetchResult->getBodyString();
 
                        if (!$fetchResult->isSuccess() || empty($img_str)) {
                                Logger::notice('Error fetching image', ['image' => $request['url'], 'return' => $fetchResult->getReturnCode(), 'empty' => empty($img_str)]);
index e5de3e561bc81adcc9ab9fe2c92036f0ef551b5e..68c8eda2d854076e97318478b406b5b039be30ba 100644 (file)
@@ -97,10 +97,9 @@ interface ICanHandleHttpResponses
        /**
         * Getter for body
         *
-        * @see MessageInterface::getBody()
         * @return string
         */
-       public function getBody();
+       public function getBodyString();
 
        /**
         * @return boolean
index bc86579f6d481eef7bea84fdd0495c537a99c9c6..64d0b0a235b9c0eb36d0df10afb7370b396ce6cc 100644 (file)
@@ -271,7 +271,7 @@ class HttpClient implements ICanSendHttpRequests
        {
                $ret = $this->fetchFull($url, $accept_content, $timeout, $cookiejar);
 
-               return $ret->getBody();
+               return $ret->getBodyString();
        }
 
        /**
index 5ebebda92af510c7bbef7065d790c0aa15388ad8..561c8c47abfccab3a07b743e67c2fc16adb2f8ed 100644 (file)
@@ -330,7 +330,7 @@ class CurlResult implements ICanHandleHttpResponses
        }
 
        /** {@inheritDoc} */
-       public function getBody(): string
+       public function getBodyString(): string
        {
                return $this->body;
        }
index 1b79126159b8d6d770964685bbe23b0af4ab5a41..d277f2a8df05bffeb7f44f30049a6c5e53c4dcbe 100644 (file)
@@ -163,8 +163,7 @@ class GuzzleResponse extends Response implements ICanHandleHttpResponses, Respon
                return $this->isTimeout;
        }
 
-       /// @todo - fix mismatching use of "getBody()" as string here and parent "getBody()" as streaminterface
-       public function getBody(): string
+       public function getBodyString(): string
        {
                return (string) parent::getBody();
        }
index a49c83f991dfa67a13a3b95e5d8c96772945176f..fc5125f2594fed0cc4cda96429d4ad429f1468c4 100644 (file)
@@ -225,7 +225,7 @@ class Probe
                $curlResult = DI::httpClient()->get($ssl_url, HttpClientAccept::XRD_XML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);
                $ssl_connection_error = ($curlResult->getErrorNumber() == CURLE_COULDNT_CONNECT) || ($curlResult->getReturnCode() == 0);
                if ($curlResult->isSuccess()) {
-                       $xml = $curlResult->getBody();
+                       $xml = $curlResult->getBodyString();
                        $xrd = XML::parseString($xml, true);
                        if (!empty($url)) {
                                $host_url = 'https://' . $host;
@@ -250,7 +250,7 @@ class Probe
                                return [];
                        }
 
-                       $xml = $curlResult->getBody();
+                       $xml = $curlResult->getBodyString();
                        $xrd = XML::parseString($xml, true);
                        $host_url = 'http://'.$host;
                }
@@ -426,7 +426,7 @@ class Probe
 
                if (!empty($data['baseurl']) && empty($data['gsid'])) {
                        $data['gsid'] = GServer::getID($data['baseurl']);
-               }       
+               }
 
                // Ensure that local connections always are DFRN
                if (($network == '') && ($data['network'] != Protocol::PHANTOM) && (self::ownHost($data['baseurl'] ?? '') || self::ownHost($data['url']))) {
@@ -459,7 +459,7 @@ class Probe
                        return false;
                }
 
-               $body = $curlResult->getBody();
+               $body = $curlResult->getBodyString();
                if (empty($body)) {
                        return false;
                }
@@ -865,7 +865,7 @@ class Probe
                if ($curlResult->isTimeout()) {
                        return $data;
                }
-               $content = $curlResult->getBody();
+               $content = $curlResult->getBodyString();
                if (!$content) {
                        return $data;
                }
@@ -971,7 +971,7 @@ class Probe
                        self::$isTimeout = true;
                        return [];
                }
-               $data = $curlResult->getBody();
+               $data = $curlResult->getBodyString();
 
                $webfinger = json_decode($data, true);
                if (!empty($webfinger)) {
@@ -1040,7 +1040,7 @@ class Probe
                        self::$isTimeout = true;
                        return $data;
                }
-               $content = $curlResult->getBody();
+               $content = $curlResult->getBodyString();
                if (!$content) {
                        Logger::info('Empty body', ['url' => $noscrape_url]);
                        return $data;
@@ -1303,7 +1303,7 @@ class Probe
                        self::$isTimeout = true;
                        return [];
                }
-               $content = $curlResult->getBody();
+               $content = $curlResult->getBodyString();
                if (empty($content)) {
                        return [];
                }
@@ -1580,7 +1580,7 @@ class Probe
                                                        return $short ? false : [];
                                                }
                                                Logger::debug('Fetched public key', ['Content-Type' => $curlResult->getHeader('Content-Type'), 'url' => $pubkey]);
-                                               $pubkey = $curlResult->getBody();
+                                               $pubkey = $curlResult->getBodyString();
                                        }
 
                                        try {
@@ -1612,7 +1612,7 @@ class Probe
                        self::$isTimeout = true;
                        return [];
                }
-               $feed = $curlResult->getBody();
+               $feed = $curlResult->getBodyString();
                $feed_data = Feed::import($feed);
                if (!$feed_data) {
                        return [];
@@ -1660,12 +1660,12 @@ class Probe
        private static function pumpioProfileData(string $profile_link, string $baseurl): array
        {
                $curlResult = DI::httpClient()->get($profile_link, HttpClientAccept::HTML);
-               if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
+               if (!$curlResult->isSuccess() || empty($curlResult->getBodyString())) {
                        return [];
                }
 
                $doc = new DOMDocument();
-               if (!@$doc->loadHTML($curlResult->getBody())) {
+               if (!@$doc->loadHTML($curlResult->getBodyString())) {
                        return [];
                }
 
@@ -1887,7 +1887,7 @@ class Probe
                        return [];
                }
 
-               $feed = $curlResult->getBody();
+               $feed = $curlResult->getBodyString();
                $feed_data = Feed::import($feed);
 
                if (!$feed_data) {
@@ -2112,8 +2112,8 @@ class Probe
 
                $curlResult = DI::httpClient()->get($gserver['noscrape'] . '/' . $data['nick'], HttpClientAccept::JSON);
 
-               if ($curlResult->isSuccess() && !empty($curlResult->getBody())) {
-                       $noscrape = json_decode($curlResult->getBody(), true);
+               if ($curlResult->isSuccess() && !empty($curlResult->getBodyString())) {
+                       $noscrape = json_decode($curlResult->getBodyString(), true);
                        if (!empty($noscrape) && !empty($noscrape['updated'])) {
                                return DateTimeFormat::utc($noscrape['updated'], DateTimeFormat::MYSQL);
                        }
@@ -2187,12 +2187,12 @@ class Probe
        {
                // Search for the newest entry in the feed
                $curlResult = DI::httpClient()->get($data['poll'], HttpClientAccept::ATOM_XML);
-               if (!$curlResult->isSuccess() || !$curlResult->getBody()) {
+               if (!$curlResult->isSuccess() || !$curlResult->getBodyString()) {
                        return '';
                }
 
                $doc = new DOMDocument();
-               @$doc->loadXML($curlResult->getBody());
+               @$doc->loadXML($curlResult->getBodyString());
 
                $xpath = new DOMXPath($doc);
                $xpath->registerNamespace('atom', 'http://www.w3.org/2005/Atom');
index 87ebbe1ee2b60d45dadc98d73283f1ccc3d079b9..593c1e783622743d0474d60275e5f424372c4f22 100644 (file)
@@ -614,7 +614,7 @@ class Processor
                }
 
                if ($curlResult->isSuccess()) {
-                       $object = json_decode($curlResult->getBody(), true);
+                       $object = json_decode($curlResult->getBodyString(), true);
                        if (!empty($object)) {
                                $activity = JsonLD::compact($object);
                                if (JsonLD::fetchElement($activity, '@type') == 'as:Tombstone') {
@@ -1584,7 +1584,7 @@ class Processor
                        return '';
                }
 
-               $body = $curlResult->getBody();
+               $body = $curlResult->getBodyString();
                if (!$curlResult->isSuccess() || empty($body)) {
                        if (in_array($curlResult->getReturnCode(), [403, 404, 406, 410])) {
                                return null;
index b358796ce736cbf8fe6527524ddd2c2834416640..4d44b8a40fe3f4f17b6f3ef1eb18bd17bbd76fba 100644 (file)
@@ -1012,7 +1012,7 @@ class DFRN
                $content_type = ($public_batch ? 'application/magic-envelope+xml' : 'application/json');
 
                $postResult = DI::httpClient()->post($dest_url, $envelope, ['Content-Type' => $content_type]);
-               $xml = $postResult->getBody();
+               $xml = $postResult->getBodyString();
 
                $curl_stat = $postResult->getReturnCode();
                if (!empty($contact['gsid']) && ($postResult->isTimeout() || empty($curl_stat))) {
index 061a27b3727e49270e47ece50f21a3cbc82d76ed..fa93b0e827ecd9b3644b6f83ba4b9ed075d80151 100644 (file)
@@ -736,7 +736,7 @@ class OStatus
                $stored = false;
                $curlResult = DI::httpClient()->get($related, HttpClientAccept::ATOM_XML);
 
-               if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
+               if (!$curlResult->isSuccess() || empty($curlResult->getBodyString())) {
                        return;
                }
 
@@ -745,12 +745,12 @@ class OStatus
                if ($curlResult->inHeader('Content-Type') &&
                        in_array('application/atom+xml', $curlResult->getHeader('Content-Type'))) {
                        Logger::info('Directly fetched XML for URI ' . $related_uri);
-                       $xml = $curlResult->getBody();
+                       $xml = $curlResult->getBodyString();
                }
 
                if ($xml == '') {
                        $doc = new DOMDocument();
-                       if (!@$doc->loadHTML($curlResult->getBody())) {
+                       if (!@$doc->loadHTML($curlResult->getBodyString())) {
                                return;
                        }
                        $xpath = new DOMXPath($doc);
@@ -770,7 +770,7 @@ class OStatus
 
                                        if ($curlResult->isSuccess()) {
                                                Logger::info('Fetched XML for URI ' . $related_uri);
-                                               $xml = $curlResult->getBody();
+                                               $xml = $curlResult->getBodyString();
                                        }
                                }
                        }
@@ -782,7 +782,7 @@ class OStatus
 
                        if ($curlResult->isSuccess()) {
                                Logger::info('GNU Social workaround to fetch XML for URI ' . $related_uri);
-                               $xml = $curlResult->getBody();
+                               $xml = $curlResult->getBodyString();
                        }
                }
 
@@ -793,7 +793,7 @@ class OStatus
 
                        if ($curlResult->isSuccess()) {
                                Logger::info('GNU Social workaround 2 to fetch XML for URI ' . $related_uri);
-                               $xml = $curlResult->getBody();
+                               $xml = $curlResult->getBodyString();
                        }
                }
 
index 7aac5cad799032a7589c51715395b0f5bc74efee..eda2f398e6a7325ed3f40c26003a4106f04d6be6 100644 (file)
@@ -250,7 +250,7 @@ class ExAuth
                        return false;
                }
 
-               $json = @json_decode($curlResult->getBody());
+               $json = @json_decode($curlResult->getBodyString());
                if (!is_object($json)) {
                        return false;
                }
index c0f596e05020ab3dfc2dbe6322eb245c679bb93a..01f75776f2c23f5e5f305673e798d821a4d2d429 100644 (file)
@@ -433,12 +433,12 @@ class HTTPSignature
                        return [];
                }
 
-               if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
+               if (!$curlResult->isSuccess() || empty($curlResult->getBodyString())) {
                        Logger::debug('Fetching was unsuccessful', ['url' => $request, 'return-code' => $curlResult->getReturnCode(), 'error-number' => $curlResult->getErrorNumber(), 'error' => $curlResult->getError()]);
                        return [];
                }
 
-               $content = json_decode($curlResult->getBody(), true);
+               $content = json_decode($curlResult->getBodyString(), true);
                if (empty($content) || !is_array($content)) {
                        return [];
                }
index 684f54c40293f411aebc79d03ce5911d2e122359..184a02ae7502db77cd3a787f78ffca9b898b1a21 100644 (file)
@@ -238,7 +238,7 @@ class ParseUrl
                }
 
                $curlResult = DI::httpClient()->get($url, HttpClientAccept::HTML, [HttpClientOptions::CONTENT_LENGTH => 1000000]);
-               if (!$curlResult->isSuccess() || empty($curlResult->getBody())) {
+               if (!$curlResult->isSuccess() || empty($curlResult->getBodyString())) {
                        Logger::info('Empty body or error when fetching', ['url' => $url, 'success' => $curlResult->isSuccess(), 'code' => $curlResult->getReturnCode()]);
                        return $siteinfo;
                }
@@ -252,7 +252,7 @@ class ParseUrl
                        }
                }
 
-               $body = $curlResult->getBody();
+               $body = $curlResult->getBodyString();
 
                if ($do_oembed) {
                        $oembed_data = OEmbed::fetchURL($url, false, false);
index e316371a58c3ed815568494f041e9dc1ef54d3cf..a6bfc9b4c4ab5a73e4720e3daa9bcef41bb402b7 100644 (file)
@@ -70,7 +70,7 @@ class CheckRelMeProfileLink
                        return;
                }
 
-               $content = $curlResult->getBody();
+               $content = $curlResult->getBodyString();
                if (!$content) {
                        Logger::notice('Empty body of the fetched homepage link). Cannot verify the relation to profile of UID %s.', ['uid' => $uid, 'owner homepage' => $owner['homepage']]);
                        return;
index 9f342a30a72a93df36ec7672f76be4653218ee5f..a379c1a37146292ffc540538af5b291cc20e875d 100644 (file)
@@ -172,7 +172,7 @@ class OnePoll
                        return false;
                }
 
-               $xml = $curlResult->getBody();
+               $xml = $curlResult->getBodyString();
                if (empty($xml)) {
                        Logger::notice('Empty content', ['id' => $contact['id'], 'url' => $contact['poll']]);
                        return false;
index e6998c446d0b83aa877591a3fa58f76bc3227060..dd08f5cb401cfa8c6caf5ff5d2bbc0dd73bfa05c 100644 (file)
@@ -45,12 +45,12 @@ class UpdateServerPeers
                }
 
                $ret = DI::httpClient()->get($url . '/api/v1/instance/peers', HttpClientAccept::JSON);
-               if (!$ret->isSuccess() || empty($ret->getBody())) {
+               if (!$ret->isSuccess() || empty($ret->getBodyString())) {
                        Logger::info('Server is not reachable or does not offer the "peers" endpoint', ['url' => $url]);
                        return;
                }
 
-               $peers = json_decode($ret->getBody());
+               $peers = json_decode($ret->getBodyString());
                if (empty($peers) || !is_array($peers)) {
                        Logger::info('Server does not have any peers listed', ['url' => $url]);
                        return;
index e7459246e773fdfd6569fa3c3e0d59f299398691..d1935ddc838b805eb2926be62e69e0b86bbdd1c9 100644 (file)
@@ -47,7 +47,7 @@ class CurlResultTest extends TestCase
                self::assertFalse($curlResult->isTimeout());
                self::assertFalse($curlResult->isRedirectUrl());
                self::assertSame($headerArray, $curlResult->getHeaders());
-               self::assertSame($body, $curlResult->getBody());
+               self::assertSame($body, $curlResult->getBodyString());
                self::assertSame('text/html; charset=utf-8', $curlResult->getContentType());
                self::assertSame('https://test.local', $curlResult->getUrl());
                self::assertSame('https://test.local', $curlResult->getRedirectUrl());
@@ -76,7 +76,7 @@ class CurlResultTest extends TestCase
                self::assertFalse($curlResult->isTimeout());
                self::assertTrue($curlResult->isRedirectUrl());
                self::assertSame($headerArray, $curlResult->getHeaders());
-               self::assertSame($body, $curlResult->getBody());
+               self::assertSame($body, $curlResult->getBodyString());
                self::assertSame('text/html; charset=utf-8', $curlResult->getContentType());
                self::assertSame('https://test.local/test/it', $curlResult->getUrl());
                self::assertSame('https://test.other/test/it', $curlResult->getRedirectUrl());
@@ -103,7 +103,7 @@ class CurlResultTest extends TestCase
                self::assertTrue($curlResult->isTimeout());
                self::assertFalse($curlResult->isRedirectUrl());
                self::assertSame($headerArray, $curlResult->getHeaders());
-               self::assertSame($body, $curlResult->getBody());
+               self::assertSame($body, $curlResult->getBodyString());
                self::assertSame('text/html; charset=utf-8', $curlResult->getContentType());
                self::assertSame('https://test.local/test/it', $curlResult->getRedirectUrl());
                self::assertSame('Tested error', $curlResult->getError());
@@ -131,7 +131,7 @@ class CurlResultTest extends TestCase
                self::assertFalse($curlResult->isTimeout());
                self::assertTrue($curlResult->isRedirectUrl());
                self::assertSame($headerArray, $curlResult->getHeaders());
-               self::assertSame($body, $curlResult->getBody());
+               self::assertSame($body, $curlResult->getBodyString());
                self::assertSame('text/html; charset=utf-8', $curlResult->getContentType());
                self::assertSame('https://test.local/test/it?key=value', $curlResult->getUrl());
                self::assertSame('https://test.other/some/?key=value', $curlResult->getRedirectUrl());