Skip to content

Commit 0ac236a

Browse files
authored
Merge pull request #322 from Art4/fix-requestfactory-support
Fix RequestFactory support
2 parents c398c3a + e66baac commit 0ac236a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111

12-
- Allow `Psr\Http\Message\ServerRequestFactoryInterface` as Argument #2 ($requestFactory) in `Redmine\Client\Psr18Client::__construct()`
12+
- Allow `Psr\Http\Message\RequestFactoryInterface` as Argument #2 ($requestFactory) in `Redmine\Client\Psr18Client::__construct()`
1313
- Added support for PHP 8.2
1414

1515
### Deprecated

src/Redmine/Client/Psr18Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(
4343
string $apikeyOrUsername,
4444
string $password = null
4545
) {
46-
if ($requestFactory instanceof ServerRequestFactoryInterface) {
46+
if (! $requestFactory instanceof RequestFactoryInterface && $requestFactory instanceof ServerRequestFactoryInterface) {
4747
@trigger_error(
4848
sprintf(
4949
'%s(): Providing Argument #2 ($requestFactory) as %s is deprecated since v2.3.0, please provide as %s instead.',

0 commit comments

Comments
 (0)