Download the PHP package zeerats/laravel-lang-lint without Composer

On this page you can find all versions of the php package zeerats/laravel-lang-lint. 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 laravel-lang-lint

Laravel Lang Lint

Latest version on Packagist Tests

Artisan commands that keep PHP language files in sync with the code that uses them.

Command What it does Exit status
lang:check Reports keys used in the source code that a language file does not define. 1 when keys are missing
lang:unused Reports keys in the language files that no code uses. --prune removes them. 1 when keys are unused and not pruned
lang:format Rewrites language files with sorted keys in one consistent style. --check only verifies. 1 when --check finds unformatted files

The commands never prompt. Files change only when you pass --prune or run lang:format without --check, so the commands are safe in git hooks, CI pipelines and any other non-interactive shell.

Invalid options or configuration, such as a locale without a directory, produce a one-line error and exit status 2.

Requirements

Installation

Publish the configuration file when the defaults do not fit your project:

Usage

Missing translations

A key is missing when at least one locale does not define it. --show-locations adds a column with the files and lines that use each key.

Unused translations

Without --prune the command lists the unused keys with the locales that define them and exits with status 1. With --prune it removes the keys and rewrites the affected files in the canonical style described below. Parents that a removal leaves empty are removed as well.

Formatting

lang:format rewrites every language file of the selected locales in one canonical style:

--check reports the files that would change and exits with status 1, which makes it a formatting gate for CI. --prune removes unused keys in the same pass.

Options shared by all commands

Option Effect
--path=app --path=routes Scan these directories instead of the configured paths. Relative to the base path.
--locale=en --locale=de Work on these locales instead of every discovered one.

Configuration

config/lang-lint.php:

assume_used covers two situations: keys the framework reads itself, such as validation messages, and keys your code builds at runtime, such as __("statuses.{$status}"). Both are never reported as unused and never pruned. Keys that appear literally in the code are still checked for missing translations.

How keys are detected

Continuous integration

GitLab CI:

GitHub Actions:

A pre-commit hook can run the same two commands.

Development

This runs PHPStan, Pint, Pest's type coverage and the test suite.

Changelog

See CHANGELOG.md.

License

MIT, see LICENSE.md.


All versions of laravel-lang-lint with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/collections Version ^12.0||^13.0
illuminate/console Version ^12.0||^13.0
illuminate/contracts Version ^12.0||^13.0
illuminate/support Version ^12.0||^13.0
symfony/finder Version ^7.2||^8.0
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 zeerats/laravel-lang-lint contains the following files

Loading the files please wait ...