youwe/testing-suite 问题修复 & 功能扩展

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

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

youwe/testing-suite

Composer 安装命令:

composer require youwe/testing-suite

包简介

Contains Youwe's default testing packages for php.

README 文档

README

Scrutinizer Code Quality

Youwe Testing Suite

Introduction

Youwe Testing Suite is an all-in-one solution for doing static code analysis on composer packages/projects. It does so both locally and in CI/CD. For this, Testing-suite leverages GrumPHP with predefined default configurations per project type.

Features

Supported project types

The Youwe Testing Suites offers pre-configured standards for the following project types.

Testing Suite Project Type Detected based on Composer Project Type
drupal drupal-bundle, drupal-project
magento2 magento-module, magento-project, magento2-module, magento2-project
pimcore pimcore-bundle, pimcore-project
default Any other

This project type is either detected from composer.json via the section

{
    "extra": {
        "youwe-testing-suite": { "type": "magento2" }
    }
}

or if no explicit setting was found for the Testing Suite, via

{
    "type": "magento2-module"
}

Included analysis tools

Installation

First, configure your project type (see the above list of supported types) via

composer config type magento2-project

or

composer config extra.youwe-testing-suite.type magento2

Testing suite is supposed to be installed as a composer dev dependency. Within any project just run the command below to install the package:

composer require youwe/testing-suite --dev

If a project-type is detected, standards will be applied (otherwise a wizard will be opened)

Usage

Locally

The testing suite can be run manually through the GrumPHP command.

vendor/bin/grumphp run

or for DDev projects

ddev exec vendor/bin/grumphp run

Git commit hook

The testing suite is automatically run at each git commit using a git commit hook.

This git commit hook will automatically detect DDev projects and will run GrumPHP within the DDev container if needed. This behaviour can be disabled:

  • on individual basis via an environment variable:
YOUWE_BYPASS_DDEV=1 git commit
  • on project basis via the grumphp.yml configuration file:
imports:
  - resource: 'vendor/youwe/testing-suite/config/your-project-type/grumphp.yml'

grumphp:
  git_hook_variables:
    # Disable DDev detection by restoring to default `exec`
    # See https://github.com/phpro/grumphp/blob/v2.x/doc/parameters.md for more options
    EXEC_GRUMPHP_COMMAND: exec

After changing your grumphp.yml, run vendor/bin/grumphp git:init to update the git commit hook.

CI/CD Integration examples

Changelog

See the Changelog file for all changes.

youwe/testing-suite 适用场景与选型建议

youwe/testing-suite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 190.83k 次下载、GitHub Stars 达 13, 最近一次更新时间为 2022 年 02 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 youwe/testing-suite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 youwe/testing-suite 我们能提供哪些服务?
定制开发 / 二次开发

基于 youwe/testing-suite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 190.83k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 13
  • 点击次数: 12
  • 依赖项目数: 8
  • 推荐数: 0

GitHub 信息

  • Stars: 13
  • Watchers: 1
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-18