Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Psalm Tester

Psalm Tester Laravel Package

alies-dev/psalm-tester

Run Psalm static analysis tests using .phpt fixtures. Define PHP code plus expected output (or EXPECTF), pass custom Psalm CLI args per tester or per test, and conditionally skip tests via SKIPIF. Integrates easily with PHPUnit test suites.

View on GitHub
Deep Wiki
Context7

Test Psalm via phpt files!

Frequently asked questions about Psalm Tester
How do I install alies-dev/psalm-tester in a Laravel project?
Run `composer require alies-dev/psalm-tester` in your project root. Ensure Psalm (v5+) is installed separately via `composer require vimeo/psalm`. The package provides a CLI command (`psalm-tester`) that integrates with Laravel’s existing testing workflow.
Does this package work with Laravel’s Pest or PHPUnit?
Yes, it’s designed to work alongside Pest or PHPUnit. You can run Psalm tests via the `psalm-tester` command in your test suite or CI pipeline, just like any other test command. It outputs results in a format compatible with both frameworks.
What Laravel versions does alies-dev/psalm-tester support?
The package is framework-agnostic but optimized for Laravel 9+. It leverages PHP 8.1+ features and works with any Laravel version that supports Psalm (v5+). Check the package’s `composer.json` for PHP version requirements.
Can I use this to enforce Psalm rules in CI without blocking merges?
Yes, configure the package to output structured results (JSON/CLI) and use CI conditions to fail builds only on critical issues. For example, GitHub Actions can parse Psalm errors and add them as annotations without blocking PRs.
How do I configure Psalm for project-specific rules in Laravel?
Create a `psalm.xml` file in your project root to define custom rules (e.g., stricter checks for `app/` or `app/Http`). The package respects project-local configurations, so you can exclude vendor directories or focus analysis on specific paths.
Will this slow down my CI pipeline? How can I optimize it?
Psalm can be slow for large codebases, but you can mitigate this by using Psalm’s `--init` flag for incremental analysis or caching results in CI (e.g., GitHub Actions cache). Parallelize runs if your CI supports it.
What if Psalm gives false positives in my Laravel app?
Start with `--no-cache` to refine rules incrementally, then compare results against your baseline. Use the package’s test assertions to validate expected behavior—treat it like unit tests for static analysis.
Is there a way to integrate Psalm test results with Laravel’s error tracking (e.g., Sentry)?
Yes, the package outputs structured results (JSON/CLI) that can be parsed and forwarded to Sentry or other monitoring tools. Use CI scripts to transform Psalm errors into Sentry events or Slack alerts.
What’s the difference between this and running Psalm directly via CLI?
This package automates Psalm testing in a Laravel-friendly way—it validates expected issues or clean runs via test assertions, integrates with Pest/PHPUnit, and handles CI output formatting. Running Psalm directly lacks these test-driven workflows.
How do I handle Psalm version updates without breaking my Laravel project?
Pin Psalm’s version in `composer.json` to avoid surprises. Use the package’s test suite to validate Psalm behavior after updates, and gradually adjust `psalm.xml` rules if breaking changes occur.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor