From 351a213ba2ea52b7b7d26339fad552f0edba5742 Mon Sep 17 00:00:00 2001 From: Guilliam Xavier Date: Sun, 17 May 2020 11:36:12 +0200 Subject: [PATCH] Fix "Fixed deprecation warning in node test server" (#2638) * Fix "Fixed deprecation warning in node test server * Ignore PHPStan error after review --- phpstan-baseline.neon | 5 +++++ tests/server.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index dc5180f7f..506d060d1 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -495,6 +495,11 @@ parameters: count: 1 path: src/Handler/CurlFactory.php + - + message: "#^Parameter \\#1 \\$filename of function is_dir expects string, string\\|false given\\.$#" + count: 1 + path: src/Handler/CurlFactory.php + - message: "#^Method GuzzleHttp\\\\Handler\\\\CurlFactory\\:\\:retryFailedRewind\\(\\) has no return typehint specified\\.$#" count: 1 diff --git a/tests/server.js b/tests/server.js index 8e2ab249d..f6c336a5a 100644 --- a/tests/server.js +++ b/tests/server.js @@ -178,7 +178,7 @@ var GuzzleServer = function(port, log) { that.responses = JSON.parse(request.body); for (var i = 0; i < that.responses.length; i++) { if (that.responses[i].body) { - that.responses[i].body = new Buffer.from(that.responses[i].body, 'base64'); + that.responses[i].body = Buffer.from(that.responses[i].body, 'base64'); } } if (that.log) {