Opened 8 years ago
Closed 8 years ago
#7239 closed enhancement (fixed)
Wrong naming on Friend component
Reported by: | espellcaste | Owned by: | tw2113 |
---|---|---|---|
Milestone: | 2.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Friends | Keywords: | |
Cc: |
Description
I noticed this error when studying BuddyPress code.
https://github.com/buddypress/BuddyPress/blob/master/src/bp-friends/bp-friends-loader.php#L20
This is a good opportunity for me to finally learn to send patches. So a patch is coming along. =)
Attachments (6)
Change History (23)
#5
@
8 years ago
I don't know what it is, but the patches I create keeps coming with duplicate files, for example, there is two files with the same class in 7239-3.patch.
#6
@
8 years ago
- Keywords reporter-feedback added
@espellcaste We're happy to help you go over patch creation. There's minimal docs over on the WordPress site, which has the basics (it'll be different if you're using an app): https://make.wordpress.org/core/handbook/tutorials/trac/submitting-a-patch/
If your timezone overlaps, reach out to someone in our Slack room, or I can email you and try to help.
(I suspect the file appears twice because you've deleted the file and re-added it, rather than use svn mv
, but we can figure that out).
My question for you is: what's the purpose of this ticket? It only says "Wrong naming on Friend component", not what is wrongly named. In the patch, I see some PHPDoc changes, as well as renaming a file. Can you add some more information please? Thanks!
This ticket was mentioned in Slack in #buddypress by espellcaste. View the logs.
8 years ago
#8
@
8 years ago
I think now I got it right! Patch 7239-4 is the correct one. Please, disregard the others! Those were tests!
@DJPaul @hnla helped me on Slack on the problem.
Regarding the purpose of this ticket:
1st - For me to finally learn to send patches. I'm not a big fan of svn, neither have I a lot of knowledge of it. But every now and then I postpone contributing because I need to set a time to learn it.
2nd - I guess the ticket name was poorly formed, but basically I want to correct this error:
https://github.com/buddypress/BuddyPress/blob/master/src/bp-friends/bp-friends-loader.php#L20
The PHPDoc name "bp-forums" is in the wrong place, as it is in the friends component.
Also there are some errors that you can see in the patch.
Also, I'm standardizing the beginning of the PHPDoc to: "Set up the bp-nameofcomponent component."
And lastly, I'm adding support for autoload to bp_forums_component loader.
#9
@
8 years ago
Thanks for the patch, @espellcaste!
For future reference, you never have to touch svn to submit a patch here. You can use Git. Here's a very short description of the process:
- Create a clone of the official Git repo:
git clone git://buddypress.git.wordpress.org
. Themaster
branch is equivalent to SVNtrunk
- Do your fixes
- To generate a patch, use
git diff --no-prefix > /path/to/file.patch
See also https://make.wordpress.org/core/handbook/contribute/git/.
#13
@
8 years ago
I like all parts of the the patch EXCEPT the autoloading portion. I think getting that component piece loaded that way warrants its own ticket, and this ticket can be focused on just the docs updates, which appears to be the primary original focus anyway.
@espellcaste can you provide a diff with just the phpdoc portions and I'll get that committed with props for you. If @DJPaul and/or @boonebgorges are fine with the autoloading part accompanying the patch, then i'll just go with revision 4
#14
@
8 years ago
@espellcaste Thanks for the patch!
I agree with @tw2113 that the bp-forums autoload stuff should not be included here. For one thing, it's broken :) - the autoloader in bp-loader.php
doesn't expect bp-forums/classes
to be autoloaded. But also, it's a separate issue, and should be handled separately from the documentation bits.
@tw2113 Please go ahead with the rest of this patch as you see fit. Thanks to both of you!
Go for it! :)