forrest79/phpgsql-phpstan

PhPgSql class reflection extension and settings for PHPStan.

Maintainers

👁 forrest79

Package info

github.com/forrest79/phpgsql-phpstan

Type:phpstan-extension

pkg:composer/forrest79/phpgsql-phpstan

Statistics

Installs: 4 557

Dependents: 1

Suggesters: 0

Stars: 2

Open Issues: 0

v2.0.1 2025-10-02 20:33 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause 9822fa853f39c0876678f42f8aeeee033283bd28

  • Jakub Trmota <jakub.woop@trmota.cz>

PHPStanphpgsql

This package is auto-updated.

Last update: 2026-06-23 23:14:36 UTC


README

👁 Latest Stable Version
👁 Monthly Downloads
👁 License
👁 Build

Introduction

This extension defines dynamic methods and other PHPStan setting for Forrest79\PhPgSql.

Installation

To use this extension, require it in Composer:

composer require --dev forrest79/phpgsql-phpstan

Using

Include extension.neon in your project's PHPStan config:

includes:
 - vendor/forrest79/phpgsql-phpstan/extension.neon

If you're using your own Forrest79\PhPgSql\Db\Row or Forrest79\PhPgSql\Fluen\Query, you can set it likes this:

parameters:
 forrest79:
 phpgsql:
 dbRowClass: MyOwn\PhPgSql\Db\RowXyz
 fluentQueryClass: MyOwn\PhPgSql\Fluent\QueryXyz

Or you can set just one extension:

  • for PhPgSql\Db\Result (for fetching the correct Row object from fetch methods):
services:
 Forrest79PhPgSqlPHPStanReflectionDbResultDynamicMethodReturnTypeExtension:
 arguments:
 dbRowClass: MyOwn\PhPgSql\Db\RowXyz
  • for PhPgSql\Fluent\QueryExecute (for fetching the correct Row object from fetch methods):
services:
 Forrest79PhPgSqlPHPStanReflectionFluentQueryExecuteDynamicMethodReturnTypeExtension:
 arguments:
 dbRowClass: MyOwn\PhPgSql\Db\RowXyz
  • for PhPgSql\Fluent\Condition (to return right Query in query() method):
services:
 Forrest79PhPgSqlPHPStanReflectionFluentConditionDynamicMethodReturnTypeExtension:
 arguments:
 fluentQueryClass: MyOwn\PhPgSql\Fluent\QueryXyz