Configure profiles
Inspection profiles keep information on the enabled inspections, the scope of files that these inspections analyze, and inspection severity settings. In PhpStorm, there are two types of profiles.
Profiles Stored in IDE are saved to the inspection folder in the PhpStorm configuration directory and are available for any project. You can copy the IDE profile to the current project using the Copy to Project option.
Profiles Stored in Project are saved to the inspectionProfiles folder in the .idea directory and are available within one project. You can copy the project profile to the IDE level using the Copy to IDE option.
PhpStorm comes with two default profiles of each type (Default and Project Default) that you can customize, or create new ones. You can also share, import, and export inspection profiles.
Create a new profile
To create a new profile, copy one of the default profiles and change its settings.
Press Ctrl+Alt+S to open the IDE settings and then select
.You can also press Ctrl+Alt+Shift+H and select Configure Inspections.
Select the profile that you want to copy, click , and select Duplicate.
Change the profile name, and press Enter.
Restore the default profile configuration
You can restore the default inspection settings: inspections enabled by default and their severity levels.
Press Ctrl+Alt+S to open the IDE settings and then select
.You can also press Ctrl+Alt+Shift+H and select Configure Inspections.
Select the necessary profile from the list, click and select Restore Defaults.
Synchronize profiles between computers
Profiles stored in project are kept together with other project configuration files and are shared through VCS. That is why, after you configure a new project profile and share it with other members of your team, this profile will be automatically propagated to their projects after they check out the project from a VCS.
If you want to share a profile stored in the IDE, you can use the Settings Repository plugin that is bundled with PhpStorm.
In this case, you have to configure this profile as the default inspection profile for all newly created projects (make it global). The plugin will promote this global configuration to all computers that are connected to the settings repository.
Share a profile stored in IDE
Make sure that the settings repository is configured.
In the main menu, go to
, and click .In the Profile list, select the profile that you want to share. Apply the changes and close the dialog.
In the main menu, go to Overwrite Remote to send the new configuration to the repository.
and clickOn another computer connected to the repository, go to Overwrite Local to download and apply the configuration.
in the main menu and select
Export and import a profile
To share a profile, you can also export it and then import it on another computer.
Press Ctrl+Alt+S to open the IDE settings and then select
.Click and select Export.
To import a profile, click and select Import Profile.
Specify the path to the profile and click Open.