wpseek / wpseek-web

This repository is currently only used for issue tracking for wpseek.com
https://wpseek.com/
1 stars 0 forks source link

Wrong version reported when using `@since` as changelog #9

Closed JDGrimes closed 10 years ago

JDGrimes commented 10 years ago

For example, the version for wp_list_pluck() is shown as 4.0.0. The actual version is 3.1.0. The disparity is because of the use of multiple @since tags in the function's docblock: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/functions.php#L2985

The bug is that only the first @since tag should be used to determine the version. As an enhancement, you could use any other @since to display a changelog (see proposed PHPDoc standards). The changelog-type use of @since is just starting to be used in WordPress core, but it is very useful, and I think it will be standard for major changes to an element in future.

oliverschloebe commented 10 years ago

Funny enough I'm already parsing multiple @deprecated occurences already, e.g. http://wpseek.com/permalink_single_rss/ using the first occurence as version information and all following occurences to display detailed info, in that case "Use the_permalink_rss().".

Thanks mate! :)

oliverschloebe commented 10 years ago

Fixed plus added a change log section if there's more than one @since doc tag - http://wpseek.com/wp_list_pluck/

Thanks again!