Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to run part of the test suite #1690

Merged
merged 1 commit into from
Sep 24, 2024
Merged
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: 10 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ php --ri mongodb
## Generating arginfo from stub files

Arginfo structures are generated from stub files using the `gen_stub.php`
file. Note that this requires `phpize` to be run for PHP 8.2 to make use
file. Note that this requires `phpize` to be run for **PHP 8.2** to make use
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this read PHP 8.2+? Locally, I've been running this with PHP 8.3 for some time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With PHP 8.3, generated files are different: #1687 (comment)

Copy link
Member

@jmikola jmikola Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it only PHP 8.3's gen_stub.php that has the optimization to re-use arginfo for methods? It's not clear to me what you used in that PR.

I'll note that workflows/arginfo-files.yml uses PHP 8.2, so no objections to requiring that here. If PHP 8.3 actually generates different output, I suppose CI would fail.

of all features. After changing a stub file, run `./build/gen_stub.php`
to regenerate the corresponding arginfo files and commit the results.

Expand All @@ -44,6 +44,15 @@ when using this extension. To generate the function map, run the

## Testing

The driver includes a test suite that can be run with `make test`. To run a single
test file, define the `TESTS` variable with the file path:

```
make test TESTS=tests/<path-to-test-file>.phpt
```

### File format

The extension's test use the PHPT format from PHP internals. This format is
documented in the following links:

Expand Down