Skip to content

Remove ignored errors in phpstan which have been resolved upstream#2885

Closed
teohhanhui wants to merge 1 commit into
api-platform:2.4from
teohhanhui:fix/phpstan-ignored-errors
Closed

Remove ignored errors in phpstan which have been resolved upstream#2885
teohhanhui wants to merge 1 commit into
api-platform:2.4from
teohhanhui:fix/phpstan-ignored-errors

Conversation

@teohhanhui

@teohhanhui teohhanhui commented Jun 26, 2019

Copy link
Copy Markdown
Contributor
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

symfony/symfony#31903 was released.

@teohhanhui

teohhanhui commented Jun 26, 2019

Copy link
Copy Markdown
Contributor Author

Hmm... I'm not sure why this is still failing.

But this is OK: https://phpstan.org/r/d3b13b8f-d91a-4384-81a3-0cc4e81ef2c3

@ondrejmirtes Perhaps you have an idea of what's going on?

@ondrejmirtes

Copy link
Copy Markdown

Please check out what type each expression has:

$client = static::createClient();
$client === 'aaa';
$client->getResponse() === 'aaa';

A rule starting with Strict comparison between ... will tell you what the type is. There's no magic, PHPStan just reads native typehints and phpDocs, so you can figure that out.

@teohhanhui

Copy link
Copy Markdown
Contributor Author

Okay, so the problem seems to me like symfony/framework-bundle 4.2 is not forward compatible with symfony/http-kernel 4.3 😞

@teohhanhui

Copy link
Copy Markdown
Contributor Author

Will be fixed by symfony/symfony#32213

In the meantime, we can already remove these ignored errors on master.

@teohhanhui

Copy link
Copy Markdown
Contributor Author

Obsoleted by #2925

@teohhanhui teohhanhui closed this Jul 10, 2019
@teohhanhui
teohhanhui deleted the fix/phpstan-ignored-errors branch July 10, 2019 10:41
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.

2 participants