Skip to content

Ensure PHPStan version stability #1281

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

Merged
merged 2 commits into from
Jul 26, 2017

Conversation

teohhanhui
Copy link
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

@soyuka
Copy link
Member

soyuka commented Jul 24, 2017

Would be cleaner to merge this in 2.0, then merge 2.0 in master + only fix phpstan to avoid conflicts no?

WDYT?

@teohhanhui
Copy link
Contributor Author

I don't think this would create conflicts, but I leave that up to whoever does the merge. 😛

@teohhanhui
Copy link
Contributor Author

But sure, cleaner commit log lol...

@soyuka
Copy link
Member

soyuka commented Jul 24, 2017

Hmm, the error is weird now :P.

@teohhanhui
Copy link
Contributor Author

Yeah, it's weird. Could it have been caused by incorrect usage of PHPStan?

@teohhanhui
Copy link
Contributor Author

Maybe @ondrejmirtes could help us figure this out. 😆

@meyerbaptiste
Copy link
Member

The problem comes from this PR phpstan/phpstan#255 (comment) and the Symfony\Component\DependencyInjection\ExpressionLanguage class which extends a non-existent class.

But why does PHPStan analyze this class? We have no reference to this one in our codebase for this branch.

@ondrejmirtes
Copy link

ondrejmirtes commented Jul 24, 2017

I'll look into it, I'm sure there's some reason PHPStan tries to load this class.

@meyerbaptiste
Copy link
Member

You're right @ondrejmirtes. PHPStan tries to load this class when it creates the type map of the Symfony\Component\DependencyInjection\ContainerBuilder class (we have many references to this one) which has an $expressionLanguage attribute (ExpressionLangage|null).

But errors at this level should not be displayed, right?

@ondrejmirtes
Copy link

Current behaviour is actually an improvement because in 0.7, the PHPStan process would crash on a fatal error. I'll evaluate this situation and get back to you.

@ondrejmirtes
Copy link

You can always put this in ignoreErrors :)

@mvrhov
Copy link

mvrhov commented Jul 25, 2017

Do you need global require? PHPStan is now available as a phar.

@soyuka soyuka merged commit 5b8c2a2 into api-platform:2.0 Jul 26, 2017
@soyuka
Copy link
Member

soyuka commented Jul 26, 2017

Thanks @teohhanhui

hoangnd25 pushed a commit to hoangnd25/core that referenced this pull request Feb 23, 2018
@teohhanhui teohhanhui deleted the phpstan-lock-version branch July 17, 2018 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants