Skip to content
Merged
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
15 changes: 15 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@
<testsuite name="lib-doctrine-dbal-bulk-integration">
<directory>src/lib/doctrine-dbal-bulk/tests/Flow/Doctrine/Bulk/Tests/Integration</directory>
</testsuite>
<testsuite name="lib-dremel-unit">
<directory>src/lib/dremel/tests/Flow/Dremel/Tests/Unit</directory>
</testsuite>
<testsuite name="lib-dremel-integration">
<directory>src/lib/dremel/tests/Flow/Dremel/Tests/Integration</directory>
</testsuite>
<testsuite name="lib-filesystem-unit">
<directory>src/lib/filesystem/tests/Flow/Filesystem/Tests/Unit</directory>
</testsuite>
Expand Down Expand Up @@ -203,6 +209,9 @@
<testsuite name="bridge-telemetry-otlp-integration">
<directory>src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration</directory>
</testsuite>
<testsuite name="adapter-avro-integration">
<directory>src/adapter/etl-adapter-avro/tests/Flow/ETL/Adapter/Avro/Tests/Integration</directory>
</testsuite>
<testsuite name="adapter-chartjs-unit">
<directory>src/adapter/etl-adapter-chartjs/tests/Flow/ETL/Adapter/ChartJS/Tests/Unit</directory>
</testsuite>
Expand Down Expand Up @@ -262,6 +271,12 @@
<testsuite name="adapter-parquet-integration">
<directory>src/adapter/etl-adapter-parquet/tests/Flow/ETL/Adapter/Parquet/Tests/Integration</directory>
</testsuite>
<testsuite name="adapter-postgresql-unit">
<directory>src/adapter/etl-adapter-postgresql/tests/Flow/ETL/Adapter/PostgreSql/Tests/Unit</directory>
</testsuite>
<testsuite name="adapter-postgresql-integration">
<directory>src/adapter/etl-adapter-postgresql/tests/Flow/ETL/Adapter/PostgreSql/Tests/Integration</directory>
</testsuite>
<testsuite name="adapter-text-integration">
<directory>src/adapter/etl-adapter-text/tests/Flow/ETL/Adapter/Text/Tests/Integration</directory>
</testsuite>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class PostgreSqlCursorExtractor implements Extractor
private ?Schema $schema = null;

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*/
public function __construct(
private readonly Client $client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class PostgreSqlKeySetExtractor implements Extractor
private ?Schema $schema = null;

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*/
public function __construct(
private readonly Client $client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class PostgreSqlLimitOffsetExtractor implements Extractor
private ?Schema $schema = null;

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*/
public function __construct(
private readonly Client $client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @param Client $client PostgreSQL client
* @param Sql|string $query SQL query to execute (wrapped in DECLARE CURSOR)
* @param array<int, mixed> $parameters Positional parameters for the query
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*/
#[DocumentationDSL(module: Module::POSTGRESQL, type: DSLType::EXTRACTOR)]
function from_pgsql_cursor(
Expand All @@ -39,7 +39,7 @@ function from_pgsql_cursor(
*
* @param Client $client PostgreSQL client
* @param Sql|string $query SQL query to execute (must have ORDER BY clause)
* @param array<int, mixed> $parameters Positional parameters for the query
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*/
#[DocumentationDSL(module: Module::POSTGRESQL, type: DSLType::EXTRACTOR)]
function from_pgsql_limit_offset(
Expand All @@ -59,7 +59,7 @@ function from_pgsql_limit_offset(
* @param Client $client PostgreSQL client
* @param Sql|string $query SQL query to execute (must have ORDER BY matching keyset columns)
* @param KeySet $keySet Columns to use for keyset pagination
* @param array<int, mixed> $parameters Positional parameters for the query
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*/
#[DocumentationDSL(module: Module::POSTGRESQL, type: DSLType::EXTRACTOR)]
function from_pgsql_key_set(
Expand Down
32 changes: 16 additions & 16 deletions src/lib/postgresql/src/Flow/PostgreSql/Client/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function converters() : ValueConverters;
* Use cursor->map() to map rows to objects.
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*/
Expand All @@ -55,7 +55,7 @@ public function cursor(Sql|string $sql, array $parameters = []) : Cursor;
* Returns the number of affected rows.
*
* @param Sql|string $sql SQL statement or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*/
Expand All @@ -66,7 +66,7 @@ public function execute(Sql|string $sql, array $parameters = []) : int;
* Useful for analyzing query performance.
*
* @param Sql|string $sql SQL query to explain
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
* @param null|ExplainConfig $config EXPLAIN configuration (defaults to forAnalysis())
*
* @throws QueryException
Expand All @@ -78,7 +78,7 @@ public function explain(Sql|string $sql, array $parameters = [], ?ExplainConfig
* Returns null if no rows found.
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*
Expand All @@ -90,7 +90,7 @@ public function fetch(Sql|string $sql, array $parameters = []) : ?array;
* Fetch all rows from query result.
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*
Expand All @@ -105,7 +105,7 @@ public function fetchAll(Sql|string $sql, array $parameters = []) : array;
*
* @param RowMapper<T> $mapper Mapper to apply to each row
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*
Expand All @@ -125,7 +125,7 @@ public function fetchAllInto(
*
* @param RowMapper<T> $mapper Mapper to apply to the row
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*
Expand All @@ -142,7 +142,7 @@ public function fetchInto(
* Use when you expect zero or one result (e.g., optional lookup by unique column).
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
* @throws TooManyRowsException When the result contains more than one row
Expand All @@ -159,7 +159,7 @@ public function fetchOne(Sql|string $sql, array $parameters = []) : ?array;
*
* @param RowMapper<T> $mapper Mapper to apply to the row
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
* @throws TooManyRowsException When the result contains more than one row
Expand All @@ -177,7 +177,7 @@ public function fetchOneInto(
* Ideal for COUNT(*), MAX(), MIN(), etc.
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*/
Expand All @@ -187,7 +187,7 @@ public function fetchScalar(Sql|string $sql, array $parameters = []) : mixed;
* Fetch a single boolean value from the first column of first row.
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*/
Expand All @@ -197,7 +197,7 @@ public function fetchScalarBool(Sql|string $sql, array $parameters = []) : bool;
* Fetch a single float value from the first column of first row.
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*/
Expand All @@ -208,7 +208,7 @@ public function fetchScalarFloat(Sql|string $sql, array $parameters = []) : floa
* Ideal for COUNT(*), MAX(), MIN(), etc.
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*/
Expand All @@ -218,7 +218,7 @@ public function fetchScalarInt(Sql|string $sql, array $parameters = []) : int;
* Fetch a single string value from the first column of first row.
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
*/
Expand All @@ -229,7 +229,7 @@ public function fetchScalarString(Sql|string $sql, array $parameters = []) : str
* Use when you expect precisely one result (e.g., SELECT by primary key, INSERT ... RETURNING).
*
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
* @throws NoResultException When the result is empty
Expand All @@ -247,7 +247,7 @@ public function fetchSingle(Sql|string $sql, array $parameters = []) : array;
*
* @param RowMapper<T> $mapper Mapper to apply to the row
* @param Sql|string $sql SQL query or query builder with $1, $2, ... placeholders
* @param array<int, mixed> $parameters Positional parameters
* @param list<mixed> $parameters Values bound by position to $1, $2, ... placeholders; wrap with {@see \Flow\PostgreSql\DSL\typed()} to force a specific PostgreSQL type
*
* @throws QueryException
* @throws NoResultException When the result is empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ private function assertConnected() : void
}

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*/
private function buildContext(Sql|string $sql, array $parameters) : Context
{
Expand All @@ -542,7 +542,7 @@ private function buildContext(Sql|string $sql, array $parameters) : Context
}

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*
* @return array<int, null|string>
*/
Expand Down Expand Up @@ -643,7 +643,7 @@ private function extractError(Connection $connection, ?Result $result) : Postgre
}

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*/
private function query(Sql|string $sql, array $parameters) : Result
{
Expand Down
4 changes: 2 additions & 2 deletions src/lib/postgresql/src/Flow/PostgreSql/Client/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
final readonly class Query
{
/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*/
public function __construct(
private Sql|string $sql,
Expand All @@ -18,7 +18,7 @@ public function __construct(
}

/**
* @return array<int, mixed>
* @return list<mixed>
*/
public function parameters() : array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ public function wait(int $milliseconds) : ?Notification
}

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*
* @return array<string, array<bool|float|int|string>|bool|float|int|string>
*/
Expand Down Expand Up @@ -623,7 +623,7 @@ private function completeTransactionSpan(int $nestingLevel, SpanStatus $status,
}

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*/
private function logQuery(string $query, array $parameters) : void
{
Expand Down Expand Up @@ -688,7 +688,7 @@ private function recordRowCount(int $rowCount, QueryAttributes $queryAttrs) : vo
/**
* @template T
*
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
* @param callable(): T $operation
* @param null|callable(T): int $rowCountExtractor
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ final class TraceableCursor implements Cursor
private ?Tracer $tracer = null;

/**
* @param array<int, mixed> $parameters
* @param list<mixed> $parameters
*/
public function __construct(
private readonly Cursor $cursor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ protected function setUp() : void
$_GET = [];
$_POST = [];
$_COOKIE = [];

foreach ($_SERVER as $key => $_) {
if (\is_string($key) && \str_starts_with($key, 'HTTP_')) {
unset($_SERVER[$key]);
}
}
}

protected function tearDown() : void
Expand Down
Loading