diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99a7fb9..6f302fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/src/Factory/ClientFactory.php b/src/Factory/ClientFactory.php index fbacdd8..10eb114 100644 --- a/src/Factory/ClientFactory.php +++ b/src/Factory/ClientFactory.php @@ -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(); diff --git a/src/Traits/EventDispatcherAwareTrait.php b/src/Traits/EventDispatcherAwareTrait.php index 718c50b..33c18f8 100644 --- a/src/Traits/EventDispatcherAwareTrait.php +++ b/src/Traits/EventDispatcherAwareTrait.php @@ -27,7 +27,7 @@ trait EventDispatcherAwareTrait * * @param \Psr\EventDispatcher\EventDispatcherInterface|null $eventDispatcher * - * @return object + * @return static */ public function setEventDispatcher(?EventDispatcherInterface $eventDispatcher): object {