getkirby / cli

Kirby Command Line Interface
MIT License
52 stars 5 forks source link

Public folder setup vendor folder resolution #28

Closed iskrisis closed 1 year ago

iskrisis commented 1 year ago

When using public folder setup /project/public/index.php and using cil from /project i get error

Warning: require(../vendor/autoload.php): Failed to open stream: No such file or directory

I think it's because require "../vendor/autoload.php"; in index.php gets resolved to /project/../vendor/autoload.php when i change my index.php to absolute path it works.

interesting that nobody didn't run into this - maybe there is different way how to require /vendor/autoload.php in index.php?

Tested on 2 machines. Don't think its related to my setup.

bnomei commented 1 year ago

try require __DIR__ . "/../vendor/autoload.php";

iskrisis commented 1 year ago

I am not very smart.