Skip to content

fix(observer): register the hooks again when the SAPI restarts the module - #809

Merged
ptondereau merged 5 commits into
masterfrom
fix/observer-module-restart
Oct 9, 2026
Merged

ptondereau merged 5 commits into
masterfrom
fix/observer-module-restart

Conversation

@ptondereau

@ptondereau ptondereau commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Description

Follow-up to #807: since a SAPI restart resets the engine's observer lists and exception hook, the fcall, error and exception observers now register their hooks again on every MINIT with the same instance, instead of going silent after the first restart. It also restores RefUnwindSafe on ClassMetadata, lost in #807 and the reason #810 plans 0.17.0, uses release/acquire ordering for the class entry pointer and documents that class entries are valid only until the module shuts down.

Checklist

@coveralls

coveralls commented Oct 8, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 37858687091

Warning

No base build found for commit baa0a7c on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 74.488%

Details

  • Patch coverage: 4 uncovered changes across 2 files (28 of 32 lines covered, 87.5%).

Uncovered Changes

File Changed Covered %
src/zend/exception_observer.rs 15 12 80.0%
src/class.rs 9 8 88.89%
Total (4 files) 32 28 87.5%

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 14605
Covered Lines: 10879
Line Coverage: 74.49%
Coverage Strength: 53.62 hits per line

💛 - Coveralls

@codspeed

codspeed Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 45 untouched benchmarks


Comparing fix/observer-module-restart (1a8fee0) with master (baa0a7c)

Open in CodSpeed

@ptondereau
ptondereau force-pushed the fix/observer-module-restart branch from 3726b81 to 1a8fee0 Compare October 8, 2026 23:18
@ptondereau
ptondereau marked this pull request as ready for review October 9, 2026 06:28
@ptondereau
ptondereau merged commit 2cea97f into master Oct 9, 2026
76 checks passed
@ptondereau
ptondereau deleted the fix/observer-module-restart branch October 9, 2026 06:28
@ext-php-rs-release ext-php-rs-release Bot mentioned this pull request Oct 9, 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