Skip to content
Snippets Groups Projects
Commit afa63614 authored by David Prévot's avatar David Prévot
Browse files

New upstream version 2.3.0

parents 36ff4a7c f640739f
No related branches found
No related tags found
No related merge requests found
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->name('*.php')
;
$config = (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
])
->setFinder($finder)
;
return $config;
......@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
## [2.3.0] - 2022-02-21
### Changed
- Enabled the `$onRejected` callback of `HttpRejectedPromise` to return a promise for implementing a retry
mechanism [#168](https://github.com/php-http/httplug/pull/168)
## [2.2.0] - 2020-07-13
### Changed
......
......@@ -2,12 +2,11 @@
[![Latest Version](https://img.shields.io/github/release/php-http/httplug.svg?style=flat-square)](https://github.com/php-http/httplug/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
[![Build Status](https://img.shields.io/travis/php-http/httplug/master.svg?style=flat-square)](https://travis-ci.org/php-http/httplug)
[![Build Status](https://github.com/php-http/httplug/actions/workflows/ci.yml/badge.svg)](https://github.com/php-http/httplug/actions/workflows/ci.yml)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug)
[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/httplug.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/httplug)
[![Total Downloads](https://img.shields.io/packagist/dt/php-http/httplug.svg?style=flat-square)](https://packagist.org/packages/php-http/httplug)
[![Slack Status](http://slack.httplug.io/badge.svg)](http://slack.httplug.io)
[![Email](https://img.shields.io/badge/email-team@httplug.io-blue.svg?style=flat-square)](mailto:team@httplug.io)
**HTTPlug, the HTTP client abstraction for PHP.**
......
......@@ -27,7 +27,12 @@ final class HttpRejectedPromise implements Promise
}
try {
return new HttpFulfilledPromise($onRejected($this->exception));
$result = $onRejected($this->exception);
if ($result instanceof Promise) {
return $result;
}
return new HttpFulfilledPromise($result);
} catch (Exception $e) {
return new self($e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment