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

Fix bootstrap locator #32

Merged
merged 3 commits into from Apr 26, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -54,6 +54,8 @@ Phpmig can do a little configuring for you to get started, go to the root of you
+f ./phpmig.php Create services in here
$

Note that you can move phpmig.php to config/phpmig.php, the commands will look first in the config directory than in the root.

It can generate migrations, but you have to tell it where. Phpmig gets you to supply it with a list of migrations, so it doesn't know where to put them. Migration files should be named versionnumber_name.php, where version number is made up of 0-9 and name is CamelCase or snake\_case. Each migration file should contain a class with the same name as the file in CamelCase.

$ phpmig generate AddRatingToLolCats ./migrations
Expand Down
3 changes: 2 additions & 1 deletion src/Phpmig/Console/Command/AbstractCommand.php
Expand Up @@ -78,9 +78,10 @@ protected function bootstrap(InputInterface $input, OutputInterface $output)

$locator = new FileLocator(array(
$cwd . DIRECTORY_SEPARATOR . 'config',
$cwd
));

$bootstrap = $locator->locate($bootstrap, $cwd, $first = true);
$bootstrap = $locator->locate($bootstrap);
$this->setBootstrap($bootstrap);

/**
Expand Down