Skip to content

fix(macros): run the ModuleBuilder startup function under #[php_module] - #811

Merged
ptondereau merged 2 commits into
masterfrom
fix/module-builder-startup-function
Oct 10, 2026
Merged

ptondereau merged 2 commits into
masterfrom
fix/module-builder-startup-function

Conversation

@ptondereau

Copy link
Copy Markdown
Member

Description

#[php_module] set its own startup function after the user's builder code, so a function given to ModuleBuilder::startup_function never ran, and the generated MINIT now calls it after the #[php(startup)] one. The guide also documented #[php_module(startup = ...)] while the macro reads #[php(startup = ...)].

Checklist

@codspeed

codspeed Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 45 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 45 untouched benchmarks


Comparing fix/module-builder-startup-function (8c8d93e) with master (1c9a853)

Open in CodSpeed

@coveralls

coveralls commented Oct 9, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 37997613183

Coverage remained the same at 74.503%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 1 coverage regression across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
crates/introspection/src/stub.rs 1 88.46%

Coverage Stats

Coverage Status
Relevant Lines: 14602
Covered Lines: 10879
Line Coverage: 74.5%
Coverage Strength: 53.74 hits per line

💛 - Coveralls

@ptondereau
ptondereau force-pushed the fix/module-builder-startup-function branch from f7b479b to 8c8d93e Compare October 9, 2026 22:09
@ptondereau
ptondereau marked this pull request as ready for review October 10, 2026 04:38
@ptondereau
ptondereau merged commit ebdd099 into master Oct 10, 2026
77 checks passed
@ptondereau
ptondereau deleted the fix/module-builder-startup-function branch October 10, 2026 04:38
@ext-php-rs-release ext-php-rs-release Bot mentioned this pull request Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants