[wp-trac] [WordPress Trac] #41873: Code Editor: Add PHP linter

WordPress Trac noreply at wordpress.org
Wed Sep 13 18:15:20 UTC 2017


#41873: Code Editor: Add PHP linter
-------------------------+-------------------------
 Reporter:  westonruter  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  4.9
Component:  General      |    Version:
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-------------------------
 There is no PHP linter yet when editing PHP in the code editor (powered by
 CodeMirror, from [41376] for #12423). This would be a good enhancement,
 PHP syntax errors are the most critical thing to catch prior to saving in
 order to prevent whitescreening a site. Currently there are linters only
 for HTML, JS, CSS, and JSON.

 See https://github.com/WordPress/better-code-
 editing/issues/48#issuecomment-327963921:

 > Props to @rheinardkorf for finding http://glayzzle.com/php-parser/#demo
 !!
 >
 > On GitHub: https://github.com/glayzzle/php-parser
 >
 > I had previously stumbled across the https://github.com/glayzzle/php-
 linter project but it is empty. I didn't see the other project.
 >
 > This holds great promise. The only icing on the cake here would be if
 the parser could be told which PHP version to use, but we could get a list
 of language features that are added after PHP 5.2 and mark them as errors
 when the version of PHP on the server is not new enough. Amazing.

 See more background on the original GitHub issue:
 https://github.com/WordPress/better-code-editing/issues/48

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41873>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list