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.
Download php-prefixer/php-prefixer-cli
More information about php-prefixer/php-prefixer-cli
Files in php-prefixer/php-prefixer-cli
Package php-prefixer-cli
Short Description A command-line for the PHP-Prefixer service.
License MIT
Homepage http://php-prefixer.com/
Informations about the package php-prefixer-cli
PHP Prefixer CLI
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.
- Parameter to exclude directories from ZIP,
--exclude
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
Authors
- Aníbal Sánchez
- PHP-Prefixer, Desarrollos Inteligentes Virtuales, SL.
All versions of php-prefixer-cli with dependencies
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