定制 forrest79/phpgsql-phpstan 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

forrest79/phpgsql-phpstan

最新稳定版本:v2.0.1

Composer 安装命令:

composer require forrest79/phpgsql-phpstan

包简介

PhPgSql class reflection extension and settings for PHPStan.

README 文档

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

统计信息

  • 总下载量: 4.19k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2020-02-15