Skip to content

Commit

Permalink
Merged release/0.5.1 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nixilla committed Mar 29, 2021
2 parents 442efb8 + 33b2dd0 commit d9171e8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: php

php:
- 7.2
- 7.3
- 7.4

env:
global:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
26 changes: 13 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
"require": {
"php": ">=5.6",
"ext-json": "*",
"symfony/framework-bundle": "~2.3||~3||~4",
"twig/twig": "~1.24||~2",
"kriswallsmith/buzz": "^1"
"symfony/framework-bundle": "~2.3||~3||~4||~5",
"kriswallsmith/buzz": "^1",
"twig/twig": "^3.0"
},
"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": {
Expand All @@ -41,7 +41,7 @@
"config": {
"bin-dir": "bin",
"platform": {
"php": "7.2"
"php": "7.3"
}
}
}
5 changes: 5 additions & 0 deletions src/Middleware/ApiLoggerMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
7 changes: 5 additions & 2 deletions src/Twig/CurlFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand All @@ -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'))
);
}

Expand Down

0 comments on commit d9171e8

Please sign in to comment.