You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Don't forget to set the `GEN_STUB_SCRIPT` environment variable to the path of the `gen_stub.php` file in the PHP sources you downloaded earlier. This is the same `gen_stub.php` script mentioned in the manual implementation section.
589
589
590
-
If everything went well, a new directory named `build` should have been created. This directory contains the generated files for your extension, including the `my_extension.go` file with the generated PHP function stubs.
590
+
If everything went well, your project directory should contain the following files for your extension:
591
+
592
+
-**`my_extension.go`** - Your original source file (remains unchanged)
593
+
-**`my_extension_generated.go`** - Generated file with CGO wrappers that call your functions
594
+
-**`my_extension.stub.php`** - PHP stub file for IDE autocompletion
595
+
-**`my_extension_arginfo.h`** - PHP argument information
596
+
-**`my_extension.h`** - C header file
597
+
-**`my_extension.c`** - C implementation file
598
+
-**`README.md`** - Documentation
599
+
600
+
> [!IMPORTANT]
601
+
> **Your source file (`my_extension.go`) is never modified.** The generator creates a separate `_generated.go` file containing CGO wrappers that call your original functions. This means you can safely version control your source file without worrying about generated code polluting it.
591
602
592
603
### Integrating the Generated Extension into FrankenPHP
0 commit comments