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

Laravel Psalm plugin for deep static analysis plus taint-based security scanning. Detects SQL injection, XSS, SSRF, shell injection, path traversal, and open redirects by tracking user input through Laravel code without running it.

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.
codraw/entity-migrator
codraw/doctrine-extra
codraw/aws-tool-kit
codraw/validator
codraw/workflow
codraw/open-api
codraw/cron-job
codraw/process
codraw/log
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony