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

Internal error: Unexpected type PHPStan\Type\ObjectType #36

Closed
rz6789 opened this issue Jan 27, 2021 · 5 comments
Closed

Internal error: Unexpected type PHPStan\Type\ObjectType #36

rz6789 opened this issue Jan 27, 2021 · 5 comments

Comments

@rz6789
Copy link

rz6789 commented Jan 27, 2021

PHP 7.3.26
"yiisoft/yii2" : "2.0.30",
"phpstan/phpstan": "0.12.69",
"proget-hq/phpstan-yii2": "^0.7",

Internal error: Internal error: Unexpected type PHPStan\Type\ObjectType during method call andFilterWhere at line 139 in file /var/www/promo-api/readModels/goods/TagIndexSearchModel.php
Run PHPStan with --debug option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new
Internal error: Internal error: Unexpected type PHPStan\Type\ObjectType during method call from at line 251 in file /var/www/promo-api/readModels/promotion/PromotionFilterModel.php
Run PHPStan with --debug option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new
Internal error: Internal error: Unexpected type PHPStan\Type\ObjectType during method call asArray at line 122 in file /var/www/promo-api/readModels/promotion/PromotionSearchModel.php
Run PHPStan with --debug option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new
Internal error: Internal error: Unexpected type PHPStan\Type\ObjectType during method call cache at line 93 in file /var/www/promo-api/readModels/promotion/PromotionGoodsSearchModel.php
Run PHPStan with --debug option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new
Child process error (exit code 1):
Child process error (exit code 1):

with --debug option just show
....
/var/www/promo-api/readModels/goods/TagIndexSearchModel.php

An internal server error occurred.
@EtienneBruines
Copy link
Contributor

Do you think #25 might be related?

@rz6789
Copy link
Author

rz6789 commented Feb 1, 2021

yes
looks like problem is in same place

throw new ShouldNotHappenException(sprintf('Unexpected type %s during method call %s at line %d', \get_class($calledOnType), $methodReflection->getName(), $methodCall->getLine()));

@particleflux
Copy link
Contributor

Any update or workaround for this?

@marmichalski
Copy link
Contributor

Closing as a duplicate of #25.

Pull requests are more than welcome 🐱.

@XMarat
Copy link

XMarat commented Dec 10, 2021

I fix it #48

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

No branches or pull requests

5 participants