Bug report
Given classes ModelA and ModelB, when declaring a property on each class that references the other class and also uses an intersect, phpstan runs out of memory. The phpstan playground won't make this shareable but when you paste the following code into the playground it won't produce an output.
Code snippet that reproduces the problem
<?php declare(strict_types = 1);
use function PHPStan\dumpType;
use function PHPStan\Testing\assertType;
/**
* @property ModelB & object{extra: string} $modelB
*/
class ModelA
{}
/**
* @property ModelA & object{extra: string} $modelA
*/
class ModelB
{}
Expected output
Expected to run without any errors.
Did PHPStan help you today? Did it make you happy in any way?
No response