Skip to content

Commit

Permalink
Added the notes change for 3.0.0 + removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Mar 11, 2019
1 parent 2e1ec17 commit 6df64e0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
10 changes: 10 additions & 0 deletions 3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ We cannot use type hint because the usage of `Zend\ServiceManager\FactoryInterfa
- Zend\Db\Adapter\ParameterContainer

Removed `merge()`, added `mergeFromArray()` and `mergeFromParameterContainer()`.

- Zend\Db\Adapter\Platform

Changed `setDriver(DriverInterface $driver)` for all the following platforms:

- Zend\Db\Adapter\Platform\Mysql
- Zend\Db\Adapter\Platform\Oracle
- Zend\Db\Adapter\Platform\Postgresql
- Zend\Db\Adapter\Platform\Sqlite
- Zend\Db\Adapter\Platform\SqlServer
10 changes: 0 additions & 10 deletions src/Adapter/Platform/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,8 @@ public function __construct(DriverInterface $driver = null)
}
}

/**
* @return self Provides a fluent interface
*/
public function setDriver(DriverInterface $driver): Mysql
{
// handle Zend\Db drivers
// if ($driver instanceof Mysqli\Mysqli
// || ($driver instanceof Pdo\Pdo && $driver->getDatabasePlatformName() == 'Mysql')
// || ($driver instanceof \mysqli)
// || ($driver instanceof \PDO && $driver->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'mysql')
// ) {

$this->resource = $driver;
return $this;
}
Expand Down
9 changes: 0 additions & 9 deletions src/Adapter/Platform/Oracle.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,8 @@ public function __construct(array $options = [], DriverInterface $driver = null)
}
}

/**
* @return self Provides a fluent interface
*/
public function setDriver(DriverInterface $driver): Oracle
{
// if ($driver instanceof Oci8
// || ($driver instanceof Pdo && $driver->getDatabasePlatformName() == 'Oracle')
// || ($driver instanceof Pdo && $driver->getDatabasePlatformName() == 'Sqlite')
// || ($driver instanceof \oci8)
// || ($driver instanceof PDO && $driver->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci')
// ) {
$this->resource = $driver;
return $this;
}
Expand Down
8 changes: 0 additions & 8 deletions src/Adapter/Platform/Postgresql.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,8 @@ public function __construct(DriverInterface $driver = null)
}
}

/**
* @return self Provides a fluent interface
*/
public function setDriver(DriverInterface $driver): Postgresql
{
// if ($driver instanceof Pgsql\Pgsql
// || ($driver instanceof Pdo\Pdo && $driver->getDatabasePlatformName() == 'Postgresql')
// || (is_resource($driver) && (in_array(get_resource_type($driver), ['pgsql link', 'pgsql link persistent'])))
// || ($driver instanceof \PDO && $driver->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'pgsql')
// ) {
$this->resource = $driver;
return $this;
}
Expand Down

0 comments on commit 6df64e0

Please sign in to comment.