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