[wp-trac] [WordPress Trac] #37699: Death to Globals Episode #1: A Registry, A Pattern
WordPress Trac
noreply at wordpress.org
Thu Sep 1 18:57:04 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 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37699#comment:67>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list