poolsphp/pools

A simple and fast implementation of a thread pool in PHP

v0.0.8 2025-03-06 19:49 UTC

This package is auto-updated.

Last update: 2025-06-06 20:25:57 UTC


README

Pools PHP

GitHub Workflow Status (master) Total Downloads Latest Version License

Pools PHP

Pools is a CLI tool that helps you install and configure modern PHP development tools for your projects with a single command.

Requires PHP 8.3+

What Pools Does

Pools v0.0.3 provides a seamless way to install and configure popular PHP development tools:

  • ๐Ÿงน Pint: PHP code style fixer based on PHP-CS-Fixer
  • โš—๏ธ PHPStan: Static analysis tool for finding bugs before they reach production
  • โœ… Pest: An elegant PHP testing framework with a focus on simplicity
  • ๐Ÿ”„ Rector: Automated refactoring tool to improve your PHP code

Each tool is installed with sensible default configurations, saving you time and ensuring consistent code quality across your projects.

Installation

Install Pools globally using Composer:

composer global require poolsphp/pools

Make sure to add Composer's global bin directory to your PATH to run Pools as a shell command.

For Bash/Zsh users (Linux/macOS):

Add the following line to your ~/.bashrc, ~/.zshrc, or ~/.bash_profile:

export PATH="$PATH:$HOME/.composer/vendor/bin"

Then reload your shell configuration:

source ~/.bashrc  # or ~/.zshrc or ~/.bash_profile

For Windows users:

Add the Composer's global vendor bin directory to your PATH environment variable:

%USERPROFILE%\AppData\Roaming\Composer\vendor\bin

Usage

Navigate to your PHP project's root directory and run:

pools install

You'll be prompted to select which tools you want to install:

  • PHPStan
  • Pest
  • Pint
  • Rector

Using specific tools

After installation, you can use the tools through Composer scripts in your project:

# Run PHP code style fixes
composer lint

# Run automated refactors
composer refacto

# Run static analysis
composer test:types

# Run unit tests with Pest
composer test:unit

# Run the entire test suite
composer test

CLI Options

Install all tools:

pools install --all

Install specific tools:

pools install --phpstan --pest
pools install --pint --rector

Set PHPStan level:

pools install --phpstan --type-check-level=8

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

The MIT License (MIT). Please see License File for more information.