Skip to content

Conversation

@dunglas
Copy link
Member

@dunglas dunglas commented Nov 23, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a crash that occurred when a string was passed as the topics parameter to the mercure_publish() function. The fix corrects the type handling in the Go implementation to properly extract string values from PHP's zval structures.

Key changes:

  • Updated the go_mercure_publish function signature to use proper C types (*C.zend_string) for string parameters
  • Fixed the string topic extraction from zval structures using the established pattern from the codebase
  • Added comprehensive tests covering both string and array cases for the topics parameter

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
mercure.go Fixed function signature and type conversions; corrected zval string extraction for topics parameter
mercure_test.go Added new test cases for mercure_publish with both module and worker modes
testdata/mercure-publish.php Added test data demonstrating both string and array topic parameters
frankenphp_test.go Extended test framework to support per-request options needed for Mercure hub configuration
testdata/flush.php Removed extraneous blank line

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dunglas dunglas merged commit 911e6d1 into main Nov 23, 2025
31 checks passed
@dunglas dunglas deleted the fix/mercure-publish branch November 23, 2025 16:03
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