Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.- As noted by sun in #361683: Field API initial patch, api.field.php should be field.api.php
- the sample_code.php file was not supposed to hit core.
- a few files are missing CVS Id tags.
No time to roll a proper patch right now, will do that a lil later.
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | 369562-27-field_more_trivial_cleanup.diff | 9.75 KB | jeffschuler |
| #21 | field_cleanup-369562-21.patch | 43.5 KB | yched |
| #18 | field_cleanup-369562-16.patch | 46.89 KB | yched |
| #17 | field_cleanup-369562-17.patch | 7.79 KB | webchick |
| #13 | field_cleanup-369562-13.patch | 5.42 KB | yched |
Comments
Comment #1
yched commentedPatch fixes the above, plus :
- removes a few trailing spaces,
- slightly adjusts the hotfix that went in in http://drupal.org/node/361683#comment-1239051 : #theme is actually more appropiate than #theme, and we currently don't need field_elements() anymore.
- adjusts the PHPdoc for field_default_view() according to the changes in the hotfix patch.
- fixes a few comments (remove mentions of fieldgroups, that stay in contrib)
- Fixes the 'Package' of field_test.module to match the one of other test modules
Sorry for the (mini-)kitten slaughter, but I honestly don't have the heart to split into separate patches, and I have more substantial patches warming up so I would prefer not to spend too much time on getting mini-cleanup patches in first. Being bold again and setting to RTBC. This won't become a habit, I promise.
Comment #2
yched commentedMore explicit title
Comment #4
yched commentedEr.. changes in field.info.inc are simply adding an Id tag.
Giving the bot another chance.
Comment #6
yched commentedFingers crossed ?
Comment #8
yched commentedOK, I give up.
The patch tries to *rename* api.field.php to field.api.php. How can there be invalid syntax in a file that's being removed ?
Comment #9
bjaspan commentedLet's do this the easy way. A CVS patch can't handle file adds or removes. So, Dries or webchick, please:
Then set this back to CNW and we'll fix up the missing CVS Id tags.
Comment #10
asimmonds commentedPIFR parses the patches for the list of files to lint. I suspect it can't handle a file being removed by a patch and that no longer exists, similar issue #366952: "Invalid PHP Syntax" when testing binary files that don't exist
Comment #11
webchick#9 has been taken care of. Marking to CNW per Barry.
Comment #12
bjaspan commentedThis patch adds $Id$ tags to all files in module/field that are missing them. I am foolishly marking my own comment-only patch RTBC. :-)
Comment #13
yched commentedCVS Ids, plus reintroduced the other changes :
- removes a few trailing spaces,
- slightly adjusts the hotfix that went in in http://drupal.org/node/361683#comment-1239051 : #theme is actually more appropiate than #theme_wrapper, and we currently don't need field_elements() anymore.
- adjusts the PHPdoc for field_default_view() according to the changes in the hotfix patch.
- fixes a few comments (remove mentions of fieldgroups, that stay in contrib)
- Fixes the 'Package' of field_test.module form 'testing' to 'Testing', to match the other test modules
Comment #14
keith.smith commentedNote that a previous patch eliminated all double spacing between code comments in core in favor of single spacing, and added a standard for single spacing between comments to the coding standards page.
However, no reason to let that stop this -- I'll roll a patch to eliminate all the double spaces that fields-in-core patches have reintroduced in another issue.
Comment #15
webchickWell. If we're going to do a trivial clean-up, let's do it right.
1. field.info.inc also needs a @file block.
2. The space needs to be removed between the field_default_validate() PHPDoc and its function declaration, or it will not show up in api.drupal.org. And why are we removing comments there?
3. field.crud.inc also needs a @file block.
Comment #16
bjaspan commentedAngie, I'm getting overwhelmed with multiple patches to the same files in module/field. Could you make another interim commit of the $Id$-only patch in #12, and then we'll continue the other "trivial fixes" in this issue with separate patches in this same issue?
Comment #17
webchickIn that case, re-rolled with TODOs in place, and committed this to HEAD.
Setting back to 'active' though, since from a quick glance-through, we are not even remotely close to done with cleanup in this series of files.
Comment #18
yched commented1./3. Added @file blocks to all the files that don't have one. Description is minimal, most files provide documentation in @defgroup blocks.
2. This block comment is not the PHPDoc for field_default_validate(), but the @file block for field.default.inc, so it needs the space.
Most functions in field.default.inc currently don't have PHPDoc. Not critical for now, those functions are internal. They will need their phpdoc at some point of course, but I suggest we don't make this issue a 'fix all field doc issues'.
The one comment that is removed came straight from CCK D6, and outlined a difference between CCK D5 and D6. It is not relevant anymore for D7 fields : storage is not dealt with in field.default.inc, not because it's not handled field by field, but because storage is left out to pluggable backends.
Patch also fixes the double spacing occurrences I could find using a regexp, and a few missing / extraneaous linebreaks I found along the way.
Comment #20
yched commentedHm, i crossposted #18 over #16/#17. Will reroll later today.
Comment #21
yched commentedNew patch
- provides @file block descriptions.
- fixes double spaces in comments
- fixes a few missing or double linebreaks
Comment #22
bjaspan commentedI scanned through the comment changes and saw no obvious problems. Also, none of the tests broke. :-)
Comment #23
webchickOk, cool. Committed this one, and marking back to active for a few remaining items I found as I was picking through. Since everything other than the last item can be done by someone who is not bjaspan/yched/etc. and would be great to get some helping hands in here by people OTHER than them so that they can focus on more critical stuff. I've thus tagged this issue as "novice" to hopefully attract someone to work on these few remaining minor items.
Let's change this NOTE to a TODO, and put it in its own line so that we can find it later.
Missing @file. Though on quick glance, it looks like every other install file is also missing @file, so you can skip this. Tagged #320011: Add doxygen @file for all .install as "novice" to hopefully get some eyes on it.
TODO. :)
TODO needs to be moved to a separate line. Otherwise IDEs see "TODO: [blank]" as the item, rather than "TODO: Currently, this hook..."
Just about every function in field.api.php (and probably elsewhere) has an initial PHPDoc line longer than 80 characters. These should be split into a single-line description and then secondary description of unlimited length. For example:
Should become:
Now, something that we need "Fields in Core Sprint Attendees" knowledge on is that some of your TODOs have D7 after them and some of them don't. Is this because they were done by different people, or do all of the TODOs without D7 after them indicate "sometime well in the future"?
Comment #24
bjaspan commentedField API started life as content.module as associated files. Those files already had TODOs in them. We sort of followed the practice of writing "TODO D7" for new TODOs added during the sprint. I am not sure if we have stuck with that convention. Also, probably a lot of the TODOs from CCK are no longer relevant, or should really be fixed now instead of being left as TODOs forever. So, I don't think we need to make a point of tracking down the differences.
Comment #25
webchickOk, thanks! Then sometime before we close this ticket "for good," it would be wonderful to have a fields in core sprint attendee do a "TODO" pass and just make sure the list matches our actual remaining todos. Everything else can be done by our newer contributors. :)
Comment #26
yched commentedI've opened #372330: fields : do a pass of TODOs checking for the TODO pass.
This issue can now focus on the tasks in #23.
Thus, unassigning myself :-)
Comment #27
jeffschulerAddressed webchick's issues in #23 (except the doxygen .install @file issue that's offloaded to #320011, and the question about TODOs with and without "D7"...)
Comment #28
yched commentedThanks !
Comment #29
webchickYay! Thanks a lot. :) Committed to HEAD.
I think that's cleaned up enough to call this issue fixed for now. ;)