limnova-software/laravel-baseline
Composer 安装命令:
composer require limnova-software/laravel-baseline
包简介
One-command QA baseline installer for Laravel projects.
README 文档
README
A one-command QA baseline installer for Laravel projects. It sets up a production-ready orchestration layer using Mago, enforcing consistent quality standards across your entire application.
Designed for professional teams, CI-driven workflows, and quality-first development.
Features
- Mago integration: Primary execution layer for all QA tasks.
- Unified configuration: Pre-configured stubs for PHPStan, Rector, Pint, EditorConfig, and GitAttributes.
- Enforced QA scope: Consistent analysis of
app/,database/,routes/,src/, andtests/. - Git hooks: Automated
pre-commit(linting) andpre-push(full QA) hooks. - GitLab CI ready: Includes a production-ready GitLab CI template with JUnit and Clover coverage reporting.
- Idempotent: Safe to run multiple times without destructive side effects.
Requirements
- PHP: ^8.4
- Laravel: ^12.0
Installation
You can install the package via composer:
composer require limnova-software/laravel-baseline --dev
Once installed, run the baseline installer:
php artisan baseline:install
Options
--force: Overwrite existing managed files and scripts.--no-hooks: Skip installation of Git hooks.--no-ci: Skip publishing the GitLab CI template.--level=6: Specify the PHPStan level (default is 6).
Usage
The installer adds several thin wrappers around Mago to your composer.json scripts. You can run these commands directly:
Linting and fixing
composer lint: Check for code style issues (Pint).composer fix: Automatically fix code style (Pint) and apply Rector refactorings.
Static analysis
composer stan: Run PHPStan static analysis.composer rector: Run Rector in dry-run mode.composer rector:fix: Apply Rector changes.
Testing
composer test: Run Pest tests.composer test:ci: Run Pest with JUnit output (for CI).composer coverage:ci: Generate Clover coverage report.
Quality assurance & security
composer security:audit: Check for vulnerable dependencies.composer qa: Run the full QA suite (lint, stan, test, rector).composer qa:ci: Run the full QA suite optimized for CI.
Mago integration
Mago is the core part of this package. While Composer scripts provide a familiar interface, Mago handles the orchestration. CI environments should call Mago directly for better performance and control.
Example of running a Mago task directly:
vendor/bin/mago qa
Git hooks
By default, the installer sets up the following hooks:
- pre-commit: Executes
composer lintto ensure no code style issues are committed. - pre-push: Executes
composer qato ensure the entire suite passes before pushing.
GitLab CI
The published .gitlab/ci/baseline.gitlab-ci.yml provides a comprehensive pipeline including:
- Linting
- Static analysis (PHPStan & Rector)
- Testing with JUnit reports
- Security audit
- Coverage tracking with regex extraction
Enforced QA scope
To maintain high standards, all tools are configured to operate on these directories exclusively:
app/database/routes/src/tests/
Security
If you discover any security-related issues, please email security@limnova.software instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-01