Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
4.0.0-rc.2 (unreleased):
* Remove constructors from Interfaces (Liskov Substitution Principle violation)

4.0.0-rc.1 (2025-12-15):
* BC PHP 8.0 dropped, minimum version is now PHP 8.1
* BC All classes now fully typehinted with strict types and return types
Expand Down
5 changes: 0 additions & 5 deletions src/Ting/ConnectionPoolInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@

interface ConnectionPoolInterface
{
/**
* @param DriverLoggerInterface $logger
*/
public function __construct(DriverLoggerInterface $logger);

public function setConfig(array $config): void;

/**
Expand Down
8 changes: 0 additions & 8 deletions src/Ting/Driver/StatementInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@

interface StatementInterface
{
/**
* @param mysqli_stmt|Object $driverStatement
* @param array $paramsOrder
* @param string $connectionName
* @param string $database
*/
public function __construct($driverStatement, array $paramsOrder, string $connectionName, string $database);

/**
* @param array $params
* @throws QueryException
Expand Down
7 changes: 0 additions & 7 deletions src/Ting/Query/QueryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@
*/
interface QueryInterface
{
/**
* @param string $sql
* @param Connection $connection
* @param CollectionFactoryInterface $collectionFactory
*/
public function __construct($sql, Connection $connection, ?CollectionFactoryInterface $collectionFactory = null);

/**
* Execute a reading query (SELECT, SHOW, etc.)
* @param CollectionInterface<T>|null $collection
Expand Down
6 changes: 3 additions & 3 deletions tests/units/Ting/Repository/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ public function testGenerateQueryForInsertShouldReturnAPreparedQuery()
$mockConnection = new \mock\CCMBenchmark\Ting\Connection($mockConnectionPool, 'main', 'db');

$mockDriver = new \mock\tests\fixtures\FakeDriver\Driver();
$mockStatement = new \mock\CCMBenchmark\Ting\Driver\StatementInterface(new \stdClass(), [], '', '');
$mockStatement = new \mock\CCMBenchmark\Ting\Driver\StatementInterface();
$this->calling($mockDriver)->prepare = $mockStatement;
$this->calling($mockDriver)->execute = true;
$this->calling($mockStatement)->execute = true;
Expand Down Expand Up @@ -960,7 +960,7 @@ public function testGenerateQueryForUpdateShouldReturnAPreparedQuery()
{
$mockConnectionPool = new \mock\CCMBenchmark\Ting\ConnectionPool();
$mockDriver = new \mock\tests\fixtures\FakeDriver\Driver();
$mockStatement = new \mock\CCMBenchmark\Ting\Driver\StatementInterface(new \stdClass(), [], '', '');
$mockStatement = new \mock\CCMBenchmark\Ting\Driver\StatementInterface();
$this->calling($mockDriver)->prepare = $mockStatement;
$this->calling($mockDriver)->execute = true;
$this->calling($mockStatement)->execute = true;
Expand Down Expand Up @@ -1018,7 +1018,7 @@ public function testGenerateQueryForDeleteShouldReturnAPreparedQuery()
{
$mockConnectionPool = new \mock\CCMBenchmark\Ting\ConnectionPool();
$mockDriver = new \mock\tests\fixtures\FakeDriver\Driver();
$mockStatement = new \mock\CCMBenchmark\Ting\Driver\StatementInterface(new \stdClass(), [], '', '');
$mockStatement = new \mock\CCMBenchmark\Ting\Driver\StatementInterface();
$this->calling($mockDriver)->prepare = $mockStatement;
$this->calling($mockDriver)->execute = true;
$this->calling($mockStatement)->execute = true;
Expand Down