In order for the composer settings to work, the following 2 simple conditions must be met.
- It is necessary that the PHP interpreter be configured:
Languages & Frameworks/PHP Interpreter (select the PHP php.exe executable file) just above the PHP language level must match the version of the selected interpreter. - Actually, set up the composer itself. For this:
- it must be available in the project: either installed globally, or the composer.phar file must be in the project folder. For global configuration, make sure that the
composer command in the console displays a list of commands. - specify the path to the composer.phar file used, either globally accessible or locally installed in the project.
Possible problems:
- Composer file is not available for your project. Make sure that the
composer for global configuration or php composer.phar for local is available in the folder of your project. - In the settings of PhpStorm, it is NOT the composer.phar file that is available in your project.
- PhpStorm stores the local settings of the project in the
.idea folder. Make sure that you do not overwrite, delete or change this folder for your project upon reload. Also make sure that the project path is correct and has not been changed upon reboot.
In the end I want to say that you are very limiting the answers to your question, initially narrowing them down to the part that did not bring you a positive result. It would be better if you asked how to implement exactly what you need. For example, how to install a new package in a project using a composite? Perhaps, and most likely, there are more simple ways to solve your problem, which you simply do not know.