Skip to content

Conversation

@cdosoftei
Copy link

Static methods like Lua::getVersion shouldn't use ZEND_ACC_ALLOW_STATIC but most likely use ZEND_ACC_STATIC. This PR addresses the issue (which otherwise blocks compilation against PHP8)

@cdosoftei
Copy link
Author

PHP8 also requires all function/methods to explicitly declare the argument information, structure, currently it throws some initialization warnings:

PHP Warning:  Missing arginfo for Lua::__construct() in Unknown on line 0

Warning: Missing arginfo for Lua::__construct() in Unknown on line 0
PHP Warning:  Missing arginfo for Lua::getVersion() in Unknown on line 0

Warning: Missing arginfo for Lua::getVersion() in Unknown on line 0
PHP Warning:  Missing arginfo for LuaClosure::__construct() in Unknown on line 0

Warning: Missing arginfo for LuaClosure::__construct() in Unknown on line 0

The second commit of this PR addresses this issue.

@cdosoftei
Copy link
Author

Hi @laruence 👋 just checking whether you had the chance to review this pull request, thanks!

@cmb69
Copy link

cmb69 commented Sep 21, 2021

See also https://bugs.php.net/bug.php?id=81459

@hcodina
Copy link

hcodina commented Oct 11, 2021

Hi,
I needed modifications done in this PR to build your extension against PHP8.
PHP Api Version: 20200930
Zend Module Api No: 20200930
Zend Extension Api No: 420200930

With these modifications, I succeed in building and loading the extension.

# mkdir /etc/php.d
# echo 'extension=lua.so'> /etc/php.d/dbus.ini
# php --ri lua
lua
lua support => enabled
lua extension version => 2.0.7
lua release => Lua 5.3.6
lua copyright => Lua 5.3.6  Copyright (C) 1994-2020 Lua.org, PUC-Rio
lua authors => R. Ierusalimschy, L. H. de Figueiredo, W. Celes
#

Is there any plan to merge this PR ?

Best regards,
Hervé Codina

ldalek pushed a commit to ldalek/buildroot that referenced this pull request Dec 17, 2021
The php-lua package provides a PHP extension that embeds the lua
interpreter and offers an OO-API to lua variables and functions.

https://pecl.php.net/package/lua

Based on initial work from Nicolas Carrier <nicolas.carrier@orolia.com>

Two patches are present and were retrieved from the following
upstream pull request in order to support PHP8:
laruence/php-lua#47

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
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.

3 participants