-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect deprecated files #11
Comments
Maybe the best solution is to add the |
Are all the structural elements inside "deprecated files" considered individually deprecated? If so, then the docs for each of those elements should be updated to include |
I've looked at all of the deprecated files, and it appears that any structural elements they hold are properly marked with the List of files that are deprecated but aren't marked with the
I think we should open a ticket on track to have these marked with the deprecated tag. The other deprecated files are. |
@JDGrimes: Just let me know specifically what you need done and I'll move it to the top of the inline docs team's priority list. |
@DrewAPicture: Having second thoughts about whether anything needs to be done. I think that all of the structural elements in the deprecated files are marked as such. I think that was @Rarst's main concern here. The |
I am not sure about "individually deprecate" as universal solution here. See |
If we want to indicate that third-party elements are deprecated in WordPress, then we do need to have the files marked |
Why do double effort? |
@DrewAPicture Does the inline docs team have an opinion on whether files that are deprecated should have the |
PSR-5 is unclear about |
@JDGrimes If the entire file is deprecated, its file header should hold an @Rarst I'd like it if we could blanket-mark a file deprecated by adding the tag to the file header. Is this something we can support? Also, per your earlier question about external libraries, I was always under the impression that we'd skip parsing those files altogether. If there isn't an "excluded files" list, perhaps there should be. |
OK. Those four files don't.
We already have elements inherit the
I was thinking the same thing. I don't think that we need to provide documentation for the external libraries that WP uses. On the other hand, we will want their existence to be documented, and if they are deprecated, we'll want that recorded as well. But maybe that shouldn't be part of the parser's job? |
No. If it's in core it's in core. There is nothing "external" about the way WP handles libraries, essentially hardcoding them into source. If they are in — they must be in reference. |
I've read the comments in this thread several times over trying to decide what I think would be best. For me, at the moment, I'm favouring:
Sure, but some are documented as
If everyone thought that about all code, then phpDoc tags like |
I stick with my position — everything in is in. The prime major flaw of Codex as reference is and always was poor completeness of information. As a developer I don't want someone else to decide what I should and should not see, especially in giant code base with long history of inline documentation issues (no offense to recent docs efforts, they are great and welcomed improvement on the situation). This reference isn't being built at shallow APIs levels, it should be able to serve core developer/contributor as well as novice. I suggest leaving information out is discussed as separate dedicated issue if there is interest. |
Sure, but now we've got something automated, and the docs are far more complete than they've ever been for WP. That gives us the flexibility to sensibly decide what to exclude, rather than playing catch up on what should be included. We're approaching it from a different perspective.
No, but as someone producing the (tool that creates the) documentation, you should be deciding, and a blanket on "everything" is only helpful to the top of the developer pyramid (and they've got source to look through...).
If a core developer / contributor wanted to see the dirty details, then the source is always going to be better to look through than the documentation scraped from it. As such, I would expect to see DevHub as the place for novice and intermediate developers, who don't favour going through the source, to understand how WordPress works now, not how it used to work. Does the DevHub project as a whole have a mission statement / aim / goals listed where this is / can be clarified? |
You are derailing discussion of deprecated here, as above - please open separate dedicated issue if you are interested in discussing this in detail. |
It's all related - whether everything, including all things marked as deprecated, should be included or not. It was your comment that started the discussion btw; I tacked on a response to it on my post that outlined a suggestion for tackling the deprecated issues. |
Regardless of DevHub content goals my personal goal for Parser is to parse everything. Not necessarily achievable goal in scope needed for DevHub, but still. We can argue that it's not a priority to be implemented as it's not needed for DevHub, but parsing deprecated, internal, and whatever else things is happening at some point. So as I see it what-DevHub-displays is entirely separate discussion, likely not even on this issue tracker. Scope of this ticket:
|
+1 to all of what you just said and point well-made. My apologies for mixing up the WP-Parser project and the DevHub project. |
Note that it would be possible to do this by checking for the use of |
Hmm... We currently have file taxonomy for definitions, so we cannot reuse it for calls, taxonomies cannot do two different kinds of relationship. If we go with post relationships it does make sense to me that files should be CPT with two relationships — what is defined inside of them and what is called inside of them. |
Hi, once again, I'm following this discussion while working on a parallel project, rather than contributing. Having parsed WordPress code with WP-Parser and my own solution I realised I needed to be able to parse the logic within files which wasn't part of a class, method or function. To do this I needed to create a "file" CPT. It's similar to an API ( method or function ) in that it can call functions, invoke hooks and even associate functions to hooks. bw_register_field( "_oik_file_name", "text", "File name" , array( "#length" => 80 )); As you can see I have a deprecated checkbox. BUT setting its value is much lower on my priority list than parsing the code to populate the relationships to APIs and hooks. The next stage will be to handle file relationships - allowing navigation through require(), include() and helper functions that themselves perform file loading. To achieve this I believe I will have to develop some rule based logic, similar to that in makepot. |
Docs team decided not to use |
Fixed by #133. |
There is number of deprecated files that seem to only be marked as deprecated by
_deprecated_file()
function call. Currently this is not reflected in parser output, so for example there is no way to know classes/functions defined in those files are deprecated (since they themselves are not marked as such).Needs either:
_deprecated_file()
on parser levelThe text was updated successfully, but these errors were encountered: