- Get rid of Symfony Console application/command/input components
These were causing me serious problems — not least of all was the fact that
the Console argument parser chokes on command lines lke `twigc -j - foo.twig`.
I am not happy with the way i've structured this, but i just needed to get it
*done*, so here we are. If someone has any advice on to how to make this nicer
(maybe break it up into different classes, &c.), i would be appreciative
- Add GetOpt.php for argument parsing and usage-help printing
The usage help is really ugly, tbh. But whatever
- Support multiple input data sources at once
- Add `-E` short option for `--env`
- Display an error when `-E` is used without the appropriate `variables_order`
configuration in place
- Add shell (`sh`) auto-escape method
- Simplify/eliminate a lot of code (handling of version numbers, validation, &c.)
- Change a lot of white space and formatting stuff (RIP `blame`)
This uses the $_ENV superglobal, which is an empty array unless the
variables_order ini directive contains "E"; see
http://php.net/manual/en/ini.core.php#ini.variables-order.
Environment variables have lower precedence than input data passed via
other means, e.g.
$ echo '{{USER}}' | twigc --env
peets
$ echo '{{USER}}' | twigc --env -p USER=foo
foo