There is installed through composer yii2 .
There is a folder with a self-written library in the root of the site.

structure:

 var\www\ | -------yii2 | -------mylib 

In mylib is the only lib.php file.

What specific sequence do I need to do so that in the контроллере I can call methods from lib.php?

    1 answer 1

    In composer.json

      "autoload": { "files": [ "mylib/lib.php" ] }, 

    then in the console

     composer dump-autoload