Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): add withOptions to our HttpClient implementation #4282

Merged
merged 2 commits into from May 20, 2021

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented May 18, 2021

No description provided.

@soyuka soyuka force-pushed the fix/http-client-depreciation branch 2 times, most recently from 8d3dd57 to 93e7cb5 Compare May 19, 2021 09:01
@@ -51,7 +51,7 @@ public function applyToCollection(array $requestBody, string $resourceClass, ?st

foreach ($resourceFilters as $filterId) {
if ($this->filterLocator->has($filterId) && is_a($filter = $this->filterLocator->get($filterId), $this->getFilterInterface(), true)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For PHPStan's error about class-string<object>|object, wouldn't this be better?

Suggested change
if ($this->filterLocator->has($filterId) && is_a($filter = $this->filterLocator->get($filterId), $this->getFilterInterface(), true)) {
if ($this->filterLocator->has($filterId) && is_a($filter = $this->filterLocator->get($filterId), $this->getFilterInterface())) {

(and revert the //@phpstan-ignore-line below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks

@soyuka soyuka force-pushed the fix/http-client-depreciation branch from 93e7cb5 to 7f4b2cd Compare May 20, 2021 07:33
@soyuka soyuka merged commit 45fda88 into api-platform:2.6 May 20, 2021
@soyuka soyuka deleted the fix/http-client-depreciation branch May 20, 2021 12:21
@carlobeltrame carlobeltrame mentioned this pull request Jun 27, 2021
18 tasks
LoicBoursin pushed a commit to LoicBoursin/core that referenced this pull request Aug 18, 2021
…form#4282)

* fix(test): add withOptions to our HttpClient implementation

* chore(phpstan): fix false positives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants