Skip to content

Fix record: mixed-* findings in Connection/Pdo/Connection/Ddl decorators stem from untyped upstream array boundaries #65

Closed

Description

@tyrsson

Context

Part of #60.

Data

Multiple mixed-argument/mixed-assignment/mixed-array-assignment/less-specific-argument findings trace to untyped array boundaries in upstream php-db/phpdb:

  • AbstractConnection::$connectionParameters (protected array $connectionParameters = [];, no shape) — affects src/Connection.php and src/Pdo/Connection.php.
  • ColumnInterface::getOptions(): array and matching CreateTable::getOptions() / AlterTable::getOptions() (untyped array return) — affects src/Sql/Ddl/AlterTableDecorator.php and src/Sql/Ddl/CreateTableDecorator.php.
  • AlterTable's 7 untyped array properties ($addColumns, $addConstraints, $changeColumns, $dropColumns, $dropConstraints, $dropIndexes, $options) and CreateTable's 4 ($columns, $constraints, $options, $specifications) — all declared protected array $x = []; with no shape docblock. Concretely, this is why foreach ($this->changeColumns as $name => $column) in AlterTableDecorator::processChangeColumns() resolves $name to generic array-key rather than string, producing a less-specific-argument finding at PlatformInterface::quoteIdentifier($name) — left unsuppressed and uncast intentionally, so the baseline entry can be dropped cleanly once the upstream shape lands, without a workaround cast to remove.

Tracked upstream at php-db/phpdb#169.

These findings will be captured in a mago baseline rather than fixed or suppressed inline, pending the upstream fix.

Activity

  1. added this to the 0.5.0 milestone on Aug 10, 2026
  2. added theissue type on Aug 10, 2026
  3. tyrsson commented on Oct 7, 2026

    @tyrsson
    MemberAuthor

    Closing as resolved. The findings from untyped upstream array boundaries are captured in the committed analysis-baseline.toml — src/Connection.php (22 entries) and src/Pdo/Connection.php (6) — while the DDL decorators were fixed outright (4e2c1fc, d052760) and no longer appear in the baseline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions