Skip to content

Commit

Permalink
Merge pull request #322 from Art4/fix-requestfactory-support
Browse files Browse the repository at this point in the history
Fix RequestFactory support
  • Loading branch information
Art4 authored Sep 20, 2023
2 parents c398c3a + e66baac commit 0ac236a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

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

### Deprecated
Expand Down
2 changes: 1 addition & 1 deletion src/Redmine/Client/Psr18Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
string $apikeyOrUsername,
string $password = null
) {
if ($requestFactory instanceof ServerRequestFactoryInterface) {
if (! $requestFactory instanceof RequestFactoryInterface && $requestFactory instanceof ServerRequestFactoryInterface) {
@trigger_error(
sprintf(
'%s(): Providing Argument #2 ($requestFactory) as %s is deprecated since v2.3.0, please provide as %s instead.',
Expand Down

0 comments on commit 0ac236a

Please sign in to comment.