From 3ffe61686f73da175e30c2e9bc05e2297b5799ec Mon Sep 17 00:00:00 2001 From: Janusz Slota Date: Wed, 15 Jan 2020 10:19:35 +0000 Subject: [PATCH 1/4] Bumped dependencies --- .travis.yml | 2 +- composer.json | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97254a6..62569f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: php php: - - 7.2 - 7.3 + - 7.4 env: global: diff --git a/composer.json b/composer.json index ea56aac..00fc0e3 100644 --- a/composer.json +++ b/composer.json @@ -18,20 +18,20 @@ "require": { "php": ">=5.6", "ext-json": "*", - "symfony/framework-bundle": "~2.3||~3||~4", - "twig/twig": "~1.24||~2", + "symfony/framework-bundle": "~2.3||~3||~4||~5", + "twig/twig": "~1.24||~2||~3", "kriswallsmith/buzz": "^1" }, "require-dev" :{ - "phpspec/phpspec": "^4.3", - "pdepend/pdepend": "^2.5", - "phploc/phploc": "^4.0", - "phpmd/phpmd": "^2.6", - "sebastian/phpcpd": "^4.0", - "leanphp/phpspec-code-coverage": "^4.2", - "php-coveralls/php-coveralls": "^2.1", - "symfony/expression-language": "~2.3||~3||~4", - "twilio/sdk": "^5.19" + "phpspec/phpspec": "^6", + "pdepend/pdepend": "^2.6.1", + "phploc/phploc": "^5.0", + "phpmd/phpmd": "^2.8.1", + "sebastian/phpcpd": "^4.1", + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", + "php-coveralls/php-coveralls": "^2.2", + "symfony/expression-language": "~2.3||~3||~4||~5", + "twilio/sdk": "^5.42" }, "autoload": { "psr-4": { @@ -41,7 +41,7 @@ "config": { "bin-dir": "bin", "platform": { - "php": "7.2" + "php": "7.3" } } } From c6c68ebea8013f7087da612e695e94d0b573aa88 Mon Sep 17 00:00:00 2001 From: Janusz Slota Date: Wed, 15 Jan 2020 11:11:39 +0000 Subject: [PATCH 2/4] adds support for Twig 3 --- composer.json | 4 ++-- src/Twig/CurlFormatter.php | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 00fc0e3..8dff3cf 100644 --- a/composer.json +++ b/composer.json @@ -19,8 +19,8 @@ "php": ">=5.6", "ext-json": "*", "symfony/framework-bundle": "~2.3||~3||~4||~5", - "twig/twig": "~1.24||~2||~3", - "kriswallsmith/buzz": "^1" + "kriswallsmith/buzz": "^1", + "twig/twig": "^3.0" }, "require-dev" :{ "phpspec/phpspec": "^6", diff --git a/src/Twig/CurlFormatter.php b/src/Twig/CurlFormatter.php index df2dc65..dc49bd4 100644 --- a/src/Twig/CurlFormatter.php +++ b/src/Twig/CurlFormatter.php @@ -2,7 +2,10 @@ namespace Nixilla\Api\LoggerBundle\Twig; -class CurlFormatter extends \Twig_Extension +use Twig\Extension\AbstractExtension; +use Twig\TwigFilter; + +class CurlFormatter extends AbstractExtension { public function getName() { @@ -12,7 +15,7 @@ public function getName() public function getFilters() { return array( - new \Twig_SimpleFilter('format_curl_command', array($this, 'formatForCurl')) + new TwigFilter('format_curl_command', array($this, 'formatForCurl')) ); } From b9a02757fd1c317b2a18839fc71351c74be222e6 Mon Sep 17 00:00:00 2001 From: Jernej Slejko Date: Thu, 25 Mar 2021 18:30:30 +0000 Subject: [PATCH 3/4] Update ApiLoggerMiddleware.php Does not change the test, but adds functionality, so that any other event after this reading the data is available. --- src/Middleware/ApiLoggerMiddleware.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Middleware/ApiLoggerMiddleware.php b/src/Middleware/ApiLoggerMiddleware.php index 0efaf7d..b8e0d2f 100644 --- a/src/Middleware/ApiLoggerMiddleware.php +++ b/src/Middleware/ApiLoggerMiddleware.php @@ -56,6 +56,11 @@ public function handleResponse(RequestInterface $request, ResponseInterface $res $response->getBody()->getContents() ); + /** + * need to rewind the contents so it can be retrieved later!!! + */ + $response->getBody()->rewind(); + return $next($request, $response); } } From 33b2dd07b7369a22e22f8b86c09b5b4c2b8a25b5 Mon Sep 17 00:00:00 2001 From: Janusz Slota Date: Mon, 29 Mar 2021 10:37:33 +0100 Subject: [PATCH 4/4] Release version 0.5.1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef8b427..14453d3 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Versions -For `buzz<0.16` please use `nixilla/api-logger-bundle:^0.4` and for latest `buzz:^1`, use `nixilla/api-logger-bundle:^0.5` +For `buzz<0.16` please use `nixilla/api-logger-bundle:^0.4` and for latest `buzz:^1`, use `nixilla/api-logger-bundle:^0.5.1` ## Installation