Skip to content

Commit c37d0ac

Browse files
committed
541: add docs for placeholder replacements
1 parent 109ccdc commit c37d0ac

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/extension-maintainers.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,3 +579,18 @@ jobs:
579579
```
580580
581581
Source: [https://github.com/php/php-windows-builder?tab=readme-ov-file#examples](https://github.com/php/php-windows-builder?tab=readme-ov-file#examples)
582+
583+
## Other features
584+
585+
### Placeholder Replacement
586+
587+
To help backwards compatibility with PECL extensions, PIE supports some automatic placeholder replacements within
588+
all `.c` and .`h` files found within the downloaded source directory. These placeholders are replaced after the
589+
download step, and before the build step. PIE will automatically replace the following placeholders:
590+
591+
| Placeholder | Description | Example |
592+
|-------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
593+
| `@name@`, `@package_name@`, `@package-name@` | The short, internal name of the PHP extension (e.g., `xdebug`). _Note: this is not the Packagist package name (e.g. `xdebug/xdebug`)_. | `xdebug` |
594+
| `@version@`, `@package_version@`, `@package-version@` | The "pretty" version of the package defined in `composer.json`. | `3.3.2` |
595+
| `@release_date@`, `@release-date@` | The formatted release date according to Composer package metadata. | `2024-01-15T10:00:00+00:00` |
596+
| `@php_bin@`, `@php-bin@` | The full path to the PHP binary executable used during the build. | `/usr/bin/php8.4` |

0 commit comments

Comments
 (0)