Search by

lintkit / mago-config

mikestreety

There is no license information available for the latest version (dev-main) of this package.

Liquid Light base configuration for Mago

Package info

github.com/lintkit/mago-config

pkg:composer/lintkit/mago-config

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-10-02 13:57 UTC

This package is auto-updated.

Last update: 2026-10-02 13:57:18 UTC


README

Liquid Light base configuration for Mago - the PHP formatter, linter and analyzer

Usage

Install the dependency:

composer require --dev lintkit/mago-config

Add the scripts:

"scripts": {
    "mago": "mago --config vendor/lintkit/mago-config/.mago.toml",
    "mago:analyze": "@mago analyze",
    "mago:dry-run": "@mago:fix --check",
    "mago:fix": "@mago fmt",
    "mago:lint": "@mago lint"
},

PHP version

Mago targets PHP 8.4 by default. If the project sets config.platform.php, pass that version to Mago instead:

"mago": "MAGO_PHP_VERSION=$(composer config platform.php) mago --config vendor/lintkit/mago-config/.mago.toml",

TYPO3

If using LintKit with TYPO3, you can require .typo3.mago.toml instead of .mago.toml. This excludes TYPO3-related directories and allows TYPO3 patterns, such as $GLOBALS['TCA'] and Extbase models with many properties

Baselines

The linter and analyzer read their baselines from a .mago/ directory in the project root. If these don't exist, Mago warns and reports every issue.

Generate them with:

mkdir -p .mago
composer mago:lint -- --generate-baseline
composer mago:analyze -- --generate-baseline

Commit the .mago/ directory.