Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#5642 closed enhancement (wontfix)

Lots of problems in BuddyPress when opening it in PHPStorm

Reported by: slaffik's profile slaFFik Owned by:
Milestone: Priority: low
Severity: minor Version:
Component: Core Keywords:
Cc:

Description

It's yellow, like the whole WordPress:

PHPDoc issues, Field accessed via magic method, methods not found (fixed using /** @var $wpdb WPDB */) etc.

Is it possible to review all that and perhaps clean the code a bit, so it will become nicer in PHPStorm?

Or I can do that, creating patches using per file or per component basis.

Change History (6)

#1 @boonebgorges
11 years ago

Will you write a small patch that fixes just a couple of functions, and then post it here for us to look at? I'm not clear on what you're proposing, and I'd like to see an example.

Also, if you have links to any "official" documentation about why PHPStorm is throwing the errors (such as PHP Documentation standards), that'd be helpful. I don't want to introduce a bunch of changes just to address the idiosyncracies of a single IDE. On the other hand, if PHPStorm is actually implementing some independent best practices, it'd make the case more convincing. Thanks.

#2 @slaFFik
11 years ago

Last edited 11 years ago by slaFFik (previous) (diff)

#3 @boonebgorges
11 years ago

I'm not totally sure what's being pointed out here. Reference to a global that's not being specified the docblock? An overloaded activity property on the $bp global? If you could write a sample patch, it would make things clearer.

PSR-0 is about naming standards for autoloading, so I don't think it's related: http://www.php-fig.org/psr/psr-0/

I don't see anything obvious in PSR-1 that would throw the exact flags you are pointing to here: http://www.php-fig.org/psr/psr-1/

So, any more clarification you could provide would be great.

This ticket was mentioned in IRC in #buddypress-dev by tw2113. View the logs.


11 years ago

#5 @DJPaul
11 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

BuddyPress' PHP coding standards are pretty much the same as WordPress. We don't need to make changes to keep a PSR-* linter happy, unless of course some of those rules happen to match some of the rules in the WordPress standards. We also know there's a lot more phpdoc/jsdoc we can add to the codebase, and as you know, that's something we continue to try to iterate on and make better in each release. :)

I am going to close this ticket because I'm pretty sure we have other open tickets about inline documentation, and that I'm pretty sure we don't want to meet all of PHPStorm's expectations.

If you're still interested in writing patches to fix some of the reported issues, we'd love that. It'd be super. :) Pick areas that are being reported that are inline with WordPress' coding standards, and send in patches or a pull request on Github (etc), and we'll get those in.

#6 @DJPaul
8 years ago

  • Type changed from task to enhancement
Note: See TracTickets for help on using tickets.