Repository navigation
Conversation
Add the Lua 5.1 static library package (`lua51`, installing `liblua5.1.a`, `include/lua5.1/`, and `lua5.1.pc`) and the `ext-luasandbox` PHP extension package for Linux and Darwin, along with a smoke test. Builds Lua with `-DLUA_USE_POSIX` and patches `config.m4` for in-tree static PHP builds.
henderkes
reviewed
Dec 4, 2026
henderkes
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, but have you tested that this works? I tried once with Scribunto and it complained that lua 5.1 had to be installed on the system even if the extension was present. But that was a while ago and I didn't really investigate...
crazywhalecc
approved these changes
Dec 5, 2026
|
StaticPHP Test Bot Detected: Extensions: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Closes #1319.
Adds the Lua 5.1 static library (
lua51) and theext-luasandboxPHP extension for Linux and Darwin:config/pkg/lib/lua51.yml&src/Package/Library/lua51.php: fetches Lua 5.1 viafilelist, buildsliblua5.1.awith-DLUA_USE_POSIX(avoidingdlopen/-ldlon static Linux musl and deprecateddyldon macOS), and installsinclude/lua5.1/andlua5.1.pc. Namedlua51withliblua5.1.aso a future Lua 5.4+ package can coexist without collisions.config/pkg/ext/ext-luasandbox.yml&src/Package/Extension/luasandbox.php: enablesext-luasandbox(arg-type: with, depending onlua51) and patchesconfig.m4beforebuildconffor in-tree static builds (m4_include([m4/pkg.m4])andPHP_ADD_MAKEFILE_FRAGMENT).src/globals/ext-tests/luasandbox.php: smoke test exercisingLuaSandboxmemory limit and Lua execution.Source note:
ext-luasandbox.ymlcurrently usestype: git(rev: master) because the latest tagged release (4.1.4) predates configure-time POSIX timer detection for macOS (8171f57e) and--with-luasandbox(6bbba545). Once Wikimedia tags the next release (T446458), we can switch this toghtagtarorpie.Testing:
spc build:php-cli luasandbox(PHP 8.5.13) on macOS arm64 and Linux x86_64 musl (ZigToolchain), includingext-tests/luasandbox.php..phptsuite (26/26 passed, includingtimer.phptandprofiler.phpt) andsetCPULimit()runtime enforcement on Linux x86_64 musl.Checklist before merging
*.phpor*.yml, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:lint-config