Open cdosoftei opened 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.
Hi @laruence :wave: just checking whether you had the chance to review this pull request, thanks!
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
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)