Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for testing "outer" config #2234

Closed
zeleznypa opened this issue Nov 1, 2023 · 1 comment · Fixed by #2235
Closed

Support for testing "outer" config #2234

zeleznypa opened this issue Nov 1, 2023 · 1 comment · Fixed by #2235

Comments

@zeleznypa
Copy link

I'm using a Phinx as a part of the Nette framework.
There is a Dependency Ijection contaier, where I can setup the Phinx configuration directly without the 'phinx.yml' file, using the setConfig method.

Unfortunately the Test command force to use the file.

$this->loadConfig($input, $output);

It will be nice to have a possibility to check the connection with this configuration.
Everything that I need is to encapsulate this line like this:

if($this->hasConfig() === false) {
    $this->loadConfig($input, $output);
}
@MasterOdin
Copy link
Member

MasterOdin commented Nov 1, 2023

Looking quickly, all the other commands make a call to $this->bootstrap($input, $output);, which then does:

if (!$this->hasConfig()) {
$this->loadConfig($input, $output);
}

So yeah, no reason to have a similar if check within the test command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants