netz98 / n98-magerun

The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. All commands are extendable by a module API.
http://magerun.net/
Other
1.44k stars 400 forks source link

Only list deprecated extension versions from magento connect #731

Closed EmPeWe closed 8 years ago

EmPeWe commented 8 years ago

I noticed, that extension:search results list outdated versions for some extensions. E.g. some PSP extensions:

n98-magerun.phar extension:search payone

results in "Mage_Payone | 2.4.0 | beta", but "official" version from magento connect is 3.4.9 (http://www.magentocommerce.com/magento-connect/payone-payment-fur-magento.html)

n98-magerun.phar extension:search ogone

results in "Ogone | 12.01.27 | beta" vs. "official" version is 15.11.09 (http://www.magentocommerce.com/magento-connect/the-official-ingenico-former-ogone-extension.html)

Maybe this is something similar as described in #692?!

It has nothing to do with release date in general, because for magesetup, everything is fine:

n98-magerun.phar extension:search magesetup

results in "FireGento_MageSetup | 2.2.2 | stable" which is the last know release to magento connect (http://www.magentocommerce.com/magento-connect/firegento-magesetup.html) (I'm not talking about releases of magesetup from github, which are different)

ktomk commented 8 years ago

Thank you for your report, there is a flaw in the command to properly parse connect return data line-by-line with a flaw on each line that prevents to properly show any additional version when there is more than one.

Exemplary output is:

shopauskunft_rating: 0.2.0 beta
marcelolinhares_pj: 0.1.31 beta
ProductAutocomplete: 0.1.2 beta
Blue_Acorn_Convert_Experiments: 1.0.7 beta
SwipeHQ_Checkout: 1.1.2 beta,1.7.2 stable
OneSaas_Connect: 1.0.6.4 alpha,1.0.6.17 beta
zendesk: 1.4.2 beta,2.1.2 stable
BabenkoCommerceGeoRedirect: 0.1.1 beta
NtgMage_LimitCart: 0.9.0 beta
Mconnect_Featuredproducts: 0.1.1 beta
Clearandfizzy_DeveloperTools: 1.1.1 alpha,1.1.2 beta
Steelhouse_Commerce: 0.4.9.1 beta
Bluefish_Connection: 1.0.0.2 alpha,1.0.0.3 beta,1.1.6 stable
product_locator: 0.5.1 beta
neev_popular_products: 1.1.0.0 beta
eepohs_erply: 2.0.2 beta
Adfab_Outfits: 1.0.2 beta
YeahCommerce_Catalog_Sync_Extension: 1.0.15 alpha,1.0.16 beta,1.0.18 stable
IntegerNet_RemoveCustomerAccountLinks: 1.0.0.0 beta,2.0.0.2 stable
Clearandfizzy_Reducedcheckout: 1.1.0 beta,1.10.2 stable

I wonder how the additional versions should be output. Do you have a good suggestion what would work well in your scenario?

EmPeWe commented 8 years ago

Hi, thx for your answer. I digged a little deeper, starting from your response.

If I do a :download instead of :search, I will get the latest version.

It seems, that the order of the result is alpha, beta and stable. As this is the output of

$ ./mage list-available

I think it would make sense, if every preferred state will show on its own line. This will keep compatibility with different output formats (csv, json, xml)

Is it OK, if I'll try to write a patch?

tkn98 commented 8 years ago

@EmPeWe: Sure, patches are always welcome. Feel free to do it the way you outline, I just assume that the list will become very large. But with each version on each line, it's more normalized and other software can perhaps better operate on it.

If you write a patch, please consider adding an object that can take care of parsing the string output and return the data in a more normalized form. That done it should be easy to test just the parsing quickly and adopt the existing command with the new functionality. But that is just a non-binding idea I have while I have reviewed the code 13 hours ago.

Thanks for all your efforts and let me know if you've got any questions or you need help of any kind.

EmPeWe commented 8 years ago

I hope you like my proposed patch.

At the moment, there are 505 extensions on magento connect with more than 1 version available with a total of 3633 extenions. So yes, the list will grow for ~14% ;-)

tkn98 commented 8 years ago

Now part of the develop branch.