c9s/phpbrew — pull request #156 by marcioAlmada (2013-12-29 07:45:43+00:00)
Title: This fixes many problems related to extension management.

This pull request solves several issues related to phpbrew extension management:

- [ ] Enabling a non installed extension `foobar` results in buggy behavior: creation of a wrong `foobar.ini` file, loading an inexistent `foobar.so`.
- [ ] Disabling a non installed nor non installed function returns positive message
- [ ] Installing functions which have a source file with a different name from extension name itself caused errors. Known cases:
- jsonc extension should load json.so, not jsonc.so
- pecl_http extension should load http.so, not pecl_http.so - already reported on #154
- markdown extension should load discount.so, not markdown.so - already reported on #154
- + a bunch of other extensions, pecl is a quite unruly garden of extensions
- [ ] Disabling extension deletes `.ini` file, loosing any additional user configuration. My proposition is to just move the .ini file. Ex:
- disabling foo extension would to lead to a rename of `foo.ini` to `foo.disabled`

What's new?

- [ ] Introduces extension conflict resolution
- [ ] Introduces a non destructive way to manage extension state (disabled/enabled)
- [ ] Introduces better extension.so handling, solves #154

TODO:

- automated tests
- could not overwrite `phpbrew ext disable ` command, need some help here :smile: