robmorgan/phinx — pull request #67 by soulii (2013-03-25 20:10:44+00:00)
Title: Bootstrap and custom parsers

Hello,

I needed a custom parser since my application configuration file keeps environment information in ini files and in different keys than Phinx expects them in. Since I don't want to duplicate the information in a file Phinx can read, I modified the Phinx code.

I put the parsers logic in it's own namespace and class to support custom parsers and added an optional bootstrap argument so it can autoload my custom parser from the cli.

The --parser argument on the cli doesn't need the extension (php or yml) anymore but accepts the custom parser class, e.g. --parser=Phinx\Config\Parser\IniParser. The correct parser is loaded based on the extension of the configuration file. Yaml (.yml) and PHP are supported by default and don't need the --parser argument.