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
11 changes: 6 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ jobs:
php-version: ${{ matrix.php-version }}
coverage: none

- name: Install
- name: Install Node dependencies
run: npm ci

- name: Setup Environment
run: |
composer install --no-interaction --no-security-blocking
npm run setup
- name: Install Composer dependencies
run: composer install --no-interaction --no-security-blocking

- name: Setup test environment
run: npm run test:phpunit:setup

- name: Test
run: npm run test
5 changes: 4 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"testsEnvironment": false,
"phpVersion": "7.4",
"plugins": [
".",
"https://downloads.wordpress.org/plugin/posts-to-posts.latest-stable.zip"
]
],
"port": 8888
}
10 changes: 10 additions & 0 deletions .wp-env.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"testsEnvironment": false,
"phpVersion": "7.4",
"plugins": [
".",
"https://downloads.wordpress.org/plugin/posts-to-posts.latest-stable.zip"
],
"port": 8889
}
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,49 @@ WP-Parser is the parser for creating the new code reference at [developer.wordpr

We are currently looking for contributors to help us complete the work on the parser.

There is a guide to developing for developer.wordpress.org in the [WordPress documentation handbook](https://make.wordpress.org/docs/handbook/projects/devhub/)
There is a guide to developing for developer.wordpress.org in the [WordPress documentation handbook](https://make.wordpress.org/docs/handbook/projects/devhub/).

## Requirements
* PHP 7.4+
* [Composer](https://getcomposer.org/)
* [WP CLI](https://wp-cli.org/)

Clone the repository into your WordPress plugins directory:
## Development

Clone the repository and set up the development environment:

```bash
git clone https://github.com/WordPress/phpdoc-parser.git
cd phpdoc-parser
npm ci
composer install
npm run setup
```

After that install the dependencies using composer in the parser directory:
WordPress is available at <http://localhost:8888>.

## Tests

For a test-only setup:

```bash
composer install
npm run test:phpunit:setup
npm test
```

## Running
If the development environment was set up with `npm run setup`, only `npm test` is needed.

## Running the parser

Activate the plugin first:

wp plugin activate phpdoc-parser
```bash
wp plugin activate phpdoc-parser
```

In your site's directory:

wp parser create /path/to/source/code --user=<id|login>
```bash
wp parser create /path/to/source/code --user=<id|login>
```
Loading
Loading