Skip to content

Commit

Permalink
Merge pull request #328 from GrahamCampbell/guzzle-fixes
Browse files Browse the repository at this point in the history
Fixed guzzle version constraints and avoid old promises function API
  • Loading branch information
gregurco committed May 23, 2023
2 parents b82ef12 + 0e1c972 commit b890cc8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
],
"require": {
"php": ">=7.1",
"guzzlehttp/guzzle": "~6.0|~7.0",
"guzzlehttp/guzzle": "^6.5.8|^7.4.5",
"guzzlehttp/promises": "^1.5.3|^2.0",
"guzzlehttp/psr7": "^1.9.1|^2.5",
"symfony/framework-bundle": "~4.0|~5.0|~6.0",
"symfony/expression-language": "~4.0|~5.0|~6.0",
"symfony/stopwatch": "~4.0|~5.0|~6.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/EventDispatchMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function (Exception $reason) {
$this->doDispatch($postTransactionEvent, GuzzleEvents::postTransactionFor($this->serviceName));

// Continue down the chain.
return \GuzzleHttp\Promise\rejection_for($reason);
return \GuzzleHttp\Promise\Create::rejectionFor($reason);
}
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/LogMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function ($reason) use ($logger, $request, $formatter, $requestId) {

$logger->notice($message, $context);

return \GuzzleHttp\Promise\rejection_for($reason);
return \GuzzleHttp\Promise\Create::rejectionFor($reason);
}
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/ProfileMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function ($response) use ($event) {
function ($reason) use ($event) {
$event->stop();

return \GuzzleHttp\Promise\rejection_for($reason);
return \GuzzleHttp\Promise\Create::rejectionFor($reason);
}
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/Middleware/SymfonyLogMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function ($reason) use ($logger, $request, $formatter) {

$logger->notice($message);

return \GuzzleHttp\Promise\rejection_for($reason);
return \GuzzleHttp\Promise\Create::rejectionFor($reason);
}
);
};
Expand Down

0 comments on commit b890cc8

Please sign in to comment.