Merge pull request #217 from curse89/master
Add calling setEventDispatcher method in ClientFactory
This commit is contained in:
commit
4a99094294
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -17,24 +17,30 @@ jobs:
|
||||
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
|
||||
steps:
|
||||
- name: Check out code into the workspace
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP ${{ matrix.php-version }}
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
coverage: pcov
|
||||
|
||||
- name: Composer cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.HOME }}/.composer/cache
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install -o
|
||||
|
||||
- name: Configure matchers
|
||||
uses: mheap/phpunit-matcher-action@v1
|
||||
|
||||
- name: Run tests
|
||||
run: composer run-script phpunit-ci
|
||||
|
||||
- name: Coverage
|
||||
uses: codecov/codecov-action@v2
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
verbose: true
|
||||
|
@ -285,6 +285,7 @@ class ClientFactory implements ClientFactoryInterface, EventDispatcherAwareInter
|
||||
->setStreamFactory($this->streamFactory)
|
||||
->setRequestFactory($this->requestFactory)
|
||||
->setUriFactory($this->uriFactory)
|
||||
->setEventDispatcher($this->eventDispatcher)
|
||||
->appendRequestHandlers($this->requestHandlers)
|
||||
->appendResponseHandlers($this->responseHandlers)
|
||||
->build();
|
||||
|
@ -27,7 +27,7 @@ trait EventDispatcherAwareTrait
|
||||
*
|
||||
* @param \Psr\EventDispatcher\EventDispatcherInterface|null $eventDispatcher
|
||||
*
|
||||
* @return object
|
||||
* @return static
|
||||
*/
|
||||
public function setEventDispatcher(?EventDispatcherInterface $eventDispatcher): object
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user