{"action":"closed","issue":{"url":"https://api.github.com/repos/nette/php-generator/issues/22","labels_url":"https://api.github.com/repos/nette/php-generator/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/nette/php-generator/issues/22/comments","events_url":"https://api.github.com/repos/nette/php-generator/issues/22/events","html_url":"https://github.com/nette/php-generator/issues/22","id":119790189,"number":22,"title":"Packagist distributes an outdated version","user":{"login":"dav-m85","id":1519726,"avatar_url":"https://avatars.githubusercontent.com/u/1519726?v=3","gravatar_id":"","url":"https://api.github.com/users/dav-m85","html_url":"https://github.com/dav-m85","followers_url":"https://api.github.com/users/dav-m85/followers","following_url":"https://api.github.com/users/dav-m85/following{/other_user}","gists_url":"https://api.github.com/users/dav-m85/gists{/gist_id}","starred_url":"https://api.github.com/users/dav-m85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dav-m85/subscriptions","organizations_url":"https://api.github.com/users/dav-m85/orgs","repos_url":"https://api.github.com/users/dav-m85/repos","events_url":"https://api.github.com/users/dav-m85/events{/privacy}","received_events_url":"https://api.github.com/users/dav-m85/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-01T19:33:25Z","updated_at":"2015-12-01T22:11:21Z","closed_at":"2015-12-01T22:11:21Z","body":"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:\r\n\r\n```bash\r\nmkdir bug && cd bug\r\nrm -rf ~/.composer/cache\r\ncomposer require nette/php-generator\r\n# gives a few lines and notably   - Installing nette/php-generator (v2.3.4) Downloading: 100%\r\ncat vendor/nette/php-generator/src/PhpGenerator/ClassType.php | grep addComment\r\n# nothing... the addComment is not part of ClassType, which is indeed not the case in v2.3.4\r\n```\r\n\r\nI 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).\r\n\r\nA fast fix is to download the source or force a specific revision, in which case it is all right, we have the latest version."}}