vojtech-dobes/phpstan-php-graphql-server-nette-integration 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

vojtech-dobes/phpstan-php-graphql-server-nette-integration

Composer 安装命令:

composer require vojtech-dobes/phpstan-php-graphql-server-nette-integration

包简介

README 文档

README

Checks

This extension is recommended if you use PHPStan with vojtech-dobes/phpstan-php-graphql-server extension. It gives you prepared Adapter implementation for easy integration with your GraphQL service setup.

Installation

To install the latest version, run the following command:

composer require vojtech-dobes/phpstan-php-graphql-server-nette-integration

Setup

Using this extension you can tell PHPStan about your GraphQL service in two ways:

  • either you can directly use services registered in your DI container
  • or you can point the extension at NEON configuration file that holds all necessary information in static form

The latter way is less convenient but won't prevent you from using PHPStan if your DI container can't temporarily compile (which is likely to happen during active development).

Method 1: DI container

Update your phpstan.neon like this:

includes:
  - vendor/vojtech-dobes/phpstan-php-graphql-server-nette-integration/extension_di_container.neon

graphqlDIContainer:
  dic: [Bootstrap, createContainerForPHPStan]
  extensionMap:
    %rootDir%/../../../src/schema.graphqls: graphql

Options:

  • dic

    Expects callback that will return instance of your Nette\DI\Container from which it can extract necessary GraphQL services.

  • extensionMap

    Expects map of schema file paths to extension name you use for that particular schema in your configuration. For example if your application configuration looks like this:

    extensions:
      my_graphql: Vojtechdobes\GraphQL\Integrations\Nette\Extension
    
    my_graphql:
      schemaPath: %rootDir%/src/my_schema.graphqls

    Then your phpstan.neon should contain:

    graphqlDIContainer:
      extensionMap:
        %rootDir%/../../../src/my_schema.graphqls: my_graphql

Method 2: static configuration

WIP

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2025-06-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固