Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/arginfo-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- "feature/*"

env:
PHP_VERSION: "8.2"
PHP_VERSION: "8.5"

jobs:
check-arginfo:
Expand Down
11 changes: 8 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ $ 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
of all features. After changing a stub file, run `./build/gen_stub.php`
to regenerate the corresponding arginfo files and commit the results.
file. After changing a stub file, run `./build/gen_stub.php` to regenerate the
corresponding arginfo files and commit the results.

The `gen_stub.php` file is added to the `build` directory when calling `phpize`.
Arginfo structures are generated with the latest version of PHP. The
`@generate-legacy-arginfo` directive ensures that the generated files are
compatible with the indicated version of PHP. When bumping the minimum PHP
requirement, this directive needs to be updated accordingly.

## Generating function maps for static analysis tools

Expand Down
2 changes: 1 addition & 1 deletion src/BSON/Binary.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @generate-class-entries static
* @generate-function-entries static
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
4 changes: 2 additions & 2 deletions src/BSON/BinaryInterface.stub.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

/**
* @generate-class-entries static
* @generate-function-entries
* @generate-class-entries
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When using gen_stub.php from PHP 8.5, I noticed that using static with generate-class-entries for interfaces causes invalid files. Haven't yet had time to investigate, but since we're not generating an PHP_METHOD entries we can omit the static keyword for interfaces.

* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
22 changes: 16 additions & 6 deletions src/BSON/BinaryInterface_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/BSON/Binary_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/BSON/DBPointer.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @generate-class-entries static
* @generate-function-entries static
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
8 changes: 5 additions & 3 deletions src/BSON/DBPointer_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/BSON/Decimal128.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @generate-class-entries static
* @generate-function-entries static
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
4 changes: 2 additions & 2 deletions src/BSON/Decimal128Interface.stub.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

/**
* @generate-class-entries static
* @generate-function-entries
* @generate-class-entries
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
10 changes: 6 additions & 4 deletions src/BSON/Decimal128Interface_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/BSON/Decimal128_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/BSON/Document.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @generate-class-entries static
* @generate-function-entries static
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
8 changes: 5 additions & 3 deletions src/BSON/Document_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/BSON/Int64.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @generate-class-entries static
* @generate-function-entries static
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
8 changes: 5 additions & 3 deletions src/BSON/Int64_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/BSON/Iterator.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @generate-class-entries static
* @generate-function-entries static
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
8 changes: 5 additions & 3 deletions src/BSON/Iterator_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/BSON/Javascript.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* @generate-class-entries static
* @generate-function-entries static
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
4 changes: 2 additions & 2 deletions src/BSON/JavascriptInterface.stub.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

/**
* @generate-class-entries static
* @generate-function-entries
* @generate-class-entries
* @generate-legacy-arginfo 80100
*/

namespace MongoDB\BSON;
Expand Down
Loading
Loading