lintkit / mago-config
Liquid Light base configuration for Mago
Requires
- carthage-software/mago: ^1.50
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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.