Took me some time to figures this out, but looks like packagist is distributing a old version of the code (at least older than 9d3d8d4). Step to reproduce:
mkdir bug && cd bug
rm -rf ~/.composer/cache
composer require nette/php-generator
# gives a few lines and notably - Installing nette/php-generator (v2.3.4) Downloading: 100%
cat vendor/nette/php-generator/src/PhpGenerator/ClassType.php | grep addComment
# nothing... the addComment is not part of ClassType, which is indeed not the case in v2.3.4
I wonder if it is related to .gitattributes being so aggressive (well first time I see it used for excluding tests, but maybe it is a long shot).
A fast fix is to download the source or force a specific revision, in which case it is all right, we have the latest version.
Took me some time to figures this out, but looks like packagist is distributing a old version of the code (at least older than 9d3d8d4). Step to reproduce:
I wonder if it is related to .gitattributes being so aggressive (well first time I see it used for excluding tests, but maybe it is a long shot).
A fast fix is to download the source or force a specific revision, in which case it is all right, we have the latest version.