nette / php-generator

🐘 Generates neat PHP code for you. Supports new PHP 8.3 features.
https://doc.nette.org/php-generator
Other
2.11k stars 138 forks source link

Packagist distributes an outdated version #22

Closed dav-m85 closed 8 years ago

dav-m85 commented 8 years ago

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.

dav-m85 commented 8 years ago

My bad, been flabergasted by how old my php version was, and how silently composer was doing things.