- Fixes https://github.com/typeorm/typeorm/issues/8420
- v4.0.0 and newer of node-redis will no longer auto-connect, so we need to add that step
- For backwards compatibility, we check for the existence of a "v4" property so we don't try to call `connect` on older versions of the client
- A `legacyMode` flag exists in the new v4.0.0 of node-redis to keep a similar calling style without having to change any code
- Note that the legacyMode flag is **required** to be passed if the calling code isn't going to be changed