Answer the question
In order to leave comments, you need to log in
How to run classes in PHPStorm with autoloader added?
I work in PHPStorm, I want to make it so that class files can be parsed through Run / Debug, but there is one problem: if there is a call to another class in the class file, PHP swears that such a class was not found - of course, the autoloader is not enabled .
Can I somehow specify the autoload file in the command line parameters? There is a --bootstrap parameter for PHPUnit, but what should I use to run scripts normally through PHP CLI?
Answer the question
In order to leave comments, you need to log in
Everything turned out to be simple. In the Run configuration, you must specify Interpreter options:
-d auto_prepend_file="path_to_autoloader"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question