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

Plugin Laravel Laravel Package

psalm/plugin-laravel

Psalm plugin for Laravel that adds deep framework-aware static analysis plus taint-based security scanning. Detects SQL injection, XSS, SSRF, shell injection, file traversal, and open redirects by tracking user input flows across functions and services.

View on GitHub
Deep Wiki
Context7

title: MissingTranslation parent: Custom Issues nav_order: 5

MissingTranslation

Emitted when __() or trans() references a translation key that does not exist in the application's language files.

Why this is a problem

If the translation key doesn't exist, Laravel returns the key itself as a string instead of the translated text. This silently produces untranslated output at runtime. This check catches typos and missing keys during static analysis.

Examples

// Bad -- typo in the translation key
echo __('mesages.welcome'); // MissingTranslation

// Good -- the key exists in lang/en/messages.php
echo __('messages.welcome');
// Bad -- key was removed from language files
echo trans('auth.old_message'); // MissingTranslation

// Good
echo trans('auth.failed');

How to fix

  1. Check that the translation key exists in your language files (e.g., lang/en/messages.php or lang/en.json)
  2. Fix any typos in the key name
  3. If the translation is provided by a package, use the namespaced syntax (e.g., __('package::file.key')) -- namespaced keys are not checked by this rule

Configuration

This check is disabled by default. Enable it in your psalm.xml:

<plugins>
    <pluginClass class="Psalm\LaravelPlugin\Plugin">
        <findMissingTranslations value="true" />
    </pluginClass>
</plugins>

Limitations

  • Only string literal keys are checked -- dynamic or concatenated keys are skipped
  • Namespaced package keys (e.g., pagination::pages.next) are skipped
  • Only __() and trans() are checked -- trans_choice(), Lang::get(), and Blade [@lang](https://github.com/lang) directives are not detected
  • Uses Laravel's Translator to resolve keys, which respects the configured locale and fallback locale
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport