O
O
Outsider V.2016-01-26 18:42:00
PHP
Outsider V., 2016-01-26 18:42:00

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

1 answer(s)
O
Outsider V., 2016-01-26
@Audiophile

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 question

Ask a Question

731 491 924 answers to any question