Howdy guys
Le 17/09/2017 à 20:15, François Kooman a écrit :
Hi,
Currently php-libsodium 1.x (no longer maintained upstream) is packaged
for EPEL and all releases of Fedora. This version makes the libsodium
calls available with the \Sodium namespace. This will be changed when
PHP 7.2 is released and the calls will use sodium_ instead of the
namespace.
A php-libsodium 2.x library is available (maintained), only available
for PHP >= 7.0 that also uses the sodium_ convention.
This extension is only for PHP 7.0 / 7.1.
Ideally we'd have a polyfill that takes care of these cases.
There is
one, but not sufficient for the EPEL/Fedora case [1]. It rewrites the
\Sodium calls to the PHP 7.2 calls, which only works with
php-libsodium-2.x which is not packaged.
I'm thinking of writing my own polyfill that will expose \Sodium and try
to fallback to sodium_ if available or just "forward" to \Sodium calls
if not.
What do you guys think? Is there any path to update to php-libsodium 2.x
in Fedora or is the plan to wait it out for PHP 7.2? I assume PHP 7.2
will be part of RHEL 8, so that would take care of that problem as well ;)
The package is already ready in my repository
https://git.remirepo.net/cgit/rpms/php/pecl/php-pecl-libsodium2.git/tree/
If you think it can help, I can submit it for Fedora (25-27),
BTW, I will have to retire it in F28 with PHP 7.2 (which have the
php-sodium package, bug from main php-src)
Reminder, PHP 7.2 packages are already available (so testable) in my
repository [1]
Remi
[1]
https://blog.remirepo.net/post/2017/08/31/PHP-on-the-road-to-the-7.2.0-re...
Cheers,
François
[1]
https://github.com/mollie/polyfill-libsodium
_______________________________________________
php-devel mailing list -- php-devel(a)lists.fedoraproject.org
To unsubscribe send an email to php-devel-leave(a)lists.fedoraproject.org