Extended Laravel Pint.

Installs: 56

Dependents: 2

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 1

Open Issues: 0

pkg:composer/mpietrucha/pint

1.0.0 2026-02-04 18:14 UTC

This package is auto-updated.

Last update: 2026-02-06 23:39:39 UTC


README

An extended version of Laravel Pint that provides enhanced functionality for code formatting and linting PHP projects. Built on top of Laravel Pint, it adds stdin support for real-time editor integration, automatic parallel execution, and a streamlined environment configuration system.

Requirements

  • PHP 8.5+
  • Composer 2.8+

Installation

composer require mpietrucha/pint

Usage

Examples assumes that vendor/bin is globally available in your PATH.

Basic Usage

Run Pint on your project the same way you would with Laravel Pint:

pint

All standard Laravel Pint options are available:

pint --test
pint --dirty
pint --diff=main
pint --preset=laravel
pint --config=pint.json

Parallel Execution

Parallel execution is enabled by default. You can control the number of processes:

pint --max-processes=4

Stdin Mode

The --std flag enables stdin mode, allowing editors to pipe file contents directly to Pint and receive formatted output back. This enables real-time format-on-save without writing temporary files:

cat app/Models/User.php | pint --std app/Models/User.php

The path argument provides context for Pint to resolve the correct configuration and exclusion rules.

Editor Integration

Zed

Add to your Zed settings:

{
    "languages": {
        "PHP": {
            "formatter": {
                "external": {
                    "command": "pint",
                    "arguments": ["--std", "{buffer_path}"]
                }
            }
        }
    }
}

Neovim

Using conform.nvim:

require("conform").setup({
    formatters = {
        pint = {
            command = "pint",
            args = { "--std", "$FILENAME" },
            stdin = true,
        },
    },
    formatters_by_ft = {
        php = { "pint" },
    },
})

PhpStorm

Configure as an external tool under Settings > Tools > External Tools:

Field Value
Program pint
Arguments --std $FilePath$

Then bind it to a keymap or enable it as a file watcher.

Configuration

Pint uses the same pint.json configuration file as Laravel Pint:

{
    "preset": "laravel",
    "rules": {
        "ordered_class_elements": true,
        "concat_space": {
            "spacing": "one"
        }
    }
}

Configuration is automatically resolved from the project root. Use --no-config to disable configuration loading, or --config to specify a custom path.

Excluding Files

Add an exclude key to your pint.json to skip specific paths:

{
    "preset": "laravel",
    "exclude": [
        "vendor",
        "storage"
    ]
}

License

Pint is open-sourced software licensed under the MIT license.