Julio Montoya 321ce65f18 Updating vendors | 11 lat temu | |
---|---|---|
.. | ||
lib | 11 lat temu | |
tests | 11 lat temu | |
.travis.yml | 12 lat temu | |
LICENSE | 12 lat temu | |
README.markdown | 12 lat temu | |
build.properties.dev | 12 lat temu | |
build.xml | 12 lat temu | |
composer.json | 12 lat temu | |
package.php | 12 lat temu | |
phar-cli-stub.php | 12 lat temu | |
phpunit.xml.dist | 11 lat temu |
The latest official PHAR had path issues for me, so I made a couple of modifications and made packaging a bit easier, especially when creating a custom PHAR for your own apps.
Download doctrine-migrations.phar
with custom Input/Output CLI support
DiffCommand
for migrations.ArgvInput
in CLI instanceConsoleOutput
in CLI instanceIn the same way that Doctrine will attempt to load the return values from migrations-db.php
as your
connection parameters, you can have migrations-input.php
return:
$input = new \Symfony\Component\Console\Input\ArgvInput;
... make some changes ...
return $input;
or have migrations-output.php
return a customized ConsoleOutput
with support for HTML tags in
your SQL statements:
$output = new \Symfony\Component\Console\Output\ConsoleOutput;
$output->setStyle('p');
return $output;
This should give you the flexibility you need for customizing your input/output in the CLI.
Simply run php package.php
, which will create the file: build/doctrine-migrations.phar
for you.
Done! :) This is a bit simpler than getting Phing/Ant going and running phing build-migrations
and
hoping the rest of the build dependencies work.
If you receive an error that looks like:
creating archive "build/doctrine-migrations.phar" disabled by INI setting
This can be fixed by setting the following in your php.ini:
; http://php.net/phar.readonly
phar.readonly = Off
To install dependencies issue the following commands:
git submodule init
git submodule update
All available documentation can be found here.