DDC-95: Doctrine\ORM\Tools\Cli->_initializeEntityManager() looks for config option in wrong args array #119

Closed
opened 2026-01-22 12:27:49 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 2, 2009).

Jira issue originally created by user kuja:

I am currently trying to create a wrapper to the Doctrine\ORM\Tools\Cli class for my own project. In my wrapper I wanted to automatically specify a --config=PATH option (realizing I could do so as mentioned in the documentation: http://www.doctrine-project.org/documentation/manual/2_0/en/tools#the-doctrine-cli:configuration).

However, at any attempt I made Cli would constantly use the default path ./cli-config.php, and well... after a bit of investigating I noticed in Cli->run(), there is a call to Cli->*initializeEntityManager() which also happens to be the method that determines the config path. However, after some snooping around I noticed that $args['config'](the array *initializeEntityManager%28%29 is trying to get the config path from) is not actually the right array. The config key seems to be in the $taskArgs array.

To conclude, either Cli->_initializeEntityManager() is using the wrong argument or the arguments are not being processed correctly.

My overall experience with Doctrine 2 has been great, keep up the awesome work ;)

-Matt

Originally created by @doctrinebot on GitHub (Nov 2, 2009). Jira issue originally created by user kuja: I am currently trying to create a wrapper to the Doctrine\ORM\Tools\Cli class for my own project. In my wrapper I wanted to automatically specify a --config=PATH option (realizing I could do so as mentioned in the documentation: http://www.doctrine-project.org/documentation/manual/2_0/en/tools#the-doctrine-cli:configuration). However, at any attempt I made Cli would constantly use the default path ./cli-config.php, and well... after a bit of investigating I noticed in Cli->run(), there is a call to Cli->*initializeEntityManager() which also happens to be the method that determines the config path. However, after some snooping around I noticed that $args['config'](the array *initializeEntityManager%28%29 is trying to get the config path from) is not actually the right array. The config key seems to be in the $taskArgs array. To conclude, either Cli->_initializeEntityManager() is using the wrong argument or the arguments are not being processed correctly. My overall experience with Doctrine 2 has been great, keep up the awesome work ;) -Matt
admin added the Bug label 2026-01-22 12:27:49 +01:00
admin closed this issue 2026-01-22 12:27:49 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 3, 2009):

Comment created by kuja:

This was fixed in svn by jwage.

Thanks!

@doctrinebot commented on GitHub (Nov 3, 2009): Comment created by kuja: This was fixed in svn by jwage. Thanks!
Author
Owner

@doctrinebot commented on GitHub (Nov 3, 2009):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Nov 3, 2009): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#119