Closed ABGEO closed 4 years ago
@l0gicgate in my practice one of these files always existed. I can add additional check, if you consider it necessary.
I mean, files always existed, if composer install
was executed :smile:
I just want to get this right. Are there any instances where autoload.php
is not present but our bin
file could exist? That else
block makes the assumption that it always would @ABGEO07
Are there any instances where
autoload.php
is not present but ourbin
file could exist?
I can’t imagine a situation where this can happen, except when the vendor directory has been deleted.
That
else
block makes the assumption that it always would
As far as I remember, there are only those two paths where autoload.php
can be placed.
Alright we can always add onto this condition later if an issue arises.
If we want to require Slim Console globally,
require __DIR__ . '/../vendor/autoload.php';
won't work, because in this case the Composer autoloader has a different path.