phpstan / phpstan-nette

Nette Framework class reflection extension for PHPStan & framework-specific rules
MIT License
100 stars 35 forks source link

PHP 7.2 compatibility vol.2 #10

Closed xificurk closed 7 years ago

xificurk commented 7 years ago

Regarding PHP 7.2 compatibility, it turns out #9 is not enough. Although the existing tests passed, you run into a problem when you actually execute the code of DoNotExtendNetteObjectRule or NetteObjectClassReflectionExtension, because $reflection->isSubclassOf() triggers the autoloading and it dies on PHP 7.2. This PR solves the problem by:

ondrejmirtes commented 7 years ago

Thanks a lot, awesome PR! :)

BTW: I think that PHPStan triggers autoloading of classes in more cases than it should, I'll try to address this.