lemaur / toolbox
Toolbox full of useful packages to keep your Laravel project compliant with your coding standards.
Fund package maintenance!
lemaur
Installs: 4 336
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 3
Requires
- php: ^8.1
- barryvdh/laravel-debugbar: ^3.7
- barryvdh/laravel-ide-helper: ^2.12
- brianium/paratest: ^6.6
- driftingly/rector-laravel: ^0.14.1
- ergebnis/phpstan-rules: ^1.0
- graham-campbell/analyzer: ^3.1
- illuminate/contracts: ^8.0|^9.0
- infection/infection: dev-master
- johnkary/phpunit-speedtrap: ^v4.0
- laravel/dusk: ^7.0
- nunomaduro/larastan: ^2.2
- pestphp/pest: ^1.22
- pestphp/pest-plugin-faker: ^1.0
- pestphp/pest-plugin-laravel: ^1.3
- pestphp/pest-plugin-mock: ^1.0
- pestphp/pest-plugin-parallel: ^v1.2
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-strict-rules: ^1.0
- rector/rector: ^0.14.7
- roave/security-advisories: dev-latest
- spatie/laravel-package-tools: ^1.4.3
- spatie/laravel-ray: ^1.0
- spatie/pest-plugin-snapshots: ^1.1
- spatie/pest-plugin-test-time: ^1.1
- thecodingmachine/phpstan-safe-rule: ^1.2
Suggests
- thecodingmachine/phpstan-safe-rule: PHPStan rule to help you detect unsafe function call and will propose you to use the thecodingmachine/safe variant instead.
- thecodingmachine/safe: A set of core PHP functions rewritten to throw exceptions instead of returning false when an error is encountered.
This package is auto-updated.
Last update: 2024-11-27 07:56:32 UTC
README
Toolbox full of useful packages to keep your Laravel project compliant with your coding standards.
It provides a minimum configuration to help you start with static analysis
, code styling
and testing
.
What's Included
- Laravel Debugbar
- Laravel Ide Helper
- Analyzer
- Infection
- Phpunit SpeedTrap
- Laravel Dusk
- Laravel Sail
- Larastan
- Pest
- Phpunit
- Rector
- Security Advisories
- Laravel Ray
Support Me
Hey folks,
Do you like this package? Do you find it useful, and it fits well in your project?
I am glad to help you, and I would be so grateful if you considered supporting my work.
You can even choose 😃:
- You can sponsor me 😎 with a monthly subscription.
- You can buy me a coffee ☕ or a pizza 🍕 just for this package.
- You can plant trees 🌴. By using this link we will both receive 30 trees for free and the planet (and me) will thank you.
- You can "Star ⭐" this repository (it's free 😉).
Installation
Install the package via composer:
composer require lemaur/toolbox --dev
if you still using php8.0 you should use:
composer require "lemaur/toolbox:^3.2" --dev
Launch the installation:
Be careful, this package was created to be used on a fresh new Laravel project.
Commands listed below will OVERWRITE your existing files!
If you install this package in a fresh Laravel installation, you can simply run:
php artisan toolbox:install
⬇️ configure only Pest and Dusk test suites. Those files will be overwritten.
php artisan toolbox:install --test-suites
Otherwise, you can install only the group of files you need without test suites:
⬇️ will overwrite phpstan.neon.
php artisan toolbox:install --only="static-analysis"
or you can specify multiple values, ⬇️ will overwrite phpstan.neon and pint.json.
php artisan toolbox:install --only="static-analysis" --only="code-style"
Available values for the --only
option:
- static-analysis - code-style - refactor - tests - common
Add those scripts to your composer.json
:
"scripts": { "ide-helper": [ "@php artisan ide-helper:models --write-mixin --reset", "@php artisan ide-helper:generate", "@php artisan ide-helper:eloquent", "@php artisan ide-helper:meta" ], "analyse": "./vendor/bin/phpstan analyse --memory-limit=2G", "refactor": "./vendor/bin/rector process --memory-limit=2G", "format": "./vendor/bin/pint", "test": "./vendor/bin/pest --exclude-group=e2e", "test:fast": "./vendor/bin/pest --exclude-group=e2e --parallel", "test:coverage": "./vendor/bin/pest --exclude-group=e2e --coverage --min=50 --coverage-html=.coverage --coverage-clover=coverage.xml", "test:e2e": "@php artisan pest:dusk", "test:mutation": [ "Composer\\Config::disableProcessTimeout", "XDEBUG_MODE=coverage vendor/bin/infection --show-mutations --threads=4 --only-covering-test-cases --min-msi=25 --min-covered-msi=85 --test-framework=pest --test-framework-options='--configuration=phpunit.xml --exclude-group=e2e'" ] }
Allow plugins to be executed by Composer, by putting these lines on composer.json
:
"config": { ... "allow-plugins": { "phpstan/extension-installer": true, "pestphp/pest-plugin": true, "infection/extension-installer": true } }
Available Commands
Generate PHPDoc for your models and
other (helpful for your IDE and static analysis tools) for more info
composer ide-helpers
Run code refactoring for more info
composer refactor
Run code style formatting for more info
composer format
Run static analysis for more info
composer analyse
Run tests for more info
composer test
Run tests with coverage for more info
composer test:coverage
Run e2e tests for more info
composer test:e2e
Run mutation tests for more info
composer test:mutation
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.