Skip to content

Conversation

@dunglas
Copy link
Member

@dunglas dunglas commented Jun 17, 2025

@withinboredom
Copy link
Member

image

this is gonna take awhile...

Comment on lines +18 to +20
// EXPERIMENTAL: PHPString converts a Go string to a zend_string with copy. The string can be
// non-persistent (automatically freed after the request by the ZMM) or persistent. If you choose
// the second mode, it is your repsonsability to free the allocated memory.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also important to note that while persistent strings can be used across requests, they should not be used across threads. To be able to use a string across multiple threads, it also needs to be 'interned' to avoid refcounting entirely like here

@alexandre-daubois
Copy link
Member

Here is the docs PR: #1652

@dunglas
Copy link
Member Author

dunglas commented Jun 19, 2025

The CI failure looks related to a change in SPC. Do you know what we're doing wrong @henderkes @crazywhalecc? It looks like we pass the --build-embed flag as usual.

@crazywhalecc
Copy link
Contributor

Seems that making --build-embed as optional causes this error. Workaround: move --build-embed at the end of command. I didn't expect that passing the parameter as InputOption::OPTIONAL would cause the extensions to be recognized as a value, maybe I need to revert the previous PR or find another way to avoid it being read as a value.

@henderkes
Copy link
Contributor

henderkes commented Jun 20, 2025

should be fixed now, we reverted to a boolean flag

for some reason, the framework we used for option parsing defaults --build-embed to null, rather than true, like it does without a value to pass.

dunglas and others added 14 commits June 24, 2025 16:52
* feat: add helpers to create PHP extensions

* cs

* feat: GoString

* test

* add test for RegisterExtension

* cs

* optimize includes

* fix
* feat(extensions): add the PHP extension generator

* unexport many types

* unexport more symbols

* cleanup some tests

* unexport more symbols

* fix

* revert types files

* revert

* add better validation and fix templates

* remove GoStringCopy

* small fixes

---------

Co-authored-by: Kévin Dunglas <kevin@dunglas.fr>
@dunglas dunglas merged commit abfd893 into main Jun 25, 2025
58 checks passed
@dunglas dunglas deleted the ext branch June 25, 2025 08:18
@alexandre-daubois
Copy link
Member

🎉

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.

7 participants