OpenEMR PHPStorm Setup

From OpenEMR Project Wiki
  • This document is based on PHPStorm 2017.2

OpenEMR currently has several free licenses available to developers interested in using PHPStorm as their primary IDE. Note that OpenEMR owns the licenses and our agreement with JetBrains (developer of PHPStorm) stipulates that our PHPStorm licenses may only be used for development of OpenEMR, no commercial property.

If you are interested in obtaining a license to use PHPStorm please email Robert Down (robertdown@live.com) or Brady Miller (brady.g.miller@gmail.com)

Code Sniffing

OpenEMR Coding Standards require new code to be PSR-2/4 compliant. PHPStorm can analyze your code in real time, giving feedback to improve your quality of code. These steps should be the same for all 3 major platforms (Windows, macOS, Linux)

  1. [1]
  2. Open Settings FileSettings

2017-07-20 18-44-44.png

  1. Drill down into EditorInspections
  2. From the Main Window drill down into PHPPHP Code Sniffing validation
  3. From the Detail Window on the right, click the ... button next to "Coding standard"

Phpstorm64 2017-07-20 18-46-55.png

  1. Enter the path <Your openemr root directory>/ci/phpcs_strict.xml

Phpstorm64 2017-07-20 18-47-21.png

  1. Click Ok to return to the main settings window
  2. You can modify the settings to show errors as you like
  3. Click Ok