Push up the destructor from various database drivers to their parent abstract class JDatabaseDriver as it almost every time just does one thing viz disconnect(). Otherwise it can always be overridden.
Never unset class property. $this->connection set to null in disconnect methods of the db drivers.
Nosql connect return type is void not bool.
Testing Instructions
Make sure the disconnect / connect using all the database drivers work correctly without any warning/notice.
Without this patch calling disconnect followed by connect will raise PHP warning. After this patch it should work fine.
Any review on this please?