php-forge/baseline 问题修复 & 功能扩展

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

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

php-forge/baseline

Composer 安装命令:

composer require php-forge/baseline

包简介

Centralized PHP development baseline: code style, linters, CI workflows, and dev environment tooling.

README 文档

README

PHP Forge

Baseline


Centralized PHP development baseline
Code style, linters, CI workflows, and dev environment tooling shared across repositories via Composer.

System requirements

  • PHP 8.3 or higher.
  • Composer for dependency management.

Installation

composer require php-forge/baseline:^0.1 --dev

Or add the dependency manually to composer.json:

{
    "require-dev": {
        "php-forge/baseline": "^0.1"
    }
}

Then run composer update.

Scaffolded distribution

This package is a yii2-extensions/scaffold provider for dev environment metadata (editor, gitignore, prettier, stylelint, super-linter configs, and more). Templates live under metadata/ and are mapped to consumer roots via the {from, to} form in scaffold.json.

Opt in by allowing the plugin and listing this package as an authorised provider:

composer require yii2-extensions/scaffold:^0.1 --dev
{
    "config": {
        "allow-plugins": {
            "yii2-extensions/scaffold": true
        }
    },
    "extra": {
        "scaffold": {
            "auto": false,
            "allowed-packages": ["php-forge/baseline"]
        }
    }
}

With auto: false, the plugin does not run on composer install; sync templates manually:

vendor/bin/scaffold reapply --provider=php-forge/baseline
vendor/bin/scaffold diff <file>
vendor/bin/scaffold status

Files distributed

.
├── .editorconfig                      # append: Editor settings; consumer-specific lines preserved
├── .gitattributes                     # replace: Text/binary handling, archive excludes
├── .gitignore                         # append: Common ignore patterns; project-specific lines preserved
├── .styleci.yml                       # replace: StyleCI config (PSR-12 + risky)
├── .prettierignore                    # replace: Paths Prettier should skip
├── .prettierrc.json                   # replace: Prettier formatting rules
├── .stylelintignore                   # replace: Paths stylelint should skip
├── composer-require-checker.json      # preserve: Composer require-checker whitelist (project-specific)
└── .github
    └── linters
        ├── .codespellrc               # replace: codespell config
        ├── .editorconfig-checker.json # replace: editor-config-checker config for Super-Linter
        ├── .gitleaks.toml             # replace: gitleaks config
        ├── .markdown-lint.yml         # replace: markdownlint config
        └── actionlint.yml             # replace: actionlint config for Super-Linter

Mode semantics:

  • replace: lock-step with this package. Local edits trigger a warning and the file is skipped on update.
  • append: provider content is merged into the existing file; consumer additions never blown away.
  • preserve: file is written once on first install and never overwritten.

Related packages

For ECS and Rector configurations and their root wrapper templates, see php-forge/coding-standard. The two packages are independent — adopt either, both, or neither.

Package information

PHP Latest Stable Version Total Downloads

Quality code

Super-Linter StyleCI

Our social networks

Follow on X

License

License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2026-05-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固