Linter Phpstorm



The PHP Linter plugin is pretty easy to get working in sublime. I tried using xdebug in sublime, but it was too clunky. PhpStorm is much better suited to that and provides much more out of the box for high level PHP development than Sublime Text. Having said that, I. Laravel Development using PhpStorm Maarten Balliauw January 19, 2015 Lots of PHP developers create their applications using Laravel, a free, open source PHP web application framework. SonarLint supports all JetBrains IDE, including IntelliJ, WebStorm, PhpStorm, PyCharm and RubyMine. It can analyze code written in Java, JavaScript, TypeScript, Python, Kotlin, Ruby, HTML & PHP. If your project is analyzed on SonarQube or on SonarCloud, SonarLint can connect to the server to retrieve the appropriate quality profiles.

Skip to end of metadataGo to start of metadata

Future versions

  • PHP
    • New Refactorings: Extract super class Move members - any
    • PHPDoc Standard (PSR-5) support
    • Autoloading Standard (PSR-4) support
    • Type inference support for SPL
    • Namespaces project view
    • phpdbg debugger
    • Related files navigation for MVC frameworks
    • More actions accessible from UML diagrams (refactorings, advanced code generation, etc)

PhpStorm 10 (To be released in Q4 2015)

  • Editing Experience
    • Full PHP 7 support
    • PHP REPL (read–eval–print loop, interactive console for PHP)
    • Make static refactoring
    • Type inference improvements
    • Structural Search & Replace scenarios for PHP - basically an ability to easily define custom inspection rules
    • @method annotation improvements

    • Support for @inheritdoc in quick method doc
  • Tools & Environment
    • Composer via Remote PHP Interpreters
    • PHPUnit running system rework
  • Platform Features
    • Code formatter improvements
    • New UI for running tests
    • OS X and Java Version (the installer doesn't require Java 6 anymore, the Switch IDE Boot JDK action)
    • True HiDPI Support for Windows and Linux
    • Indication for Running Configurations

    • Version Control: Editing Code in Diff Viewer

    • Find in Path: Preview Pane

    • Database Tools: New Data Sources and Drivers Dialog

We are also experimenting on:

Lint Phpstorm

  • Zend Framework 2 support
  • Joomla support
  • Data flow analysis
  • Array element type tracking
  • Inline rename
  • Getters/setters autocompletion
  • Duplicates detection for extract method
  • Stubs versioning (so that stubs correspond to selected language level)

  • Docker integration: image/container management and deployment tools
  • Plugin & new features discoverability
Linter

Please note that this public list is both neither complete nor definitive... Stay tuned to feature highlights in upcomingEAP builds!

PhpStorm 9 (Released in July 2015)

Linter Phpstorm

Phpstorm
  • Editing Experience
    • Advanced PHP type inference - better problem detection & code completion
    • Partial PHP 7 support
    • Live debugging data overlay directly in editor
    • Postfix code completion for PHP
    • Remote Edit
    • Inline mode for rename refactoring
    • Introduce parameter refactoring
    • Various formatting and PHPDoc-related features
  • Tools & Environment
    • Easy use of “remote” tools (SSH or VM-hosted) - e.g. PHP Code Sniffer, PHP Mess Detector
    • Even easier PHP debugging setup and problem detection
  • Platform Features
    • Easy Inspection scopes setup
    • HiDPI support for Windows/Linux
    • A brand-new distraction-free mode, see View | Enter Distraction Free Mode
    • New version control log viewer, time-color-coding for Annotate view
    • Adding multiple selections with the mouse
    • A new option to Copy as rich text by default
  • Better automated bug reporting - to reduce Support roundtrips
Linter

PhpStorm 8 (Released in Q3 2014)

  • PHP
    • Blade template engine support
    • Remote PHP interpreters
    • Behat
    • PHP 5.6 language features support
    • WordPress support: Hooks support Specific navigation WP-CLI command-line tool Code style
    • Drupal 8 support
    • Source & Test directories for PHP
    • PHPUnit on Server improvements
    • Type inference enhancements
    • Language injections into PHP literals to be re-worked
  • Misc / Platform
    • Multiple selection (Multi Cursor)
    • Opening a single file without creating an entire project

PhpStorm 7 (Released in Oct 2013)

  • PHP
    • PHP 5.5 support
    • New Refactorings: Extract interface Move static members
    • SSH terminal
    • Remote tools
    • Twig Template Engine improvements
    • Type inference and PHPDoc improvements
    • Vagrant Integration
    • Extended syntax colouring for various constructs
    • Injected language features enhancements
    • Advanced PHPDOC formatting and editing
    • More PHP openapi features
    • PHPUnit on Server improvements
    • Google App Engine for PHP support
    • INI plugin update
    • Debugger Improvements
      • Smart Step Into
      • Remote environment debug configuration validation
      • Debugger engine automatic detection and validation
    • Framework-specific features
      • Drupal Plugin
      • Zend Framework 2 command line tool support (ZFTool)
      • Support for tools based on Symfony Console (Laravel, Doctrine)

PhpStorm 6 (Released in Q2 2013)

Linter phpstorm
  • PHP
    • New Refactorings: Change signature Push/Pull members
    • Auto 'use' insertion on class name completion
    • PSR0 support in refactoring
    • MVC Framework (Symfony, Yii) components view generators integration
    • Composer support
    • Advanced PHPDoc metadata support: factories
    • PHP openapi
    • Code (re)Arrangement
  • Misc
    • easier compilation for LESS, SASS, TypeScript, CoffeeScript and other - via File Watchers plugin
  • JavaScript
    • Google Linter integration
    • Debugging via source maps: TypeScript, Dart, CoffeeScript
    • TypeScript support

PhpStorm & WebStorm 5 (Released in Sep 2012)

  • PHP (PhpStorm only!)
    • Advanced type inference based on complete control flow analysis for local variables fields Changed heuristic-based (sloppy) type inference engine to correct data flow analysis based one, dramatically improving variable type detection at any given code point and tremendously reducing number of false positives on code inspection.
    • MVC Framework (Symfony, Yii) components view
    • PHAR support
    • Typo3 framework - TypoScript support
    • Predefined code style (formatter) settings for PSR1/PSR2 and Symfony2
    • New code inspections and runtime-error prevention checks
  • JavaScript
    • Project-level JS libraries
    • JSTestDriver tests debug
    • Google Closure Compiler JSDoc annotations support
    • Google Dart support
    • JADE support
  • CSS/SASS/LESS
    • improved completion, navigation, code formatting and advanced constructs support
  • Database/SQL ** live schema refactoring (rename table/column, drop table/column, new table/column + DDL export)
    • query result export as CSV, TSV, HTML, SQL INSERTs, SQL UPDATEs to file/clipboard
    • New Definition editor: stored procedure editing, Oracle packages + QuickDoc support
    • Console: added result export, sorting, multiline editing
    • improved SQL completion, schema loading performance, DDL generation (vendor-specific types, constraints & index handling)
  • Other
    • Live HTML/CSS/JS editing preview

PhpStorm & WebStorm 4 (Released in April 2012)

  • PHP (PhpStorm only!)
    • PhpDoc inheritance
    • More code inpection
    • PHP 5.4
    • PhpUnit code coverage
    • Code Sniffer integration
    • Drupal coding style support
  • JavaScript
    • EcmaScript 6 experimental features
    • Traceur compiler (EcmaScript 6 -> JavaScript) preview support
    • Unit tests code coverage
    • Node.js core sources support
    • Project generators from HTML5 Boilerplate, Twitter Bootstrap, Node.js Express App
  • Other
    • Custom code folding regions (VS and NB styles)
    • Improved Project and and Debugger toolwindows and other parts of UI
    • Behat (BDD) syntax
    • Project creation from Boilerplates
    • SVN 1.7 support
    • Import config wizard
    • DB2 & Sybase SQL dialect support
    • Formatting support for SCCS / LESS
    • Performance improvements for large CSS files
Linter Phpstorm

PhpStorm & WebStorm 3.0 (Released in Nov 2011)

  • PHP (PhpStorm only!)
    • Advanced PHP formatter
      • PEAR, Zend and other styles
      • Alignment of key=>value pairs, on '=' sign in a group of assignments
      • PHPDoc Formatting
    • UML support (with roundtrip code/diagram editing)
    • Profiling support Xdebug Zend Debugger
    • Advanced PHPDoc metadata support: chain calls
    • Improved Twig support
    • PHPUnit 3.6 + standard test runner, improved test navigation and generation
    • Duplicate code detection support
    • Set of basic Live Templates
  • FTP
    • Fine grained setup for excluding stuff from sync
    • recursive comparison feature
  • XSLT debugger
  • HTML
    • Zen-coding 0.7 support
    • Validation of HTTP links
    • Updated HTML5 schema
  • CSS
    • SASS & LESS completion for tags, property names and property values
  • node.js support (including debugging)
  • JavaScript
    • JsTestDriver support (support for QUnit and Jasmine testing frameworks)
    • CoffeeScript suport
    • Duplicate code detection support
  • Other
    • More streamlined UI: more compact layout in all dialogs , better blending into modern OS'es style , OS X Lion fullscreen mode.
    • Color schemes
    • Microsoft TFS support

PhpStorm & WebStorm 2.1 (Released in May 2011)

  • PHP (PhpStorm only!)
    • Initial Twig support
    • Refactoring: extract method/function.
    • Phing support
  • .htaccess support
  • HTML
    • 'Related files' popup for HTML/XHTML
    • Nested tags highlighting
  • HAML
  • JavaScript
    • Google Chrome JavaScript debugging
  • XSLT 2 editor support

PhpStorm & WebStorm 2.0 (Released in Feb 2011)

  • PHP (PhpStorm only!)
    • Zend framework support (zend_tool )
    • Symfony framework support (symfony commandline tool)
    • Zend debugger support
    • Refactoring: Smart introduce field/constant, safe delete, inline variable.
    • New code inspections
      • Control flow / Unreachable statement
      • Control flow / Wrong catch clauses order
      • Probable bug / Wrong string concatenation operator
      • Type compatibility / Invalid foreach() argument type
      • Control flow / Unused parameter
    • full fledged PHP namespace support
    • Structure view sorting and filtering
  • SQL (PhpStorm only!)
    • New full-fledged code editor for SQL console
    • Editable query results grid
    • BLOB support
  • ECMAScript 5 support
  • CSS
    • LESS editor support
    • SASS 3 support
  • Language Injection
    • Improved automatic SQL & HTML injection into PHP string literals
    • New editor of injected fragments
  • Version control support
    • New DVCS UI (Git, etc) with easy multiple repository branch switching, built-in log views and integrated cherrypicking, etc.
    • Softwrap in code editor, spellchecking at completion in all controls (i.e. commit dialog)
    • Mercurial support
  • Other
    • Streamlined UI: more compact layout, better indication, better blending into OS style
    • RelaxNG support

PhpStorm & WebStorm 1.0 (Released in June 2010)

  • HTML/XHTML/XML/XSLT/XPATH, including HTML5
  • JavaScript (laguage standard 1.6 with partial 1.7)
    • Editing (syntax, code completion, code inspections, etc.)
    • Refactoring
    • Go to symbol, declaration
    • Structure view
    • Advanced support for frameworks (JSON, DoJo, JSDoc, jQuery, Prototype) (check FAQ on other framework support)
  • CSS
  • PHP (PhpStorm only!)
    • full 5.3 syntax support
    • scope-aware code completion
    • PHP refactorings: rename, introduce variable.
    • advanced code inspections (visibility, type checking, etc)
    • Language injection - SQL in PHP
    • support for any type of outer language - HTML, CSS, XML, SQL, etc..
    • Frameworks & libs: Smarty (check FAQ on other framework support)
  • SQL (PhpStorm only!)
    • syntax and error highlighting
    • keywords, table and column names completion
    • SQL Console
    • generic SQL (SQL-92)
    • MySQL
    • MSSQL
    • ORACLE
    • PostgreSQL
    • SQLite
  • Spell Checker
  • FTP/SFTP sync
  • XSLT

Legend

- Feature Implemented
- Under Investigation
- In Progress

Since PhpStorm 2020.2, Closure Linter support in the IDE has been deprecated, see the Closure Linter official website for details.

However, Closure Linter support is still available through the Closure Linter plugin, which can be installed on the Settings/Preferences | Plugins page as described in Installing plugins from JetBrains repository.

When Closure Linter support is enabled, PhpStorm highlights errors that Closure Linter detects, provides descriptions for them, and suggests quick-fixes where possible.

Descriptions of the errors detected in the current file and quick-fixes for them are available from the editor and from the Current File tab of the Problems tool window.

Errors in all previously opened files and quick-fixes for them are shown in the Project Errors tab of the Problems tool window. To open the tool window, click the Inspection widget in the upper-right corner of the editor:

See View problems and apply quick-fixes in the editor and Problems tool window for details.

Before you start

  1. Download and install Python as described on the Python official website.

  2. Install and enable the Closure Linter plugin on the Settings/Preferences | Plugins page as described in Installing plugins from JetBrains repository.

  3. Download and install Closure Linter as described on the Closure official website.

Enable Closure Linter and configure its behavior in PhpStorm

  1. Open the Settings/Preferences dialog Ctrl+Alt+S, go to Languages and Frameworks | JavaScript | Code Quality Tools | Closure Linter, select the Enable checkbox. After that all the controls on the page become available.

  2. Specify the path to the Closure Linter executable file:

    • <Python_home>Scriptsgjslint.exe for Windows

    • /usr/local/bin/gjslint for Linux and macOS

  3. Specify the path to the previously created configuration file with Closure Linter flags.