Download the PHP package mfn/phpstan-lost-in-translation without Composer

On this page you can find all versions of the php package mfn/phpstan-lost-in-translation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpstan-lost-in-translation

phpstan-lost-in-translation

Note: this is a fork of https://github.com/jbboehr/phpstan-lost-in-translation

ci License: AGPL v3+ stability-experimental

Installation

To use this extension, require it in Composer:

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include extension.neon in your project's PHPStan config:

Additional Requirements

While there is not a strict requirement, this extension will likely not function as expected without the following extra PHPStan extensions installed:

Features

Type inference

Note that for most of the features below, we can only analyze any potential constant strings in the type of the variable passed into the translation function. This takes advantage of PHPStan's type inference. For example, these should all be able to be analyzed correctly:

Find missing translation strings

Your application's source files will be scanned for calls to the Laravel translator and checked for undefined translation strings. Enabled by default.

If Larastan is installed, there will be better type inference. If Bladestan is installed, it will be possible to inspect blade templates (you probably really want this).

Find unused translations

We can attempt to detect unused translation strings. Disabled by default.

Disallow dynamic translations strings

We can disallow using translations strings that are not statically known. Disabled by default.

Find strings untranslated in the base locale

Missing translation strings in the base locale are not reported as missing. However, some translation strings may still need to be specified even in the base locale. Currently, this check reports untranslated strings in the base locale where the group and translation key are identifiers, where an identifier matches [\w][\w\d]*(?:[_-][\w][\w\d]*)*. For example: group-name.translation-key. Enabled by default

Analyze replacements

Replacements will be analyzed for undesirable behavior. Enabled by default.

Analyze choices

Choices will be analyzed for potentially invalid options. Enabled by default.

Errors in translation files

Errors in translation lines will be logged as well, including parse errors. Enabled by default.

Analyze locales

If an invalid locale is given to a translation function, an error will be emitted. Enabled by default.

If strictLocale is set, it must match, for example, pt_BR. Otherwise, it can also match any of PT_br, pt-br, etc. Disabled by default.

Invalid character encoding

If a translation string is not valid UTF-8, an error will be issued. Enabled by default.

Configuration

References

This project is based on and inspired by coding-socks/lost-in-translation.

License

This project is licensed under the AGPL v3+ License - see the LICENSE.md file for details.


All versions of phpstan-lost-in-translation with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-mbstring Version *
phpstan/phpstan Version ^2.0
salsify/json-streaming-parser Version ^8.3
symfony/finder Version ^7
symfony/intl Version ^7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mfn/phpstan-lost-in-translation contains the following files

Loading the files please wait ...