Skip to content

Commit 81b6911

Browse files
committed
docs(readme): Improve the doc references
1 parent 5a0ef99 commit 81b6911

File tree

2 files changed

+47
-3
lines changed

2 files changed

+47
-3
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,52 @@ It’s super quick to get a [PHP-Prefixer](https://php-prefixer.com/) project up
1818

1919
Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services. For more information, please, visit <https://docs.guzzlephp.org/en/stable/index.html>
2020

21+
## How PHP Prefixing works
22+
23+
[PHP-Prefixer](https://php-prefixer.com/) service works based on the following `composer.json` schema definition:
24+
25+
```json
26+
...
27+
"extra": {
28+
"php-prefixer": {
29+
"project-name": "Using Guzzle in a WordPress plug-in with PHP-Prefixer",
30+
"namespaces-prefix": "PPP",
31+
"global-scope-prefix": "PPP_",
32+
"exclude-paths": [
33+
"bin/"
34+
]
35+
}
36+
},
37+
...
38+
```
39+
40+
This repository has an action `.github/workflows/prefix.yml` to execute the process to prefix the PHP code:
41+
42+
```yml
43+
name: PHP-Prefixer
44+
45+
on: [workflow_dispatch]
46+
47+
jobs:
48+
build:
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v2
54+
55+
- name: Run PHP-Prefixer
56+
uses: PHP-Prefixer/php-prefixer-build-action@main
57+
env:
58+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
with:
60+
personal_access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
61+
project_id: ${{ secrets.PROJECT_ID }}
62+
```
63+
64+
To know more about how PHP-Prefixer service can be configured for a WordPress plug-in, check the following article:
65+
66+
- [New Tutorial: Using PHP Composer in the WordPress Ecosystem](https://blog.php-prefixer.com/2020/10/23/new-tutorial-using-php-composer-in-the-wordpress-ecosystem/)
2167
2268
## References
2369

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"namespaces-prefix": "PPP",
88
"global-scope-prefix": "PPP_",
99
"exclude-paths": [
10-
"bin/",
11-
"doctrine/inflector/docs",
12-
"voku/portable-ascii/build"
10+
"bin/"
1311
]
1412
}
1513
},

0 commit comments

Comments
 (0)