vlucas / phpdotenv

Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
BSD 3-Clause "New" or "Revised" License
13.15k stars 626 forks source link

Fatal error: Uncaught Error: Class "Dotenv\Dotenv" not found in #564

Closed geoidesic closed 9 months ago

geoidesic commented 9 months ago

Hi,

I tried the installation instructions via composer. It has installed v5.6.0 and this is on PHP 8.3.1.

GrahamCampbell commented 9 months ago

What does your code look like? Did you forget to require the composer autoloader?

geoidesic commented 9 months ago

Yes. It was that. I was trying to use it before the call to autoload. Tx.