zendframework / zend-db

Db component from Zend Framework
BSD 3-Clause "New" or "Revised" License
101 stars 122 forks source link

Adding the missing method to the interface #155

Open mariuszjarzab opened 8 years ago

mariuszjarzab commented 8 years ago
<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace Zend\Db\TableGateway;

interface TableGatewayInterface
{
    public function getTable();
    public function select($where = null);
    public function insert($set);
    public function update($set, $where = null);
    public function delete($where);
    public function getLastInsertValue();
}
weierophinney commented 8 years ago

Adding a method to an interface is a backwards compatibility break, as any implementations must update their code in order to be compatible. As such, I'm marking this for v3.0.

One thing we can do now is to add a new interface defining that method, and then have it composed into our own implementations; v3 would then wrap that functionality in the original interface and remove the new one (or extend the new one).

Feel free to submit one or more pull requests per my suggestions above.

michalbundyra commented 4 years ago

This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at https://github.com/laminas/laminas-db/issues/102.