{"action":"closed","issue":{"url":"https://api.github.com/repos/thecodingmachine/packanalyst/issues/10","labels_url":"https://api.github.com/repos/thecodingmachine/packanalyst/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/thecodingmachine/packanalyst/issues/10/comments","events_url":"https://api.github.com/repos/thecodingmachine/packanalyst/issues/10/events","html_url":"https://github.com/thecodingmachine/packanalyst/issues/10","id":99465862,"number":10,"title":"sorting packages by version should not use the pretty version for version_compare","user":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-06T15:46:03Z","updated_at":"2015-08-06T16:20:07Z","closed_at":"2015-08-06T16:20:07Z","body":"https://github.com/thecodingmachine/packanalyst/blob/8cc087a6cf4b21eb726ee1c19e27629f4093d39a/src/Mouf/Packanalyst/Services/FetchDataService.php#L264-L275 is sorting versions with ``version_compare`` based on their pretty version. But this is wrong. Pretty versions may have a different number of parts in their version (it could be ``v2.0`` for the 2.0.0 release) or other chars (``2.x-dev`` for a dev branch) which are not handled properly by ``version_compare``.\r\nTo sort packages, you should rely on the normalized package version (the normalization is precisely applied to make sure ``version_compare`` will sort versions properly)"}}