Download the PHP package piotrpress/composer-formatter without Composer

On this page you can find all versions of the php package piotrpress/composer-formatter. 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 composer-formatter

Composer Formatter

This Composer plugin formats (sorts and normalizes) composer.json and other JSON files according to defined rules.

It provides composer format command for formatting and checking files, as well as reusable GitHub Workflows for automated formatting in CI/CD pipelines.

Installation

Install the plugin as a development dependency in your project:

Usage

Arguments

Options

Example

Configuration

Formatting rules can be defined via --format|-f option or composer.json under the extra.format key. Format option always takes precedence over JSON key.

Configuration options

Default configuration

Custom order configuration

The order option accepts an object where each key is a dot-notation path or glob pattern pointing to a section of JSON file, and the value defines the sorting behavior for that section:

Wildcard * in the path matches any array index (e.g. authors.* applies rules to every item in the authors array).

Example

GitHub Workflows

This plugin also comes with two GitHub Reusable Workflows that can be used to automatically check and fix formatting of JSON files in your project on GitHub:

and additionally two ready-to-use workflow files that utilize the above reusable workflows to check and fix formatting of composer.json file in your project:

Options for format.yml reusable workflow

Custom example usage of format.yml in your workflow

Options for check.yml reusable workflow

Custom example usage of check.yml in your workflow

Recommendations

  1. Install the plugin as a separate tool in your project:

  2. Add a script to project's composer.json file for easy access:

Requirements

License

MIT


All versions of composer-formatter with dependencies

PHP Build Version
Package Version
Requires composer-plugin-api Version ^2.0
php Version >=8.2
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 piotrpress/composer-formatter contains the following files

Loading the files please wait ...