nunophp/style
最新稳定版本:v1.0.0
Composer 安装命令:
composer require nunophp/style
包简介
A Laravel package to set up new projects with Nuno Maduro's recommended tools and configurations.
关键字:
README 文档
README
Nunophp Style is a Laravel package that sets up your project with Nuno Maduro’s recommended tools and configurations, including Pest, Pint, PHPStan, and Rector, all streamlined via a single Artisan command.
Requires PHP 8.3+
⚡️ Install the package into your Laravel project using Composer:
composer require nunophp/style --dev
The package’s service provider (Nunophp\Style\StyleServiceProvider) will be auto-discovered by Laravel.
🚀 Run the setup command to configure your project with Nuno’s recommended style:
php artisan style:setup
This command will:
- Prompt to install development tools (Pest, Pint, PHPStan, Rector).
- Update composer.json with modern testing scripts.
- Optionally update AppServiceProvider with recommended configurations.
- Publish configuration files (pint.json, phpstan.neon, rector.php), with overwrite prompts if they exist.
Example Commands After Setup
🧹 Lint your codebase with Pint:
composer lint
✅ Refactor with Rector:
composer refacto
⚗️ Analyze with PHPStan:
composer test:types
✅ Test with Pest:
composer test:unit
🚀 Run the full test suite:
composer test
Output Example
When you run php artisan style:setup, expect a polished interface:
╔════════════════════════════════════╗
║ Starting Nuno Style Setup ║
╚════════════════════════════════════╝
Do you want to install required development tools? (Pest, Pint, PHPStan, Rector) [yes]:
> no
📝 Updating composer.json...
✓ composer.json updated with testing scripts.
Do you want to update AppServiceProvider with recommended configurations? This will replace your existing file. [yes]:
> no
📦 Publishing configuration files...
↳ Skipped pint.json (not overwritten).
✓ Published phpstan.neon.
↳ Skipped rector.php (not overwritten).
╔════════════════════════════════════╗
║ Nuno Style Setup Complete ║
╚════════════════════════════════════╝
🎉 Run "composer test" to verify your setup!
Contributing
Contributions are welcome! Please submit pull requests to the GitHub repository.
Nunophp Style was created by Micheal Ataklt under the MIT license.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-23