chrisboulton/php-resque — pull request #186 by iskandar (2014-05-05 15:18:24+00:00)
Title: Dsn normalization

These changes provide more robust support for DSN-style strings.

Before these changes, you could not use a simple DSN like `redis://host:port`. With them, you can use strings like these for `REDIS_BACKEND`:

* `host`
* `host:port`
* `redis://host:port/`
* `redis://host:port/db`
* `redis://user:pass@host:port/`
* `tcp://user:pass@host:port/`
* and similar variations

### Notes:

- The 'user' value in the DSN is required even thought it is *not used*.
- We are really just relying on PHP-native `parse_url` to do the real work.
- I haven't addressed the idea of using DSN strings for `Credis_Cluster` instanciation.
- The `$database` param in the constructor will be overridden by a database value supplied in the DSN.
- This change should be 100% backward-compatible.
- Tests included.
- I fixed some whitespace.

### Please also see:

- https://github.com/chrisboulton/php-resque/pull/181
- https://github.com/chrisboulton/php-resque/pull/162