Skip to content

Tools that you need to build your next awesome Laravel project.

License

Notifications You must be signed in to change notification settings

leMaur/toolbox

Repository files navigation

Tools for Artisan!

Latest Version on Packagist Total Downloads License GitHub Code Style Action Status GitHub Sponsors Trees

What's Included

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 πŸ˜ƒ:

Installation

Install the package via composer:

composer require --dev lemaur/toolbox

Launch the installation:

Be careful, this command (with --force option) will overwrite existing files in your project.

If you install this package in a fresh Laravel installation, you can simply run:

php artisan toolbox:install --test-suites --force

Otherwise, you can install only the group of files you may need without test suites:

php artisan toolbox:install --force --only="static-analysis"

# or you can specify multiple values
php artisan toolbox:install --force --only="static-analysis" --only="code-style"

# Available values:
- static-analysis
- code-style
- rector
- tests
- common

Add those scripts to your composer.json:

"scripts": {
    "analyse": "./vendor/bin/phpstan analyse --memory-limit=2G",
    "rector": "./vendor/bin/rector process",
    "format": "./vendor/bin/php-cs-fixer fix --allow-risky=yes",
    "test": "./vendor/bin/pest --coverage --min=100 --coverage-html=.coverage --coverage-clover=coverage.xml"
    "paratest": "./vendor/bin/pest --parallel --coverage --min=100 --coverage-html=.coverage --coverage-clover=coverage.xml"
}

If you use a continuous integration, you can run your test with a custom printer:

# an example from Github Actions

- name: Run Tests
  run: ./vendor/bin/pest --printer mheap\\GithubActionsReporter\\Printer --coverage --min=100 --coverage-html=.coverage --coverage-clover=coverage.xml

Available Commands

# Analyse
composer analyse

# Run Rector
composer rector

# Run Code Style Formatting
composer format

# Run tests
composer test

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.