Skip to content

Commit 541b37f

Browse files
authored
Merge pull request #199 from Kharhamel/githubDoc
now use git instead of svn to get the doc
2 parents dd1e053 + d4c4935 commit 541b37f

File tree

3 files changed

+21
-35
lines changed

3 files changed

+21
-35
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,9 @@ on:
88

99
jobs:
1010

11-
init-php-doc:
12-
name: "Init the php documentation cache"
13-
runs-on: "ubuntu-latest"
14-
steps:
15-
- name: "Checkout"
16-
uses: "actions/[email protected]"
17-
18-
- name: "Cache PHP documentation checked out with svn"
19-
id: cache-svn
20-
uses: "actions/[email protected]"
21-
with:
22-
path: "generator/doc/doc-en"
23-
key: "php-documentation"
24-
25-
- name: "Check out PHP documentation with svn"
26-
if: steps.cache-svn.outputs.cache-hit != 'true'
27-
run: svn co https://svn.php.net/repository/phpdoc/modules/doc-en doc-en
28-
working-directory: "generator/doc"
29-
3011
continuous-integration:
3112
name: "Continuous Integration"
3213

33-
needs: init-php-doc
3414
runs-on: "ubuntu-latest"
3515

3616
strategy:
@@ -52,12 +32,9 @@ jobs:
5232
coverage: "pcov"
5333
php-version: "${{ matrix.php-version }}"
5434

55-
- name: "Cache PHP documentation checked out with svn"
56-
id: cache-svn
57-
uses: "actions/[email protected]"
58-
with:
59-
path: "generator/doc/doc-en"
60-
key: "php-documentation"
35+
- name: "Check out PHP documentation with git"
36+
run: sh update.sh
37+
working-directory: "generator/doc"
6138

6239
- name: "Cache dependencies installed with composer"
6340
uses: "actions/[email protected]"

CONTRIBUTING.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,19 @@ Safe-PHP code is generated automatically from the PHP doc.
44

55
## How to install Safe-PHP development environment
66

7-
The first step is to download the PHP documentation project locally.
8-
You will need Subversion (svn) installed on your computer.
7+
The first step is to download the PHP documentation project locally, using git.
98

109
```bash
1110
$ cd generator/doc
12-
$ svn co https://svn.php.net/repository/phpdoc/modules/doc-en doc-en
13-
$ cd ../..
11+
$ sh update.sh
1412
```
1513

16-
At any point, if you want to update the documentation to the latest version, you can use:
14+
The script can be used to both install the doc and to update it.
15+
All it does is pull from theses mirrors:
1716

18-
```bash
19-
$ cd generator/doc/doc-en
20-
$ svn update
21-
```
17+
https://github.com/salathe/phpdoc-base
18+
19+
https://github.com/php/doc-en
2220

2321
To use the generator, you need to make sure you installed all the needed dependencies:
2422

generator/doc/update.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if [ ! -d "doc-en" ]; then
2+
mkdir doc-en
3+
cd doc-en
4+
git clone https://github.com/salathe/phpdoc-base doc-base
5+
git clone https://github.com/php/doc-en en
6+
else
7+
cd doc-en/en
8+
git pull
9+
cd ../doc-base
10+
git pull
11+
fi

0 commit comments

Comments
 (0)