Skip to content
Closed
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
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ We use [phpDocumentor](https://www.phpdoc.org/) to generate API documentation.
**Please make sure your new or modified code is covered by proper PHPDoc comments.**
Good documentation ensures that contributors and users can easily read and understand how the methods and classes work.

**When to regenerate documentation:**
Whenever you add or modify PHPDoc comments in your code, you must regenerate the documentation and commit the changes. The documentation files in the `docs/` directory are part of the repository and must be kept in sync with the code. If you don't regenerate and commit the docs, the CI check will fail.

To generate documentation locally, make sure phpDocumentor is installed, then run:

```
$ wget https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.8.1/phpDocumentor.phar
$ php phpDocumentor.phar run -d src -t docs
$ composer docs
```

## Contributor license agreement
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"md": "phpmd --ignore-violations-on-exit src/constants,src/laravel,src/parser,examples/EchoBot/src,examples/EchoBot/public,examples/KitchenSink/src,examples/KitchenSink/public text phpmd.xml",
"stan": "phpstan analyse",
"copyright": "tools/check_copyright.sh",
"docs": "php phpDocumentor.phar run -d src -t docs",
"check": [
"@test",
"@cs",
Expand Down