laruence / php-lua

This extension embeds the lua interpreter and offers an OO-API to lua variables and functions.
http://pecl.php.net/package/lua
Other
149 stars 50 forks source link

ZEND_ACC_ALLOW_STATIC -> ZEND_ACC_STATIC for static method #47

Open cdosoftei opened 4 years ago

cdosoftei commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

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

cmb69 commented 3 years ago

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

hcodina commented 3 years ago

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