psalm/phar
Install Psalm as a standalone PHAR to avoid Composer dependency conflicts. psalm/phar lets you add Psalm to any project or CI environment without pulling in extra packages, keeping your dependency tree clean while still running Psalm reliably.
composer require --dev psalm/phar. This installs Psalm as a PHAR without polluting your project’s Composer dependencies—ideal for avoiding version conflicts with other tools (e.g., PHPStan, PHP CS Fixer).vendor/bin/psalm (or ./vendor/psalm/phar/psalm.phar if PHAR is auto-registered). The first run will scan your codebase and output issues.vendor/bin/psalm --init. This creates psalm.xml to configure error levels, custom stubs, and baseline files../vendor/bin/psalm --output-format=checkstyle > psalm-report.xml to your CI pipeline (e.g., GitHub Actions, GitLab CI) for static analysis reports.vendor/bin/psalm --diff --output-format=diff in a pre-commit hook to prevent introducing new issues.vendor/bin/psalm --set-baseline=psalm-baseline.xml to lock current issues, then incrementally fix them while keeping CI green.composer.json). Do not use in legacy projects running PHP 7.4/8.0—upgrade PHP first or use vimeo/psalm (non-PHAR) instead.vimeo/psalm’s main branch (Psalm now recommends vimeo/psalm via Composer or PHAR download). Verify features like plugin support or PHP 8.2+ syntax parsing in your target Psalm version.psalm.xml). Ensure psalm.xml is in your project root and your autoload-dev is correctly configured (or use --root flag).<stubs>/<plugins> in psalm.xml. PHAR does not auto-detect project plugins unless referenced.composer require handles this, manual downloads may need phar.verify = On in php.ini.How can I help you explore Laravel packages today?