Difference between revisions of "OpenEMR PHPStorm Setup"

From OpenEMR Project Wiki
m
Line 9: Line 9:
OpenEMR is moving towards being fully 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)
OpenEMR is moving towards being fully 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)


# Open Settings '''File''' --> '''Settings'''  
# Open Settings '''File''' → '''Settings'''  
[[File:2017-07-20_18-44-44.png|400px]]
[[File:2017-07-20_18-44-44.png]]
# Drill down into '''Editor''' --> '''Inspections'''
# Drill down into '''Editor''' → '''Inspections'''
# From the Main Window drill down into '''PHP''' --> '''PHP Code Sniffing validation'''
# From the Main Window drill down into '''PHP''' → '''PHP Code Sniffing validation'''
# From the Detail Window on the right, click the '''<code>...</code>''' button next to &quot;Coding standard&quot;
# From the Detail Window on the right, click the '''<code>...</code>''' button next to &quot;Coding standard&quot;
[[File:Phpstorm64_2017-07-20_18-46-55.png||900px]]
[[File:Phpstorm64_2017-07-20_18-46-55.png||900px]]

Revision as of 00:01, 21 July 2017

  • 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 is moving towards being fully 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. 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