Loop for newest version in appstore response
The current implementation when fetching apps from the appstore is to assume that the first element is the newest version, this is now always applicable and leads to the fact that for some apps (e.g. nextant) the newest version is not delivered. This can be easily tested by comparing the version of the downloaded Nextant version.
This change will loop over all releases delivered by the appstore and chooses the newest compatible one. While not the cleanest solution, it does its job.
Most of the code are actually unit tests. Whereas I have copied the whole original response from the appstore and also have performed the transformation. So that's why the diff looks so huge.
Signed-off-by:
Lukas Reschke <lukas@statuscode.ch>
Showing
- lib/private/App/AppStore/Fetcher/AppFetcher.php 67 additions, 0 deletionslib/private/App/AppStore/Fetcher/AppFetcher.php
- lib/private/App/AppStore/Fetcher/Fetcher.php 18 additions, 8 deletionslib/private/App/AppStore/Fetcher/Fetcher.php
- tests/lib/App/AppStore/Fetcher/AppFetcherTest.php 1861 additions, 3 deletionstests/lib/App/AppStore/Fetcher/AppFetcherTest.php
- tests/lib/App/AppStore/Fetcher/FetcherBase.php 0 additions, 1 deletiontests/lib/App/AppStore/Fetcher/FetcherBase.php
Loading
Please register or sign in to comment