Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 3 additions & 26 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,9 @@ on:

jobs:

init-php-doc:
name: "Init the php documentation cache"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2.0.0"

- name: "Cache PHP documentation checked out with svn"
id: cache-svn
uses: "actions/cache@v1.0.3"
with:
path: "generator/doc/doc-en"
key: "php-documentation"

- name: "Check out PHP documentation with svn"
if: steps.cache-svn.outputs.cache-hit != 'true'
run: svn co https://svn.php.net/repository/phpdoc/modules/doc-en doc-en
working-directory: "generator/doc"

continuous-integration:
name: "Continuous Integration"

needs: init-php-doc
runs-on: "ubuntu-latest"

strategy:
Expand All @@ -52,12 +32,9 @@ jobs:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"

- name: "Cache PHP documentation checked out with svn"
id: cache-svn
uses: "actions/cache@v1.0.3"
with:
path: "generator/doc/doc-en"
key: "php-documentation"
- name: "Check out PHP documentation with git"
run: sh update.sh
working-directory: "generator/doc"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1.0.3"
Expand Down
16 changes: 7 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ Safe-PHP code is generated automatically from the PHP doc.

## How to install Safe-PHP development environment

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

```bash
$ cd generator/doc
$ svn co https://svn.php.net/repository/phpdoc/modules/doc-en doc-en
$ cd ../..
$ sh update.sh
```

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

```bash
$ cd generator/doc/doc-en
$ svn update
```
https://github.com/salathe/phpdoc-base

https://github.com/php/doc-en

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

Expand Down
11 changes: 11 additions & 0 deletions generator/doc/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if [ ! -d "doc-en" ]; then
mkdir doc-en
cd doc-en
git clone https://github.com/salathe/phpdoc-base doc-base
git clone https://github.com/php/doc-en en
else
cd doc-en/en
git pull
cd ../doc-base
git pull
fi