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
Copy file name to clipboardExpand all lines: README.md
+33-27Lines changed: 33 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ A command-line for the [PHP-Prefixer](https://php-prefixer.com) service.
8
8
9
9
**Blog post announcement**: [New PHP-Prefixer CLI: Prefix from the Terminal](https://blog.php-prefixer.com/2021/06/12/new-php-prefixer-cli-prefix-from-the-terminal/)
10
10
11
-
The [PHP-Prefixer](https://php-prefixer.com) service has a commandline to use the service locally and process the project source code from your workstation.
11
+
The [PHP-Prefixer](https://php-prefixer.com) service has a command-line (CLI) to use the service locally and process the project source code from your workstation.
12
12
13
13
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.
14
14
@@ -44,38 +44,42 @@ class Carbon extends DateTime
44
44
...
45
45
```
46
46
47
-
## Installation
47
+
## How to install the CLI?
48
48
49
-
### PHAR
49
+
You can install the CLI using two ways:
50
+
51
+
### 1. How to install the PHAR CLI
50
52
51
53
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). After downloading it, copy the file into a directory on your local path.
52
54
53
-
### Composer
55
+
### 2. Install via Composer
54
56
55
57
Alternatively, you can install **PHP-Prefixer CLI** globally with Composer:
56
58
57
59
```sh
58
60
composer global require php-prefixer/php-prefixer-cli
59
61
```
60
62
63
+
The source code is available here: <https://github.com/PHP-Prefixer/php-prefixer-cli>
64
+
61
65
## Usage
62
66
63
-
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.
67
+
To use the CLI, 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.
64
68
65
-
Before using the commandline, we recommend checking the documentation and guides here: <https://php-prefixer.com/docs/>
69
+
Before using the command-line, we recommend checking the documentation and guides here: <https://php-prefixer.com/docs/>
66
70
67
-
The command line requires four parameters, and it can receive an additional parameter for GitHub integration:
71
+
The CLI requires four parameters to function, and it can receive an additional parameter for GitHub integration:
68
72
69
73
Parameter | Description
70
74
---------|----------
71
-
source-directory * | The project source directory.
72
-
target-directory *| The target directory where the results are stored.
73
-
personal-access-token* | The personal access token, generated on [PHP-Prefixer](https://php-prefixer.com/)/ Settings.
74
-
project-id * | The identification of the configured project on [PHP-Prefixer](https://php-prefixer.com/)/ Projects.
75
-
--github-access-token | An optional GitHub token to access ´composer.json´ dependencies that are managed in private repositories.
75
+
source-directory * | The project source directory
76
+
target-directory *| The target directory where the results are stored
77
+
personal-access-token* | The personal access token, generated on [PHP-Prefixer](https://php-prefixer.com/) Settings
78
+
project-id * | The identification of the configured project on [PHP-Prefixer](https://php-prefixer.com/) Projects
79
+
--github-access-token | An optional GitHub token to access ´composer.json´ dependencies that are managed in private repositories
76
80
77
81
```bash
78
-
# Sample commandline
82
+
# Sample command-line
79
83
php-prefixer-cli prefix \
80
84
\
81
85
/sample/acme_project \
@@ -91,7 +95,7 @@ php-prefixer-cli prefix \
91
95
92
96
### Environment Variables
93
97
94
-
The command line supports the definition of the parameters as environment variables in a project `.env` file.
98
+
The CLI supports the definition of the parameters as environment variables in a project `.env` file.
Step 5: To run tests, execute the following command:
150
154
151
155
```bash
152
156
phpunit
153
157
```
154
158
155
-
## TO-DO
159
+
## Roadmap / Ideas
160
+
161
+
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.
156
162
157
163
- Parameter to exclude directories from ZIP, `--exclude`
158
164
159
165
## Contributing
160
166
161
-
Contributions are always welcome!
167
+
The current CLI is a starting point to prefix PHP code. If you want to improve the current commmand-line, contributions are always welcome!
162
168
163
-
See `CONTRIBUTING.md` for ways to get started.
169
+
See [CONTRIBUTING.md](https://github.com/PHP-Prefixer/php-prefixer-cli/blob/main/CONTRIBUTING.md) for ways to get started.
164
170
165
171
## Security
166
172
167
-
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.
173
+
If you discover a security vulnerability within this package, please email to Anibal Sanchez at team@php-prefixer.com. We address all security vulnerabilities promptly.
0 commit comments