定制 kununu/code-tools 二次开发

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

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

kununu/code-tools

最新稳定版本:v3.1.6

Composer 安装命令:

composer require kununu/code-tools

包简介

Code Tools

README 文档

README

Qodana

Brancher

code-tools

  • This repository contains code tools you can use in your project.
  • It is a collection of tools and scripts that help us to maintain our codebase.

Tools

.editorconfig

  • EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.
  • Learn more about .editorconfig at official page here.

PHP-CS-Fixer

  • This project uses PHP-CS-Fixer to automatically format and fix PHP code according to defined coding standards. It helps maintain clean, consistent, and readable code across the codebase.

PHP_CodeSniffer

  • PHP_CodeSniffer is a set of two PHP scripts; the main phpcs script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second phpcbf script to automatically correct coding standard violations. PHP_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
  • Though the usage of this tool is not mandatory, it is highly recommended to use it to ensure the quality of the codebase.
  • Learn more about PHP_CodeSniffer at official page here.

Rector

  • Rector is a tool that automatically upgrades and refactors your PHP code. It is a tool that helps you to keep your code up-to-date and clean.
  • Learn more about Rector at official page here.

bin/code-tools

  • Though each tool can be used "out-of-the-box", this is a helper script that allows you to copy configuration files of each, or all, tools to your project so you can customize them.

bin/php-in-k8s

  • This is a helper script that allows you to run PHP commands inside a local Kubernetes pod without having to connect to it via a terminal manually.

Architecture Sniffer & PHPAT

  • Architecture Sniffer enforces architectural and dependency rules in your PHP codebase, helping you maintain a clean and consistent architecture.

  • It is powered by PHPAT, a static analysis tool for PHP architecture testing.

  • Architecture Sniffer uses a YAML configuration file (architecture.yaml) where you define your architectural groups and their allowed dependencies. Each group is a key under the architecture root, e.g.:

    architecture:
      $controllers:
        includes:
          - "App\\Controller\\*Controller"
        depends_on:
          - "$services"
      $services:
        includes:
          - "App\\Service\\*Service"
  • To use Architecture Sniffer with PHPStan, add the extension to your phpstan.neon:

    includes:
        - vendor/carlosas/phpat/extension.neon
    services:
        -
            class: PHPAT\PHPStan\PHPStanExtension
            tags: [phpstan.extension]
  • For more details and advanced configuration, see Kununu/ArchitectureSniffer/README.md.

Require Library as a dev dependency

You can use this library by issuing the following command:

composer require --dev kununu/code-tools --no-plugins
  • The --no-plugins is used to avoid the composer plugins to be executed and prevent generating unwanted configuration files, specially in projects with symfony/flex installed.

Usage

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-19