"docker compose up -e" not working

This is in the docs here: Ways to set environment variables with Compose | Docker Docs

docker compose --env-file .env.dev up -e DATABASE_URL=mysql://new_user:new_password@new_db:3306/new_database

However I can’t get this command to work. Works with run, but not up. Am I crazy, or is this not actually a supported thing and the docs are wrong?