[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern

WordPress Trac noreply at wordpress.org
Thu Sep 1 21:17:33 UTC 2016


#37699: Death to Globals Episode #1: A Registry, A Pattern
----------------------------+------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  4.7
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------

Comment (by JamesDiGioia):

 Replying to [comment:67 MikeSchinkel]:
 > Replying to [comment:63 schlessera]:
 > > This is not true, and as every major framework uses containers,
 PHPStorm has several ways of providing type inspection for them. For a
 very simple way of adding this, see the article here:
 https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata
 >
 > Yeah, I was afraid that would be offered up as _"the solution."_  As you
 can see, [https://youtrack.jetbrains.com/issue/WI-27830 I have been aware
 of this capability for a while], and in that link you can see that I think
 the way PhpStorm implements it is over-the-top complicated and it is very
 unlikely that most plugin or theme developers will master it.
 >
 > And yes `WP::get()` is in core but if included in core it would define
 the pattern that many developers would mimic in their own plugins and
 themes and thus create proliferation of code that PhpStorm would flag with
 errors.

 FWIW, given that PHPStorm has built-in support for WordPress, there's a
 decent chance they would support the WordPress container OOTB if this
 landed. I'm not really sure the lack of IDE support should be a blocker
 here.

 Additionally, if you're concerned about hitting as broad a group of
 developers as possible, IDE concerns aren't that high a priority, given
 that groups 1-3 probably aren't using PHPStorm anyway.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:70>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list