Unrestricted cli-config.php file location #5718

Closed
opened 2026-01-22 15:15:23 +01:00 by admin · 2 comments
Owner

Originally created by @kilab on GitHub (Sep 28, 2017).

I can't find any informations about inform CLI where should search cli-config.php file.

In this moment I've got two options to place this file: / project directory or /config directory in root. But what if I want store config file in eg. /app/config/cli-config.php?

Is this possible?

Originally created by @kilab on GitHub (Sep 28, 2017). I can't find any informations about inform CLI where should search cli-config.php file. In this moment I've got two options to place this file: `/` project directory or `/config` directory in root. But what if I want store config file in eg. `/app/config/cli-config.php`? Is this possible?
admin closed this issue 2026-01-22 15:15:25 +01:00
Author
Owner

@Ocramius commented on GitHub (Sep 28, 2017):

@kilab it will look in your cwd (current working directory).

See: 53245e8a73/bin/doctrine.php (L35-L44)

The docs are indeed a bit confusing about it: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html#configuration

Could you maybe patch them, once you get it working for your local environment?

@Ocramius commented on GitHub (Sep 28, 2017): @kilab it will look in your `cwd` (current working directory). See: https://github.com/doctrine/doctrine2/blob/53245e8a73cb16d5e9ba35ffa5bbb15cc417bb9f/bin/doctrine.php#L35-L44 The docs are indeed a bit confusing about it: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/tools.html#configuration Could you maybe patch them, once you get it working for your local environment?
Author
Owner

@kilab commented on GitHub (Sep 28, 2017):

@Ocramius thanks for the hint!

If I'll run CLI command in directory where cli-config is storing, everything is fine.

In my case command is:
/app: ../vendor/bin/doctrine orm:schema-tool:update --force --dump-sql

@kilab commented on GitHub (Sep 28, 2017): @Ocramius thanks for the hint! If I'll run CLI command in directory where cli-config is storing, everything is fine. In my case command is: `/app: ../vendor/bin/doctrine orm:schema-tool:update --force --dump-sql`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5718