wpseek / wpseek-web

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

Inconsistent syntax for droppedVer in API #13

Open olach opened 10 years ago

olach commented 10 years ago

Using the API, the syntax for droppedVer is inconsistent.

Examples: http://api.wpseek.com/?method=wordpress.getfunction&s=debug_fclose

  "droppedVer": {
    "1": "Use error_log()",
    "2": "3.4.0"
  },

http://api.wpseek.com/?method=wordpress.getfunction&s=automatic_feed_links

"droppedVer": {
    "1": "3.0.0",
    "2": "Use add_theme_support( 'automatic-feed-links' )"
  },

http://api.wpseek.com/?method=wordpress.getfunction&s=_fetch_remote_file

"droppedVer": [
    "3.0.0",
    "Use SimplePie instead."
  ],

This makes it hard to fetch the actual dropped version number.

olach commented 10 years ago

Found another syntax style that differ from the others:

http://api.wpseek.com/?method=wordpress.getfunction&s=get_page

"droppedVer": {
    "1": "3.5.0 Use get_post()"
  },
olach commented 10 years ago

And another one:

http://api.wpseek.com/?method=wordpress.getfunction&s=install_blog_defaults

"droppedVer": {
    "1": "MU",
    "2": "Use wp_install_defaults()"
  },
olach commented 10 years ago

Found another style:

http://api.wpseek.com/?method=wordpress.getfunction&s=install_themes_feature_list

"droppedVer": {
    "1": "since 3.1.0 Use get_theme_feature_list() instead."
  },
olach commented 10 years ago

This one doesn't even have a dropped version number:

http://api.wpseek.com/?method=wordpress.getfunction&s=wp_login

"droppedVer": {
    "1": "Use wp_signon()"
  },
oliverschloebe commented 10 years ago

Hey Ola, I know this is a huge problem. The WordPress doc blocks are a vast desert when it comes to consistency.

Some time ago I created a ticket with patches to address as many of these issues as possible: https://core.trac.wordpress.org/ticket/28806 Unfortunately fixing these will span beyond 4.0 as you can see in the last comment on my ticket.

I'm gonna fix the issues with the API itself, but can't do much on the data provided through the WP code until my patches are merged.

olach commented 10 years ago

No worries. I had a feeling a lot of the problem was in the WordPress codebase. Let's wait until your patches are merged.

oliverschloebe commented 10 years ago

I'll try to add some "legacy code" to address and consolidate the docblocks' data on my side which I can remove after my patches were merged.

oliverschloebe commented 10 years ago

Consolidated most of the @deprecation and @since doc block tags. More missing data will be added once my patches on trac.wp.org were merged.