Skip to content

Commit 3386dcd

Browse files
committed
DB: remove deprecations
1 parent 58b304d commit 3386dcd

File tree

4 files changed

+2
-49
lines changed

4 files changed

+2
-49
lines changed

phpstan.neon

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,3 @@ parameters:
209209
message: "#^Property Forrest79\\\\PhPgSql\\\\Fluent\\\\Query::\\$params \\(array\\{select: array\\<int\\|string, BackedEnum\\|Forrest79\\\\PhPgSql\\\\Db\\\\Sql\\|int\\|string\\>, distinct: bool, distinctOn: list\\<string\\>, tables: array\\<string, array\\{string, string\\}\\>, table\\-types: array\\{main: string\\|null, from: list\\<string\\>, joins: list\\<string\\>, using: string\\|null\\}, on\\-conditions: array\\<string, Forrest79\\\\PhPgSql\\\\Fluent\\\\Condition\\>, lateral\\-tables: array\\<string, string\\>, where: Forrest79\\\\PhPgSql\\\\Fluent\\\\Condition\\|null, \\.\\.\\.\\}\\) does not accept .+\\.$#"
210210
path: src/Fluent/Query.php
211211
count: 6
212-
213-
# === Fix PhPgSql-PHPStan rules ===
214-
215-
-
216-
message: '#^Method Forrest79\\PhPgSql\\Fluent\\QueryExecute::getIterator\(\) should return Forrest79\\PhPgSql\\Db\\RowIterator but returns iterable<int, Forrest79\\PhPgSql\\Db\\Row>\.$#'
217-
path: %rootDir%/../../../src/Fluent/QueryExecute.php
218-
count: 1

src/Db/Connection.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,6 @@ public function setRowFactory(RowFactory $rowFactory): static
183183
}
184184

185185

186-
/**
187-
* @deprecated Use setRowFactory() method.
188-
*/
189-
public function setDefaultRowFactory(RowFactory $rowFactory): static
190-
{
191-
\trigger_error('Use setRowFactory() method.', \E_USER_DEPRECATED);
192-
return $this->setRowFactory($rowFactory);
193-
}
194-
195-
196186
public function setDataTypeParser(DataTypeParser $dataTypeParser): static
197187
{
198188
$this->resultBuilder->setDataTypeParser($dataTypeParser);

src/Db/Result.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
use PgSql;
66

7-
/**
8-
* @implements \IteratorAggregate<int, Row>
9-
*/
10-
class Result implements ColumnValueParser, \Countable, \IteratorAggregate
7+
class Result implements ColumnValueParser, \Countable
118
{
129
protected PgSql\Result $queryResource;
1310

@@ -85,16 +82,6 @@ public function setColumnsFetchMutator(array $columnsFetchMutator): static
8582
}
8683

8784

88-
/**
89-
* @deprecated Use fetchIterator() method.
90-
*/
91-
public function getIterator(): RowIterator
92-
{
93-
\trigger_error('Use fetchIterator() method.', \E_USER_DEPRECATED);
94-
return new RowIterator($this);
95-
}
96-
97-
9885
public function free(): bool
9986
{
10087
return \pg_free_result($this->queryResource);

src/Fluent/QueryExecute.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
use Forrest79\PhPgSql\Db;
66

7-
/**
8-
* @implements \IteratorAggregate<int, Db\Row>
9-
*/
10-
class QueryExecute extends Query implements \Countable, \IteratorAggregate
7+
class QueryExecute extends Query implements \Countable
118
{
129
private Db\Connection $connection;
1310

@@ -144,20 +141,6 @@ public function count(): int
144141
}
145142

146143

147-
/**
148-
* @deprecated Use fetchIterator() method.
149-
* @throws Db\Exceptions\ConnectionException
150-
* @throws Db\Exceptions\QueryException
151-
* @throws Exceptions\QueryException
152-
* @throws Exceptions\QueryBuilderException
153-
*/
154-
public function getIterator(): Db\RowIterator
155-
{
156-
\trigger_error('Use fetchIterator() method.', \E_USER_DEPRECATED);
157-
return $this->execute()->getIterator();
158-
}
159-
160-
161144
/**
162145
* @throws Db\Exceptions\ConnectionException
163146
* @throws Db\Exceptions\QueryException

0 commit comments

Comments
 (0)