Download the PHP package php-prefixer/php-prefixer-cli without Composer

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

PHP Prefixer CLI

PHP-Prefixer

MIT License

A command-line for the PHP-Prefixer service.

Blog post announcement: New PHP-Prefixer CLI: Prefix from the Terminal

The PHP-Prefixer service has a command-line (CLI) to use the service locally and process the project source code from your workstation.

The command calls the PHP-Prefixer service using the REST API to submit a project source code, apply the prefixes, wait and download the results.

PHP-Prefixer is a cloud service to apply PHP prefixes to namespaces, functions, helpers, traits, interfaces, etc. Start with a Composer project and a set of dependencies, and prefix all library files at once to generate a consistent prefixed codebase.

Given this sample class declaration:

The associated prefixed class declaration, with a new and distinct namespace ACME:

How to install the CLI?

You can install the CLI using two ways:

1. How to install the PHAR CLI

The preferred installation method is with the PHP Prefixer CLI PHAR. You can download the latest PHAR from the most recent Github Releases. After downloading it, copy the file into a directory on your local path and assign the execution permissions to run the following commands.

2. Install via Composer

Alternatively, you can install PHP-Prefixer CLI globally with Composer:

The source code is available here: https://github.com/PHP-Prefixer/php-prefixer-cli

Usage

To use the CLI, you must create an account on PHP-Prefixer and prepare your projects with the prefix definition in the composer.json schema.

Before using the command-line, we recommend checking the documentation and guides here: https://php-prefixer.com/docs/

The CLI requires four parameters to function, and it can receive an additional parameter for GitHub integration:

Parameter Description
source-directory * The project source directory
target-directory * The target directory where the results are stored
personal-access-token* The personal access token, generated on PHP-Prefixer Settings
project-id * The identification of the configured project on PHP-Prefixer Projects
--github-access-token An optional GitHub token to access ´composer.json´ dependencies that are managed in private repositories

Environment Variables

The CLI supports the definition of the parameters as environment variables in a project .env file.

Documentation

Command-Line Development

If you want to customize the command-line or help us in the development, please, check the following steps:

Step 1: Clone the project:

Step 2: Go to the project directory:

Step 3: Install dependencies:

Step 4: Build the PHAR:

Step 5: To run tests, execute the following command:

Roadmap / Ideas

This roadmap is subject to change and should only be used as a general guideline regarding future releases. As long as a version, feature or application is not yet released, the dates are estimated and could be altered.

Contributing

The current CLI is a starting point to prefix PHP code. If you want to improve the current commmand-line, contributions are always welcome!

See CONTRIBUTING.md for ways to get started.

Security

If you discover a security vulnerability within this package, please email to Anibal Sanchez at [email protected]. We address all security vulnerabilities promptly.

License

MIT

Authors


All versions of php-prefixer-cli with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
guzzlehttp/guzzle Version ^7.0.1
http-interop/http-factory-guzzle Version ^1.0
knplabs/github-api Version ^3.0
laminas/laminas-text Version ^2.8
laravel-zero/framework Version ^8.7
nelexa/zip Version ^4.0
nunomaduro/laravel-desktop-notifier Version ^2.5
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 php-prefixer/php-prefixer-cli contains the following files

Loading the files please wait ....