You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A command-line for the [PHP-Prefixer](https://php-prefixer.com) service. The command calls the **PHP-Prefixer** service using the [REST API](https://php-prefixer.com/docs/rest-api-reference/) to submit a project source code, apply the prefixes, wait and download the results.
10
8
11
-
Clone the project
9
+
**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.
The associated prefixed class declaration, with a new and distinct namespace `ACME`:
24
27
25
-
```bash
26
-
composer update
28
+
```php
29
+
namespace ACME\Carbon;
30
+
31
+
use ACME\Carbon\Exceptions\InvalidDateException;
32
+
use DateInterval;
33
+
use ACME\Symfony\Component\Translation;
34
+
35
+
class Carbon extends DateTime
36
+
{
37
+
const NO_ZERO_DIFF = 01;
38
+
...
27
39
```
28
40
29
-
Run the prefixer service
41
+
## Installation
42
+
43
+
### PHAR
44
+
45
+
The preferred installation method is with the PHP Prefixer CLI PHAR. You can download the latest PHAR from the most recent [Github Releases](https://github.com/PHP-Prefixer/php-prefixer-cli/releases).
46
+
47
+
### Composer
48
+
49
+
You can install PHP-Prefixer CLI globally with Composer:
50
+
51
+
´´´sh
52
+
composer global require php-prefixer/php-prefixer-cli
53
+
´´´
54
+
55
+
## Usage
56
+
57
+
To use the command line, you must create an account on [PHP-Prefixer](https://php-prefixer.com/), and prepare your projects with the prefix definition in the `composer.json` schema.
58
+
59
+
Before using the command line, we recommend checking the documentation and guides here: <https://php-prefixer.com/docs/>
60
+
61
+
The command line requires four parameters, and it can receive an additional parameter:
62
+
63
+
Parameter | Description
64
+
---------|----------
65
+
source-directory * | The project source directory.
66
+
target-directory *| The target directory where the results are stored.
67
+
personal-access-token* | The personal access token, generated on [PHP-Prefixer](https://php-prefixer.com/)/ Settings.
68
+
project-id * | The identification of the configured project on [PHP-Prefixer](https://php-prefixer.com/)/ Projects.
69
+
--github-access-token | An optional GitHub token to access ´composer.json´ dependencies that are managed in private repositories.
If you discover a security vulnerability within this package, please send an email to Graham Campbell at team@php-prefixer.com. All security vulnerabilities will be promptly addressed.
151
+
If you discover a security vulnerability within this package, please send an email to Anibal Sanchez at team@php-prefixer.com. All security vulnerabilities will be promptly addressed.
0 commit comments