ofbeaton/granite 问题修复 & 功能扩展

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

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

ofbeaton/granite

最新稳定版本:6.9.0

Composer 安装命令:

composer require ofbeaton/granite

包简介

Opinionated PHP Coding Style enforcement for PHP

README 文档

README

Opinionated coding style enforcement for PHP.

Contains

We make use of the following programs:

Installing via Composer

The recommended way to install granite-php is through Composer. Ensure you have it installed first.

Next, run the Composer command to install the latest stable version:

composer require ofbeaton/granite-php composer require squizlabs/php_codesniffer composer require jakub-onderka/php-parallel-lint jakub-onderka/php-console-highlighter

Edit your composer.json and add or modify scripts section:

{ ... "scripts": { "check": [ "parallel-lint . --exclude vendor", "phpcs -p --standard=vendor/ofbeaton/granite-php/phpcs/granite --ignore=vendor src"  ], "fix": [ "phpcbf -p --standard=vendor/ofbeaton/granite-php/phpcs/granite --ignore=vendor src" ], "check-tests": [ "parallel-lint . --exclude vendor", "phpcs -p --standard=vendor/ofbeaton/granite-php/phpcs/granite-tests --ignore=vendor tests"  ], "fix-tests": [ "phpcbf -p --standard=vendor/ofbeaton/granite-php/phpcs/granite-tests --ignore=vendor tests" ], "test": [ "@check", "@check-tests" ] }, ... }

And update your project:

composer update ofbeaton/granite-php

After updating, you can now run granite-php:

composer test

Running granite-php on test suites

You usually want to relax some requirements for test suites, in that case run:

composer check-tests

Documentation

Please head over to the PHP page on the Granite wiki.

License

This software is distributed under the MIT License. Please see License file for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固