Remi's RPM repository - Blog - DéveloppementRemi's RPM repository blog Information about RPM PHP Fedora RHEL and CentOS2024-03-28T14:46:28+01:00Remi Colleturn:md5:04ca934806743f3bda12513f927cafa9DotclearPHP extensions status with upcoming PHP 8.0urn:md5:821db5cc300434159a71f0aaed4860de2020-09-21T08:13:00+02:002021-02-12T16:10:44+01:00RemiDéveloppement<p>With <strong><a class="ref-post" href="https://blog.remirepo.net/post/2020/09/12/PHP-on-the-road-to-the-8.0.0-release">PHP 8.0</a></strong> entering stabilization phase, time to check the status of most commonly used PHP extensions (at least, the ones available in my repository).</p>
<p>Here is the (mostly) exhaustive list.</p> <h2>1. Compatible</h2>
<p>The last published version is compatible</p>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="16%">Name</th>
<th width="16%">Version</th>
<th style="text-align: center;" width="7%">RPM</th>
<th width="58%">State</th>
</tr>
</thead>
<tbody>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/apcu">apcu</a></td>
<td><strong>5.1.18</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/apfd">apfd</a></td>
<td><strong>1.0.2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ast">ast</a></td>
<td><strong>1.0.10</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/base58">base58</a></td>
<td><strong>0.1.4</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/bitset">bitset</a></td>
<td><strong>3.0.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-brotli/">brotli</a></td>
<td><strong>0.11.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/componere">componere</a></td>
<td><strong>3.1.2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/couchbase">couchbase</a></td>
<td><strong>3.0.5</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/couchbase/php-couchbase/pull/31">PR #31</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/csv">csv</a></td>
<td><strong>0.3.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/datadog_trace">datadog_trace</a></td>
<td><strong>0.49.0</strong></td>
<td style="text-align: center;">☑</td>
<td>Provided for <strong>testing only</strong> and not intended for use on production</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/dbase">dbase</a></td>
<td><strong>7.1.0RC2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed upstream by <a href="https://svn.php.net/viewvc?view=revision&revision=350634">rev 350634</a>, <a href="https://svn.php.net/viewvc?view=revision&revision=350637">rev 350637</a> <a href="https://svn.php.net/viewvc?view=revision&revision=350638">rev 350638</a> <a href="https://svn.php.net/viewvc?view=revision&revision=350639">rev 350639</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/dio">dio</a></td>
<td><strong>0.1.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ds">ds</a></td>
<td><strong>1.3.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ev">ev</a></td>
<td><strong>1.1.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/event">event</a></td>
<td><strong>3.0.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gearman">gearman</a></td>
<td><strong>2.1.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/geospatial">geospatial</a></td>
<td><strong>0.3.1</strong></td>
<td style="text-align: center;">☑</td>
<td>Was fixed byt <a href="https://github.com/php-geospatial/geospatial/pull/27">PR #27</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gmagick">gmagick</a></td>
<td><strong>2.0.6RC1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/grpc">grpc</a></td>
<td><strong>1.34.0RC1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/handlebars">handlebars</a></td>
<td><strong>0.9.2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/pecl_http">http</a></td>
<td><strong>4.0.0beta1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/igbinary">igbinary</a></td>
<td><strong>3.1.5</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/inotify">inotify</a></td>
<td><strong>3.0.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ip2location">ip2location</a></td>
<td><strong>8.1.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/9">PR #9</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/ip2proxy">ip2proxy</a></td>
<td><strong>3.0.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/json_post">json_post</a></td>
<td><strong>1.0.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/krb5">krb5</a></td>
<td><strong>1.1.5</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-lz4">lz4</a></td>
<td><strong>0.3.7</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed upstream and by <a href="https://github.com/kjdev/php-ext-lz4/pull/26">PR #26</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/lzf">lzf</a></td>
<td><strong>1.6.8</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mailparse">mailparse</a></td>
<td><strong>3.1.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/maxmind/MaxMind-DB-Reader-php">maxminddb</a></td>
<td><strong>1.8.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/maxmind/MaxMind-DB-Reader-php/pull/108">PR #108</a> and <a href="https://github.com/maxmind/MaxMind-DB-Reader-php/pull/109">PR #109</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mcrypt">mcrypt</a></td>
<td><strong>1.0.4</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, but seriously, please <a href="https://blog.remirepo.net/post/2015/07/07/About-libmcrypt-and-php-mcrypt">avoid it</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/memcache">memcache</a></td>
<td><strong>8.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/memprof">memprof</a></td>
<td><strong>2.1.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mongodb">mongodb</a></td>
<td><strong>1.9.0RC1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/msgpack">msgpack</a></td>
<td><strong>2.1.2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/msgpack/msgpack-php/pull/148">PR #148</a> and by upstream</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mustache">mustache</a></td>
<td><strong>0.9.2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mysqlnd_azure">mysqlnd_azure</a></td>
<td><strong>1.1.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/oauth">oauth</a></td>
<td><strong>2.0.7</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/orng">orng</a></td>
<td><strong>0.0.2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/parle">parle</a></td>
<td><strong>0.8.2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/weltling/parle/pull/17">PR #17</a> and <a href="https://github.com/weltling/parle/pull/22">PR #22</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/pcov">pcov</a></td>
<td><strong>1.0.6</strong></td>
<td style="text-align: center;">☑</td>
<td>OK (test suite is fixed upstream)</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/goodspb/pdlib">pdlib</a></td>
<td><strong>1.0.2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, test suite fixed by <a href="https://github.com/maxmind/MaxMind-DB-Reader-php/pull/109">PR #37</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/nrk/phpiredis">phpiredis</a></td>
<td><strong>1.0.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/pq">pq</a></td>
<td><strong>2.1.8</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/protobuf">protobuf</a></td>
<td><strong>3.13.0.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK - Notice <strong>3.14.0 </strong>is no more compatible</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/psr">psr</a></td>
<td><strong>1.0.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/jbboehr/php-psr/pull/77">PR #77</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/raphf">raphf</a></td>
<td><strong>2.0.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/rar">rar</a></td>
<td><strong>4.2.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/Whissi/realpath_turbo">realpath_turbo</a></td>
<td><strong>2.0.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/redis">redis</a></td>
<td><strong>5.3.2RC1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/rpminfo">rpminfo</a></td>
<td><strong>0.5.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/runkit7">runkit7</a></td>
<td><strong>4.0.0a1</strong></td>
<td style="text-align: center;">☑</td>
<td>this extension's support for php 8 is still incomplete and experimental</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/scoutapm">scoutapm</a></td>
<td><strong>1.2.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/seaslog">seaslog</a></td>
<td><strong>2.2.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/selinux">selinux</a></td>
<td><strong>0.5.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/skywalking">skywalking</a></td>
<td><strong>4.1.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/SkyAPM/SkyAPM-php-sdk/pull/276">PR #276</a> and <a href="https://github.com/SkyAPM/SkyAPM-php-sdk/pull/294">PR #294</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/smbclient">smbclient</a></td>
<td><strong>1.0.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/eduardok/libsmbclient-php/pull/73">PR #73</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-snappy">snappy</a></td>
<td><strong>0.1.12</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/jvoisin/snuffleupagus">snuffleupagus</a></td>
<td><strong>0.7.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/solr">solr</a></td>
<td><strong>2.5.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/sqlsrv">sqlsrv</a></td>
<td><strong>5.9.0preview1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/swoole">swoole</a></td>
<td><strong>4.5.5</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed upstream and by <a href="https://github.com/swoole/swoole-src/pull/3713">PR #3713</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/trader">trader</a></td>
<td><strong>0.5.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/translit">translit</a></td>
<td><strong>0.7.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/derickr/pecl-translit/pull/8">PR #8</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/uuid">uuid</a></td>
<td><strong>1.1.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/varnish">varnish</a></td>
<td><strong>1.2.6</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/vips">vips</a></td>
<td><strong>1.0.12</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/vld">vld</a></td>
<td><strong>0.17.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, was fixed by <a href="https://github.com/derickr/vld/pull/70">PR #70</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xattr">xattr</a></td>
<td><strong>1.4.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xdebug">xdebug</a></td>
<td><strong>3.0.0beta1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xhprof">xhprof</a></td>
<td><strong>2.2.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xlswriter">xlswriter</a></td>
<td><strong>1.3.7</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xmldiff">xmldiff</a></td>
<td><strong>1.1.3</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/xmlrpc">xmlrpc</a></td>
<td><strong>1.0.0RC1</strong></td>
<td style="text-align: center;">☑</td>
<td>The extension is unbundled from php-src as of PHP 8.0.0, because the underlying libxmlrpc has obviously been abandoned. It is recommended to reevaluate using this extension.</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/yac">yac</a></td>
<td><strong>2.3.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/yaf">yaf</a></td>
<td><strong>3.3.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/yaml">yaml</a></td>
<td><strong>2.2.0b2</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/yar">yar</a></td>
<td><strong>2.2.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/phalcon/php-zephir-parser">zephir_parser</a></td>
<td><strong>1.3.4</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/zip">zip</a></td>
<td><strong>1.19.1</strong></td>
<td style="text-align: center;">☑</td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-zstd">zstd</a></td>
<td><strong>0.9.0</strong></td>
<td style="text-align: center;">☑</td>
<td>OK, test suite fixed by <a href="https://github.com/kjdev/php-ext-zstd/pull/35">PR #35</a></td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>2. Work in progress</h2>
<p>These extensions have been fixed upstream (or PR are available) but no official release.</p>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="16%">Name</th>
<th width="16%">Version</th>
<th style="text-align: center;" width="7%">RPM</th>
<th width="58%">State</th>
</tr>
</thead>
<tbody>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ahocorasick">ahocorasick</a></td>
<td><strong>0.0.7</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/ph4r05/php_aho_corasick/pull/22">PR #22</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/amqp">amqp</a></td>
<td><strong>1.10.21</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/php-amqp/php-amqp/pull/383">PR #383</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/env">env</a></td>
<td><strong>0.2.1</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/beberlei/env/pull/10">PR # 10</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/fann">fann</a></td>
<td><strong>1.1.1</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/bukka/php-fann/pull/42">PR #42</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/geoip">geoip</a></td>
<td><strong>1.1.1</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed upstream by <a href="https://svn.php.net/viewvc?view=revision&revision=351082">rev 351082</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/geos">geos</a></td>
<td><strong>1.0.0</strong></td>
<td style="text-align: center;">☑</td>
<td>See <a href="https://git.osgeo.org/gitea/geos/php-geos/issues/20">#20</a>, <a href="https://git.osgeo.org/gitea/geos/php-geos/issues/24">#24</a>, <a href="https://git.osgeo.org/gitea/geos/php-geos/issues/25">#25</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/hdr_histogram">hdr_histogram</a></td>
<td><strong>0.4.2</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed byt <a href="https://github.com/beberlei/hdrhistogram-php/pull/13">PR #13</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/http_message">http_message</a></td>
<td><strong>0.2.2</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/improved-php-library/http-message/pull/3">PR #3</a> and <a href="https://github.com/improved-php-library/http-message/pull/4">PR #4</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/imagick">imagick</a></td>
<td><strong>3.4.4</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed upstream and by <a href="https://github.com/Imagick/imagick/pull/346">PR #346</a>, <a href="https://github.com/Imagick/imagick/pull/347">PR #347</a>, <a href="https://github.com/Imagick/imagick/pull/348">PR #348</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/leveldb">leveldb</a></td>
<td><strong>0.2.1</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/reeze/php-leveldb/pull/40">PR #40</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://libvirt.org/php/">libvirt</a></td>
<td><strong>0.5.5</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed in <a href="https://github.com/remicollet/libvirt-php/commits/issue-php8">PHP 8 branch</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/memcached">memcached</a></td>
<td><strong>3.1.5</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/php-memcached-dev/php-memcached/pull/463">PR #463</a> and <a href="https://github.com/php-memcached-dev/php-memcached/pull/465">PR #465</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/parallel">parallel</a></td>
<td><strong>1.1.4</strong></td>
<td style="text-align: center;"> </td>
<td>WIP upstream</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/rdkafka">rdkafka</a></td>
<td><strong>4.0.3</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/arnaud-lb/php-rdkafka/pull/383">PR #383</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/rrd">rrd</a></td>
<td><strong>2.0.1</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed upstream by <a href="https://svn.php.net/viewvc?view=revision&revision=350618">rev 350618</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/scrypt">scrypt</a></td>
<td><strong>1.4.2</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/DomBlack/php-scrypt/pull/56">PR #56</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ssdeep">ssdeep</a></td>
<td><strong>1.1.0</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/php/pecl-text-ssdeep/pull/2">PR #2</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ssh2">ssh2</a></td>
<td><strong>1.2</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/php/pecl-networking-ssh2/pull/44">PR #44</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/stomp">stomp</a></td>
<td><strong>2.0.5</strong></td>
<td style="text-align: center;"> </td>
<td>Fixed by <a href="https://github.com/php/pecl-tools-stomp/pull/14">PR #14</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/sync">sync</a></td>
<td><strong>1.1.1</strong></td>
<td style="text-align: center;"> </td>
<td>Fixed by <a href="https://github.com/php/pecl-system-sync/pull/1">PR #1</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/wddx">wddx</a></td>
<td><strong>1.0.0-dev</strong></td>
<td style="text-align: center;">☑</td>
<td>Dropped from 7.4, fixed upstream but no release planed</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/xdiff">xdiff</a></td>
<td><strong>2.0.1</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/php/pecl-text-xdiff/pull/5">PR #5</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xxtea">xxtea</a></td>
<td><strong>1.0.11</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed upstream</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/yaconf">yaconf</a></td>
<td><strong>1.1.0</strong></td>
<td style="text-align: center;">☑</td>
<td>Test suite fixed by <a href="https://github.com/laruence/yaconf/pull/63">PR #63</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/yaz">yaz</a></td>
<td><strong>1.2.3</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed by <a href="https://github.com/indexdata/phpyaz/pull/11">PR #11</a></td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/zmq">zmq</a></td>
<td><strong>1.1.3</strong></td>
<td style="text-align: center;">☑</td>
<td>Fixed buf <a href="https://github.com/zeromq/php-zmq/pull/216">PR #216</a></td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>3. Not compatible for now (only from 7.4 compatible extensions)</h2>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
</thead>
<tbody>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/apcu_bc">apcu_bc</a></td>
<td><strong>1.0.5</strong></td>
<td><strong>No more supported</strong></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://www.ioncube.com/loaders.php">ioncube_loader</a></td>
<td><strong>10.3.4</strong></td>
<td>Not supported yet</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mysql_xdevapi">mysql_xdevapi</a></td>
<td><strong>8.0.22</strong></td>
<td>Not supported yet</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/propro">propro</a></td>
<td><strong>2.1.0</strong></td>
<td><strong>No more supported</strong>, ZE API has been removed in 8</td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>4. Not tested yet</h2>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
</thead>
<tbody>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/cassandra">cassandra</a></td>
<td><strong>1.3.2</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/cmark">cmark</a></td>
<td><strong>1.2.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/crypto">crypto</a></td>
<td><strong>0.3.1</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/decimal">decimal</a></td>
<td><strong>2.0.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/druid">druid</a></td>
<td><strong>1.0.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/eio">eio</a></td>
<td><strong>2.0.4</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gender">gender</a></td>
<td><strong>1.1.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gnupg">gnupg</a></td>
<td><strong>1.4.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://www.horde.org/">horde_lz4</a></td>
<td><strong>1.0.10</strong></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/hprose">hprose</a></td>
<td><strong>1.8.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/hrtime">hrtime</a></td>
<td><strong>0.6.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ice">ice</a></td>
<td><strong>1.6.2</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/interbase">interbase</a></td>
<td><strong>1.0.0-dev</strong></td>
<td>Dropped from 7.4</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://libvirt.org/php/">libvirt</a></td>
<td><strong>0.5.5</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/lua">lua</a></td>
<td><strong>2.0.7</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/luasandbox">luasandbox</a></td>
<td><strong>3.0.3</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mogilefs">mogilefs</a></td>
<td><strong>0.9.3.1</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mosquitto">mosquitto</a></td>
<td><strong>0.4.0</strong></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/mysql">mysql</a></td>
<td><strong>1.0.0-dev</strong></td>
<td>Dropped from 7.0, never released</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/nsq">nsq</a></td>
<td><strong>3.5.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/opencensus">opencensus</a></td>
<td><strong>0.2.2</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/pcs">pcs</a></td>
<td><strong>1.3.7</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://phalconphp.com/en/">phalcon</a></td>
<td><strong>4.0.6</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/php_trie">php_trie</a></td>
<td><strong>0.1.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/tony2001/pinba_extension">pinba</a></td>
<td><strong>1.1.2</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/pdflib">pdflib</a></td>
<td><strong>4.1.2</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/radius">radius</a></td>
<td><strong>1.4.0b1</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/recode">recode</a></td>
<td><strong>1.0.0-dev</strong></td>
<td>Dropped from 7.4, no release planed</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/sandbox">sandbox</a></td>
<td><strong>0.1.3</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/seasclick">seasclick</a></td>
<td><strong>0.1.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://pecl.php.net/package/sphinx">sphinx</a></td>
<td><strong>1.4.0-dev</strong></td>
<td>still pending for 7.0</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/stats">stats</a></td>
<td><strong>2.0.3</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/svm">svm</a></td>
<td><strong>0.2.3</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/svn">svn</a></td>
<td><strong>2.0.3</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/taint">taint</a></td>
<td><strong>2.1.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/tcpwrap">tcpwrap</a></td>
<td><strong>1.2.0</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/termbox">termbox</a></td>
<td><strong>0.1.3</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/timecop">timecop</a></td>
<td><strong>1.2.10</strong></td>
<td>Some failed tests since 7.2 (related to timelib changes), dead project ?</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/uopz">uopz</a></td>
<td><strong>6.1.2</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/uploadprogress" hreflang="en">uploadprogress</a></td>
<td><strong>1.1.3</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/uv">uv</a></td>
<td><strong>0.2.4</strong></td>
<td> </td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/zookeeper">zookeeper</a></td>
<td><strong>0.7.2</strong></td>
<td> </td>
</tr>
</tbody>
</table>
<h2>5. Conclusion</h2>
<ul>
<li>Sept 21th: beta4 is released and have nearly final API, so really time to start fixing extensions</li>
<li>Oct 1st: Release Candidate 1 is released</li>
<li>Oct 15th: RC2 is released, nearly 50% of extensions are compatible, quite good.</li>
<li>Nov 27th; PHP 8 is Released!</li>
</ul>
<p><strong>Please</strong> ping me by mail or on twitter for missing/outdated information.</p>
<p> </p>
<p><em>Last updated on <strong>February 12th 2021</strong></em></p>Changes in zip extension version 1.18urn:md5:8262345eccc32a2c22f16431404feec42020-03-16T15:10:00+01:002020-03-16T15:38:45+01:00RemiDéveloppementPHP<p>The <a href="https://www.php.net/zip">zip</a> extension version <strong>1.18.0</strong> has been released.</p>
<p> </p> <p>For memory</p>
<ul>
<li>PHP <strong>7.2 to 7.4</strong> provide version <strong>1.15</strong></li>
<li>PHP <strong>8.0</strong> will provide version <strong>1.18</strong></li>
<li>The extension from PECL provides the latest versions on all PHP versions and is also used on some Linux distributions (Fedora, RHEL and CentOS 8) and of course, for users of my repository.</li>
</ul>
<p>This extension uses the <a href="https://libzip.org/">libzip</a> library which has received a lot of enhancements in recent versions.</p>
<p>So, I thought it is useful to refresh this extension, to take benefit of new features.</p>
<h2>Version 1.16</h2>
<p>Store of the <strong>modification time</strong> of a file using the <a href="https://www.php.net/manual/en/ziparchive.setmtimeindex.php">ZipArchive::setMtimeIndex</a> and <a href="https://www.php.net/manual/en/ziparchive.setmtimename.php">ZipArchive::setMtimeName</a> methods. Mostly useful when content is directly added (not from a file).</p>
<p>Support of <strong>XZ</strong> compression. This requires version ≥ 1.6 of the library with the proper build option enabled.</p>
<h2>Version 1.17</h2>
<p>Support of save progression, using a callback: <a href="https://www.php.net/manual/en/ziparchive.registerprogresscallback.php">ZipArchive::registerProgressCallback</a>. This requires version ≥ 1.3 of the library.</p>
<p>Support of save cancellation, using a callback: <a href="https://www.php.net/manual/en/ziparchive.registercancelcallback.php">ZipArchive::registerCancelCallback</a>. This requires version ≥ 1.6 of the library.</p>
<p>An archive can now be open in read only mode. This requires version ≥ 1.0 of the library.</p>
<h2>Version 1.18</h2>
<p>New <strong>flags</strong> parameter for <a href="https://www.php.net/manual/en/ziparchive.addemptydir.php">ZipArchive::addEmptyDir</a>, <a href="https://www.php.net/manual/en/ziparchive.addfile.php">ZipArchive::addFile</a> and <a href="https://www.php.net/manual/en/ziparchive.addfromstring.php">ZipArchive::addFromString</a> methods. This option allows managing character encoding of the entry names and replacement of existing entries.</p>
<p>New <strong>flags</strong> in the <strong>options</strong> array passed to <a href="https://www.php.net/manual/en/ziparchive.addglob.php">ZipArchive::addGlob</a> and <a href="https://www.php.net/manual/en/ziparchive.addpattern.php">ZipArchive::addPattern</a> methods.</p>
<p>New <a href="https://www.php.net/manual/en/ziparchive.replacefile.php">ZipArchive::replaceFile</a> method which allows replacing an entry content, without changing its name.</p>
<p>New <a href="https://www.php.net/manual/en/class.ziparchive.php#ziparchive.props.lastid">lastId</a> property which gives the index of the last added entry, and thus avoids a search for additional actions (comment, attributes, ...).</p>
<p>The <a href="https://www.php.net/manual/en/class.ziparchive.php#ziparchive.props.status">status</a>, <a href="https://www.php.net/manual/en/class.ziparchive.php#ziparchive.props.statussys">statusSys</a> properties and the <a href="https://www.php.net/manual/en/ziparchive.getstatusstring.php">ZipArchive::getStatusString</a> method are now available after the archive is closed, allowing checking the reason for some possible error.</p>
<h2>Conclusion</h2>
<p>I think that all these changes bring <strong>meaningful improvement </strong>to the extension features.</p>
<p>A quite complete <strong>example</strong> is available in the sources repository: <a href="https://github.com/pierrejoye/php_zip/blob/master/examples/zipcmd.php">zipcmd.php</a>.</p>
<p><strong>Documentation</strong> is already updated.</p>
<h2>Future</h2>
<p>I will continue to follow closely changes in the <strong>libzip</strong> library so we can quickly take the benefits of new features.</p>
<p>I'm waiting for upstream feedback on <a href="https://github.com/nih-at/libzip/pull/152">change proposal</a> which will allow knowing which optional features are available (encryption, compression).</p>
<p>I'm also thinking about <strong>file permissions</strong> storage and restoration, sadly current API doesn't seem designed for this, especially for directories. I'm also afraid of possible security issues using specially crafted archives. This management still quite easy using the <a href="https://www.php.net/manual/en/ziparchive.setexternalattributesname.php">ZipArchive::setExternalAttributesName</a> and <a href="https://www.php.net/manual/en/ziparchive.getexternalattributesindex.php">ZipArchive::getExternalAttributesIndex</a> methods(see the code example).</p>Changements dans l'extension zip version 1.18urn:md5:17548113e1cbccc828231c4a66cc6eb42020-03-16T13:37:00+01:002020-03-16T15:17:26+01:00RemiDéveloppementPHP<p>L'extension <a href="https://www.php.net/zip">zip</a> version <strong>1.18.0</strong> vient d'être publiée.</p>
<p> </p> <p>Pour mémoire</p>
<ul>
<li>PHP <strong>7.2 à 7.4</strong> fournissent la version <strong>1.15</strong></li>
<li>PHP <strong>8.0</strong> fournira la version <strong>1.18</strong></li>
<li>L'extension PECL permet de disposer des dernières versions sur toutes les versions de PHP, et elle est aussi disponible sur certaines distributions (Fedora, RHEL et CentOS 8) et bien sur pour les utilisateurs de mon dépôt.</li>
</ul>
<p>Cette extension utilise la bibliothèque <a href="https://libzip.org/">libzip</a> qui a reçu de nombreuses améliorations dans les versions récentes.</p>
<p>J'ai donc trouvé nécessaire d'actualiser l'extension pour tirer bénéfices de ces nouveautés.</p>
<h2>Version 1.16</h2>
<p>Enregistrement de la <strong>date de modification </strong>d'un fichier à l'aide des fonctions <a href="https://www.php.net/manual/fr/ziparchive.setmtimeindex.php">ZipArchive::setMtimeIndex</a> et <a href="https://www.php.net/manual/fr/ziparchive.setmtimename.php">ZipArchive::setMtimeName</a>. Surtout utile lorsqu'on ajoute du contenu directement (pas à partir d'un fichier).</p>
<p>Gestion de la compression <strong>XZ</strong>. Nécessite la bibliothèque en version ≥ 1.6 avec l'option activée.</p>
<h2>Version 1.17</h2>
<p>Gestion d'une fonction de rappel pour gérer la progression de l'enregistrement de l'archive: <a href="https://www.php.net/manual/fr/ziparchive.registerprogresscallback.php">ZipArchive::registerProgressCallback</a>. Nécessite la bibliothèque en version ≥ 1.3.</p>
<p>Gestion d'une fonction de rappel pour gérer l'annulation de l'enregistrement de l'archive; <a href="https://www.php.net/manual/fr/ziparchive.registercancelcallback.php">ZipArchive::registerCancelCallback</a>. Nécessite la bibliothèque en version ≥ 1.6.</p>
<p>Ouverture possible en mode lecture seule. Nécessite la bibliothèque en version ≥ 1.0.</p>
<h2>Version 1.18</h2>
<p>Ajout d'un paramètre <strong>flags</strong> aux méthodes <a href="https://www.php.net/manual/fr/ziparchive.addemptydir.php">ZipArchive::addEmptyDir</a>, <a href="https://www.php.net/manual/fr/ziparchive.addfile.php">ZipArchive::addFile</a> et <a href="https://www.php.net/manual/fr/ziparchive.addfromstring.php">ZipArchive::addFromString</a>. Cette option permet de gérer plus finement l'encodage des caractères des noms, et le replacement.</p>
<p>Ajout de l'entrée <strong>flags</strong> au tableau d'<strong>options</strong> passé aux méthodes <a href="https://www.php.net/manual/fr/ziparchive.addglob.php">ZipArchive::addGlob</a> et <a href="https://www.php.net/manual/fr/ziparchive.addpattern.php">ZipArchive::addPattern</a>.</p>
<p>Ajout de la méthode <a href="https://www.php.net/manual/fr/ziparchive.replacefile.php">ZipArchive::replaceFile</a> pour modifier le contenu d'une entrée sans changer son nom.</p>
<p>Ajout de la propriété <a href="https://www.php.net/manual/fr/class.ziparchive.php#ziparchive.props.lastid">lastId</a> qui indique l'index de la dernière entrée ajoutée, évitant de devoir faire une recherche pour effectuer d'autres opérations (commentaire, attributs, ...).</p>
<p>Les propriétés <a href="https://www.php.net/manual/fr/class.ziparchive.php#ziparchive.props.status">status</a>, <a href="https://www.php.net/manual/fr/class.ziparchive.php#ziparchive.props.statussys">statusSys</a> et la méthode <a href="https://www.php.net/manual/fr/ziparchive.getstatusstring.php">ZipArchive::getStatusString</a> sont désormais disponible après la fermeture d'une archive, permettant de connaitre la raison d'une eventuelle erreur.</p>
<h2>Conclusion</h2>
<p>Je pense que ces nombreuses modifications apportent une <strong>amélioration</strong> <strong>significative</strong> des fonctionnalités de cette extension.</p>
<p>Un <strong>exemple</strong> assez complet est disponible dans le dépôt des sources: <a href="https://github.com/pierrejoye/php_zip/blob/master/examples/zipcmd.php">zipcmd.php</a>.</p>
<p>Le <strong>documentation</strong> est déjà totalement actualisée.</p>
<h2>Avenir</h2>
<p>Je vais continuer à suivre de près les évolutions de la bibliothèque <strong>libzip</strong> afin de tirer rapidement les bénéfices de ses évolutions.</p>
<p>J'attends des retours sur une <a href="https://github.com/nih-at/libzip/pull/152">proposition d'évolution</a> qui permettrait de connaitre les <strong>fonctions optionnelles</strong> disponibles (cryptage, compression).</p>
<p>Je réfléchi aussi à la sauvegarde et la restauration des <strong>droits des fichiers</strong>, malheureusement l'API actuelle ne me semble pas adaptée, en particulier pour les répertoires. Je crains aussi que la restauration des droits puissent être exploitée pour des attaques de sécurité, à partir d'archives spécialement créées. Cette gestion reste facilement accessible à l'aide des méthodes <a href="https://www.php.net/manual/fr/ziparchive.setexternalattributesname.php">ZipArchive::setExternalAttributesName</a> et <a href="https://www.php.net/manual/fr/ziparchive.getexternalattributesindex.php">ZipArchive::getExternalAttributesIndex</a> (voir leur exemples).</p>"rpminfo" php extensionurn:md5:b8622923bd1bafc5c5d8a3467288976a2020-03-13T13:59:00+01:002020-03-13T15:23:52+01:00RemiDéveloppementPHPRPM<p>I'm used to write <strong>scripts using PHP</strong>, of course, this is the language I know the best.</p>
<p>But I had a lot of needs requiring parsing system command output, and <a href="https://www.php.net/exec">exec</a> is evil.</p>
<p>So I create a new extension <a href="https://blog.remirepo.net/post/2020/03/13/J'ai donc commencé">rpminfo</a> providing bindings for the <a href="http://ftp.rpm.org/api/4.15.1/">librpm</a> library API. This extension is designed to provide simple functions, a low-level API, that PHP code can take advantage of.</p>
<p>After the recent developments done, I just released <strong>version 0.4.0</strong> which can be considered as <strong>stable</strong>, even if the API still can evolve before version 1.0.0.</p> <p>Here are some samples of its usage.</p>
<h2>Versions comparison :</h2>
<pre>
$ rpmdev-vercmp 2.0.14-22.el7_0 2.0.14.1-35.el7_6
2.0.14-22.el7_0 < 2.0.14.1-35.el7_6</pre>
<pre>
php > var_dump(rpmvercmp('2.0.14-22.el7_0', '2.0.14.1-35.el7_6'));
int(-1)</pre>
<h2>Information about a package / file:</h2>
<pre>
$ rpm -qp remi-release-32.rpm
remi-release-32-1.fc32.remi.noarch
</pre>
<pre>
php > print_r(rpminfo("remi-release-32.rpm"));
Array
(
[Name] => remi-release
[Version] => 32
[Release] => 1.fc32.remi
[Summary] => Configuration for remi repository
[Arch] => noarch
)</pre>
<p><strong>With more details</strong></p>
<pre>
$ rpm -qip remi-release-32.rpm
Name : remi-release
Version : 32
Release : 1.fc32.remi
Architecture: noarch
...
</pre>
<pre>
php > print_r(rpminfo("remi-release-32.rpm", true));
Array
(
[Headeri18ntable] => Array
(
[0] => C
[1] => fr
)
[Sigsize] => 16816
[Sigpgp] => 89024604000108003016210434c10bdbcc6f1b252e50ba1a0714919e4c21a80805025e4a9fc7121c72656d694072656d697265706f2e6e6574000a09100714919e4c21a8084b950ffd1f8a2d25ea7561679beb7b78aca25da793b193b83fab23e48547d128b87114a80878f57321813b53cb45891730000533978f5c7c5342fd155767abfdc178ae99f9560a8789550fef143e24533dd068a7b6d32f9238609c4ac20d3f42e0d073c4230a3716a9a4273961f97c4731f199f092b6fb19a403058165c148d35c894f910a13808d0f317c8f93ed17bacbba2dc3a30623380f771253b4efcd6ef53d225e3fb32162d320bae520815fa135d357198c2fc9069dbbb4630ac2ee844c3be5ef825d93223d11eb3dd13606d4aedbd8bcb791c54cf6ca22205732a40b3a0b2108bdadcaee185f38c7782505cac2fa4bef0ca609dc0dc280bb53d5190f310e79f5fd0dd7929779b9c041eea3966573d26f588453105046cb9ab068ca32d0deb761104091fd291722cf5c8987d488149f02f1f6843b66603acb47a7abde32632368bfb77ddbfa609c7308708ca1e4455eab6e556de9e2e82e8b21c5ed54dc18565a535f73232d84d469ed6d1aa9d2fb5fc7f404d5631abea99c0e1e3c0b4e986615ec6c77779adf4a4fc0c24c835ce3a1fd03f63ef26f547bfca96d928a38c7701d60c8b2f204a487297407e8831c341c85034e0cc02f8a1282c5b2ee47ddf8bec7e9bdd6d79d8490758c871cd57d5ad6b6cb4859955ef3e13b75f2880106c1b6162fb237256bef2bd48521e5d728e18f06ad35eabdf2f3065e00c8cd1465d87d9d
[Sigmd5] => 86dc03cedbebcc9a8a334763d642685a
[Rsaheader] => 89024604000108003016210434c10bdbcc6f1b252e50ba1a0714919e4c21a80805025e4a9fc7121c72656d694072656d697265706f2e6e6574000a09100714919e4c21a808011a1000adfcd097e0268ebcbe71cb07059fcc1a2dd7fd48d6ad9526eede3dedc8c3ac9401681df0e2b43c9a6a5719b4b9490190159bad149c2acb40aa8cb9f07c294f599885ab046c605f5ad783c7a366d87c5e5d315415b812e97a2a7e615cea80f0b3b94fecb47f5cdf738ee1337e590f5f72c32a0d978ee2ad75cf220b67e7d54c096bb20c7012eb12d5a7827cffb2d4b4b71ea21753139ac3850fd5c56f876fb91754c9e69aacbe963b85d2a03be605cd35d9af64b4ac2781681fbfac56a224c7d57bb1e26bc3a6c3f98d2cc4057e29713756061f7db075841446e1a44ea35a278e64c4b562bfd4dff990fdfc7cf0b82148a0c61dfed3f3de2f199328d41c840078dca321978bee267b969574f98e946c13f14ee061a26b036253ea0f6f6036e8e0e289b0b7aebc87395477d40b2b0e7a84ed50e20552145b91168696392687dcd8e03a97317cd0047eb96689f59953adc4a1c9834f56498311110ab06789b269298ddc32a304e529be6bb8fb338ef91cecf48b146148da3b68f52f5dfbb14c73291fc02faf5c8427348fb105df23b38734e0d84c21ebccf0f39ecea363ddbf60543db419f93504e14a839f2243bb5b9f09be28a94c163f8a5e157546c431fddfe7c20fa86ec9729709eb8df7ef60003ea623ae1bd6421c02b98f329db827c3cc5447842f67ae23e49ba1d6118cb9a55b93f9bfb8bc3c46f3e465c5d537e1d13b20
[Sha1header] => c528cb3308e69a4b9baa9a1e23a6541b06254f0a
[Sha256header] => 9494000c44cf0665d12395631c21a90e4a44c4b7f37a8b3b1bbc798a0b99e1dd
[Name] => remi-release
[Version] => 32
[Release] => 1.fc32.remi
...
[Payloaddigestalgo] => 8
[IsSource] =>
)
</pre>
<p>Lot of available fields (all those retrieved by the library API).</p>
<h2>Information about an installed package:</h2>
<pre>
$ rpm -q kernel-5.5.8
kernel-5.5.8-200.fc31.x86_64</pre>
<pre>
php > print_r(rpmdbinfo("kernel-5.5.8"));
Array
(
[0] => Array
(
[Name] => kernel
[Version] => 5.5.8
[Release] => 200.fc31
[Summary] => The Linux kernel
[Arch] => x86_64
)
)</pre>
<p><strong>Name</strong> or <strong>name-version</strong> or <strong>name-version-release</strong> can be used</p>
<h3>Search:</h3>
<p><strong>By name</strong></p>
<pre>
$ rpm -qa \*redis\*
redis-6.0~RC2-1.fc31.remi.x86_64
php-pecl-redis5-5.2.0-1.fc31.remi.7.3.x86_64</pre>
<pre>
php > print_r(rpmdbsearch("*redis*", RPMTAG_NAME, RPMMIRE_GLOB));
Array
(
[1] => Array
(
[Name] => redis
[Version] => 6.0~RC2
[Release] => 1.fc31.remi
[Summary] => A persistent key-value database
[Arch] => x86_64
)
[2] => Array
(
[Name] => php-pecl-redis5
[Version] => 5.2.0
[Release] => 1.fc31.remi.7.3
[Summary] => Extension for communicating with the Redis key-value store
[Arch] => x86_64
)
)</pre>
<p><strong>By installed file</strong></p>
<pre>
$ rpm -qf $(which php)
php-cli-7.3.15-1.fc31.remi.x86_64</pre>
<pre>
php > print_r(rpmdbsearch(PHP_BINARY, RPMTAG_INSTFILENAMES));
Array
(
[0] => Array
(
[Name] => php-cli
[Version] => 7.3.15
[Release] => 1.fc31.remi
[Summary] => Command-line interface for PHP
[Arch] => x86_64
)
)</pre>
<p><strong>Dependencies</strong></p>
<pre>
$ rpm -q --whatprovides php-rpminfo
php-pecl-rpminfo-0.4.0-1.fc31.remi.7.3.x86_64</pre>
<pre>
php > print_r(rpmdbsearch("php-rpminfo", RPMTAG_PROVIDES));
Array
(
[0] => Array
(
[Name] => php-pecl-rpminfo
[Version] => 0.4.0
[Release] => 1.fc31.remi.7.3
[Summary] => RPM information
[Arch] => x86_64
)
)</pre>
<p>And lof or other criteria, see the <strong>RPMTAG_*</strong> constants list.</p>
<h2>Conclusion</h2>
<p>I think that most of the needed search features on RPMs are now available from PHP.</p>
<p>Waiting for review for official Fedora repository, see <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1812855">review #1812855</a>.</p>
<p>You are very welcome to report any <a href="https://github.com/remicollet/rpminfo/issues">bug</a>, or ask for enhancements.</p>Extension "rpminfo" pour phpurn:md5:7c175791cd866c76e1da64124684dae72020-03-13T13:05:00+01:002020-03-13T15:23:56+01:00RemiDéveloppementPHPRPM<p>J'ai l'habitude d'écrire mes <strong>scripts en PHP</strong>, normal, c'est le language que je connais le mieux.</p>
<p>Mais j'avais de nombreux besoins nécessitant d'analyser la sortie de commande systèmes, et <a href="https://www.php.net/exec">exec</a> c'est le mal.</p>
<p>J'ai donc créer une nouvelle extension <a href="https://blog.remirepo.net/post/2020/03/13/J'ai donc commencé">rpminfo</a> utilisant l'API de la bibliothèque <a href="http://ftp.rpm.org/api/4.15.1/">librpm</a>. Cette extension est conçue pour fournir des fonctions simples, de <strong>bas niveau</strong>, qui peuvent être ensuite exploitées par le code PHP.</p>
<p>Suite aux développements récents, le viens de publier la <strong>version 0.4.0</strong> qui peut désormais être considérer comme <strong>stable</strong>, même si l'API pourra encore évoluer avant la version 1.0.0.</p> <p>Voici quelques exemples de son utilisation.</p>
<h2>Comparaison de versions :</h2>
<pre>
$ rpmdev-vercmp 2.0.14-22.el7_0 2.0.14.1-35.el7_6
2.0.14-22.el7_0 < 2.0.14.1-35.el7_6</pre>
<pre>
php > var_dump(rpmvercmp('2.0.14-22.el7_0', '2.0.14.1-35.el7_6'));
int(-1)</pre>
<h2>Information sur un paquet / fichier :</h2>
<pre>
$ rpm -qp remi-release-32.rpm
remi-release-32-1.fc32.remi.noarch
</pre>
<pre>
php > print_r(rpminfo("remi-release-32.rpm"));
Array
(
[Name] => remi-release
[Version] => 32
[Release] => 1.fc32.remi
[Summary] => Configuration pour le dépôt remi
[Arch] => noarch
)</pre>
<p><strong>Avec plus de détails:</strong></p>
<pre>
$ rpm -qip remi-release-32.rpm
Name : remi-release
Version : 32
Release : 1.fc32.remi
Architecture: noarch
...
</pre>
<pre>
php > print_r(rpminfo("remi-release-32.rpm", true));
Array
(
[Headeri18ntable] => Array
(
[0] => C
[1] => fr
)
[Sigsize] => 16816
[Sigpgp] => 89024604000108003016210434c10bdbcc6f1b252e50ba1a0714919e4c21a80805025e4a9fc7121c72656d694072656d697265706f2e6e6574000a09100714919e4c21a8084b950ffd1f8a2d25ea7561679beb7b78aca25da793b193b83fab23e48547d128b87114a80878f57321813b53cb45891730000533978f5c7c5342fd155767abfdc178ae99f9560a8789550fef143e24533dd068a7b6d32f9238609c4ac20d3f42e0d073c4230a3716a9a4273961f97c4731f199f092b6fb19a403058165c148d35c894f910a13808d0f317c8f93ed17bacbba2dc3a30623380f771253b4efcd6ef53d225e3fb32162d320bae520815fa135d357198c2fc9069dbbb4630ac2ee844c3be5ef825d93223d11eb3dd13606d4aedbd8bcb791c54cf6ca22205732a40b3a0b2108bdadcaee185f38c7782505cac2fa4bef0ca609dc0dc280bb53d5190f310e79f5fd0dd7929779b9c041eea3966573d26f588453105046cb9ab068ca32d0deb761104091fd291722cf5c8987d488149f02f1f6843b66603acb47a7abde32632368bfb77ddbfa609c7308708ca1e4455eab6e556de9e2e82e8b21c5ed54dc18565a535f73232d84d469ed6d1aa9d2fb5fc7f404d5631abea99c0e1e3c0b4e986615ec6c77779adf4a4fc0c24c835ce3a1fd03f63ef26f547bfca96d928a38c7701d60c8b2f204a487297407e8831c341c85034e0cc02f8a1282c5b2ee47ddf8bec7e9bdd6d79d8490758c871cd57d5ad6b6cb4859955ef3e13b75f2880106c1b6162fb237256bef2bd48521e5d728e18f06ad35eabdf2f3065e00c8cd1465d87d9d
[Sigmd5] => 86dc03cedbebcc9a8a334763d642685a
[Rsaheader] => 89024604000108003016210434c10bdbcc6f1b252e50ba1a0714919e4c21a80805025e4a9fc7121c72656d694072656d697265706f2e6e6574000a09100714919e4c21a808011a1000adfcd097e0268ebcbe71cb07059fcc1a2dd7fd48d6ad9526eede3dedc8c3ac9401681df0e2b43c9a6a5719b4b9490190159bad149c2acb40aa8cb9f07c294f599885ab046c605f5ad783c7a366d87c5e5d315415b812e97a2a7e615cea80f0b3b94fecb47f5cdf738ee1337e590f5f72c32a0d978ee2ad75cf220b67e7d54c096bb20c7012eb12d5a7827cffb2d4b4b71ea21753139ac3850fd5c56f876fb91754c9e69aacbe963b85d2a03be605cd35d9af64b4ac2781681fbfac56a224c7d57bb1e26bc3a6c3f98d2cc4057e29713756061f7db075841446e1a44ea35a278e64c4b562bfd4dff990fdfc7cf0b82148a0c61dfed3f3de2f199328d41c840078dca321978bee267b969574f98e946c13f14ee061a26b036253ea0f6f6036e8e0e289b0b7aebc87395477d40b2b0e7a84ed50e20552145b91168696392687dcd8e03a97317cd0047eb96689f59953adc4a1c9834f56498311110ab06789b269298ddc32a304e529be6bb8fb338ef91cecf48b146148da3b68f52f5dfbb14c73291fc02faf5c8427348fb105df23b38734e0d84c21ebccf0f39ecea363ddbf60543db419f93504e14a839f2243bb5b9f09be28a94c163f8a5e157546c431fddfe7c20fa86ec9729709eb8df7ef60003ea623ae1bd6421c02b98f329db827c3cc5447842f67ae23e49ba1d6118cb9a55b93f9bfb8bc3c46f3e465c5d537e1d13b20
[Sha1header] => c528cb3308e69a4b9baa9a1e23a6541b06254f0a
[Sha256header] => 9494000c44cf0665d12395631c21a90e4a44c4b7f37a8b3b1bbc798a0b99e1dd
[Name] => remi-release
[Version] => 32
[Release] => 1.fc32.remi
...
[Payloaddigestalgo] => 8
[IsSource] =>
)
</pre>
<p>Beaucoup de champs sont disponibles (tous ceux fournit par la bibliothèque).</p>
<h2>Information sur un paquet installé :</h2>
<pre>
$ rpm -q kernel-5.5.8
kernel-5.5.8-200.fc31.x86_64</pre>
<pre>
php > print_r(rpmdbinfo("kernel-5.5.8"));
Array
(
[0] => Array
(
[Name] => kernel
[Version] => 5.5.8
[Release] => 200.fc31
[Summary] => The Linux kernel
[Arch] => x86_64
)
)</pre>
<p>Possibilité de fournir le <strong>nom</strong>, ou <strong>nom-version </strong>ou <strong>nom-version-release</strong></p>
<h3>Recherche :</h3>
<p><strong>Par nom</strong></p>
<pre>
$ rpm -qa \*redis\*
redis-6.0~RC2-1.fc31.remi.x86_64
php-pecl-redis5-5.2.0-1.fc31.remi.7.3.x86_64</pre>
<pre>
php > print_r(rpmdbsearch("*redis*", RPMTAG_NAME, RPMMIRE_GLOB));
Array
(
[1] => Array
(
[Name] => redis
[Version] => 6.0~RC2
[Release] => 1.fc31.remi
[Summary] => A persistent key-value database
[Arch] => x86_64
)
[2] => Array
(
[Name] => php-pecl-redis5
[Version] => 5.2.0
[Release] => 1.fc31.remi.7.3
[Summary] => Extension for communicating with the Redis key-value store
[Arch] => x86_64
)
)</pre>
<p><strong>Par fichier installé</strong></p>
<pre>
$ rpm -qf $(which php)
php-cli-7.3.15-1.fc31.remi.x86_64</pre>
<pre>
php > print_r(rpmdbsearch(PHP_BINARY, RPMTAG_INSTFILENAMES));
Array
(
[0] => Array
(
[Name] => php-cli
[Version] => 7.3.15
[Release] => 1.fc31.remi
[Summary] => Command-line interface for PHP
[Arch] => x86_64
)
)</pre>
<p><strong>Dépendances</strong></p>
<pre>
$ rpm -q --whatprovides php-rpminfo
php-pecl-rpminfo-0.4.0-1.fc31.remi.7.3.x86_64</pre>
<pre>
php > print_r(rpmdbsearch("php-rpminfo", RPMTAG_PROVIDES));
Array
(
[0] => Array
(
[Name] => php-pecl-rpminfo
[Version] => 0.4.0
[Release] => 1.fc31.remi.7.3
[Summary] => RPM information
[Arch] => x86_64
)
)</pre>
<p>Et beaucoup d'autres critères, voir la liste des constantes <strong>RPMTAG_*</strong>.</p>
<h2>Conclusion</h2>
<p>Je pense que la majorité des fonctionnalités de recherche et d'information sur les RPM sont désormais disponible en PHP.</p>
<p>En attente de revue pour l'entrée dans les dépôts officiels de Fedora, voir la <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1812855">revue #1812855</a>.</p>
<p>N'hésitez pas à signaler tout <a href="https://github.com/remicollet/rpminfo/issues">dysfonctionnement</a>, ou demander des évolutions.</p>FFI extension usage with PHP 7.4urn:md5:37a5420ae9e3c446f4353230991443172019-10-23T15:09:00+02:002019-10-23T17:01:11+02:00RemiDéveloppementContributeurPHPplanet-php<p>The <strong>FFI</strong> extension (Foreign Function Interface) give access to features from system libraries directly from PHP without any need to additional extension.</p>
<p>Here is some examples, results of my tests of this extension.</p> <h2>1. Preloading</h2>
<p>Another new feature of PHP 7.4 is to allow to preload some classes, which will be usable as internal classes of the language or of an extension.</p>
<ul>
<li>File with class definition: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-foo.inc">preload-foo.inc</a></li>
<li>Test file checking Fichier de test vérifiant l’existence de la classe: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/foo.php">foo.php</a></li>
</ul>
<p><strong>Usage:</strong></p>
<pre>
$ php -dopcache.preload=preload-foo.inc foo.php
Class Remi\Foo exists</pre>
<p>So we'll use this feature with FFI.</p>
<h2>2. ZSTD compression</h2>
<p><a href="http://www.zstd.net/">Zstandard</a> is a well known and efficient compression algorithm. The <a href="https://github.com/facebook/zstd">libzstd</a> library provides a reference implementation.</p>
<p>A <a href="https://github.com/kjdev/php-ext-zstd">zstd for PHP</a> extension already exists, we'll use it to checkthe performance of our <strong>FFI</strong> solution.</p>
<ul>
<li>Library definition, copy/paste from the library header <strong>zstd.h</strong>: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-zstd.h">preload-zstd.h</a></li>
<li><strong>Remi\Zstd</strong> class definition which can be preloaded: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-zstd.inc">preload-zstd.inc</a></li>
<li><strong>Test</strong> script using this classe and zstd extension for benchmarking: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/zstd.php">zstd.php</a></li>
</ul>
<p>Notice: if the class is not preloaded, it will be included, simple usage:</p>
<pre>
$ php zstd.php</pre>
<p>If only the class is preloaded, headers will be loaded using <a href="https://www.php.net/manual/en/ffi.load.php">FFI;load()</a>, usage:</p>
<pre>
$ php -d opcache.preload=preload-zstd.inc zstd.php</pre>
<p>Starting with <strong>7.4.0RC5</strong> (or using RPM from my repository), headers can also be preloaded, and will be used calling <a href="https://www.php.net/manual/en/ffi.scope.php">FFI:scope()</a>, usage:</p>
<pre>
$ php d ffi.preload=preload-zstd.h -d opcache.preload=preload-zstd.inc zstd.php</pre>
<p>In previous versions, headers preload only works when run as a normal user, so doesn't work with <strong>mod_php</strong> or <strong>php-fpm</strong> started under administrative account (<em>root</em>)</p>
<p><strong>Execution</strong> <strong>output</strong>:</p>
<pre>
PHP version 7.4.0RC4
Use preloaded class
Using FFI::scope OK
Src length = 8673632
ZSTD_compress = 1828461
Src length = 1828461
ZSTD_decompress = 8673632
Check = OK
Using FFI extension = 0,09"
Src length = 8673632
ZSTD_compress = 1828461
Src length = 1828461
ZSTD_decompress = 8673632
Check = OK
Using ZSTD extension = 0,09"
</pre>
<p>For final user, code using <strong>FFI</strong> is close the code using the <strong>Zstd</strong> extension, and performances are identical (no noticeable difference).</p>
<h2>3. Redis client</h2>
<p>Various implementations of <a class="ref-post" href="https://blog.remirepo.net/post/2016/11/13/Redis-from-PHP">Redis client</a> exist, written in C or PHP, this sample use FFI to access functions of the <a href="https://github.com/redis/hiredis">hiredis</a> library.</p>
<ul>
<li>Library definition, copy/paste from the library headers <strong>hiredis/hredis.h</strong> et <strong>hiredis/read.h</strong>: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-redis.h">preload-redis.h</a></li>
<li><strong>Remi\Redis</strong> class definition to be preloaded: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-redis.inc">preload-redis.inc</a></li>
<li><strong>Test</strong> script using this class: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/redis.php">redis.php</a></li>
</ul>
<p><strong>Output extract</strong></p>
<pre>
$ php74 -d ffi.preload=preload-redis.h -d opcache.preload=preload-redis.inc redis.php
...
+ Remi\Redis::__construct(localhost, 6379)
+ Remi\Redis::initFFI()
+ Remi\Redis::del(foo)
int(1)
+ Remi\Redis::get(foo)
NULL
+ Remi\Redis::set(foo, 2019/10/23 12:45:03)
string(2) "OK"
+ Remi\Redis::get(foo)
string(19) "2019/10/23 12:45:03"
+ Remi\Redis::__destruct</pre>
<p>This simplistic code, written in a few hours works and fulfill its goal..</p>
<h2>4. Liens</h2>
<ul>
<li>Complete and really detailed documentation: <a href="https://www.php.net/ffi">https://www.php.net/ffi</a></li>
<li><a href="https://github.com/ircmaxell/FFIMe">FFIme</a> projet by Anthony Ferrara designed to automate soe part of the work (experimental)</li>
<li>Git reporitory with used <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/tree/">examples</a></li>
</ul>
<h2>5. Conclusion</h2>
<p><strong>FFI</strong> appears to be a new way to develop directly using PHP, and allowing more features without any need to create and maintain extension written in C language.</p>
<p>Its usage stills requires good C skills, to understand the library headers and documentation, and to avoid memory leaks, but should attract more developers / contributors.</p>
<p>The future will tell if <strong>FFI</strong> keep its promises, for a production usage, and if it will allow to reduce the number of existing extensions which will have to be maintained and adapted for next PHP versions.</p>Utilisation de l'extension FFI avec PHP 7.4urn:md5:732646025873d1b7c268a4d5540b038d2019-10-23T14:05:00+02:002019-10-23T14:46:54+02:00RemiDéveloppementContributeurPHPplanetlibreplanetphpfr<p>L'extension <strong>FFI</strong> (Foreign Function Interface) permet d'accéder aux fonctionnalités de bibliothèques systèmes directement depuis PHP sans recours à une autre extension.</p>
<p>Voici quelques exemples, résultats de mes tests de cette extension.</p> <h2>1. Pré-chargement</h2>
<p>Une autre nouveauté de PHP 7.4 est la possibilité de pré-charger des classes, qui seront ensuite utilisables comme des classes natives du language, ou d'une extension.</p>
<ul>
<li>Fichier de déclaration de la classe: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-foo.inc">preload-foo.inc</a></li>
<li>Fichier de test vérifiant l’existence de la classe: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/foo.php">foo.php</a></li>
</ul>
<p><strong>Utilisation</strong></p>
<pre>
$ php -dopcache.preload=preload-foo.inc foo.php
Class Remi\Foo exists</pre>
<p>Nous utiliserons donc cette fonctionnalité avec FFI.</p>
<h2>2. Compression ZSTD</h2>
<p><a href="http://www.zstd.net/">Zstandard</a> est un algorithme de compression très efficace et très répandu. La bibliothèque <a href="https://github.com/facebook/zstd">libzstd</a> offre une implémentation de référence.</p>
<p>Il existe déjà une extension <a href="https://github.com/kjdev/php-ext-zstd">zstd pour PHP</a>, que nous utiliserons aussi pour contrôler les performances de notre solution <strong>FFI</strong>.</p>
<ul>
<li>Fichier de déclaration de la biblothèque, copié/collé/nettoyé depuis le fichier <strong>zstd.h</strong> de la bibliothèque: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-zstd.h">preload-zstd.h</a></li>
<li>Fichier de la classe <strong>Remi\Zstd</strong> qui pourra donc être préchargé: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-zstd.inc">preload-zstd.inc</a></li>
<li>Fichier de <strong>test</strong> utilisant cette classe, ainsi que l'extension zstd pour comparaison: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/zstd.php">zstd.php</a></li>
</ul>
<p>A noter: si la classe n'est pas pré-chargée, elle sera incluse par le script de test, utilisation simple :</p>
<pre>
$ php zstd.php</pre>
<p>Si seul le script est préchargé, les entêtes seront chargées par un appel à <a href="https://www.php.net/manual/en/ffi.load.php">FFI;load()</a>, utilisation :</p>
<pre>
$ php -d opcache.preload=preload-zstd.inc zstd.php</pre>
<p>A partir de <strong>7.4.0RC5</strong> (ou avec les RPM de mon dépôt), il est aussi possible de précharger les entêtes qui seront récupérés avec <a href="https://www.php.net/manual/en/ffi.scope.php">FFI:scope()</a>, utilisation:</p>
<pre>
$ php d ffi.preload=preload-zstd.h -d opcache.preload=preload-zstd.inc zstd.php</pre>
<p>Dans les versions précédentes, le préchargement des entêtes ne fonctionnent qu'en utilisateur normal, et donc ne fonctionnement pas avec <strong>mod_php</strong> ou <strong>php-fpm</strong> qui est administrateur (<em>root</em>) lors de son lancement.</p>
<p><strong>Exécution</strong>:</p>
<pre>
PHP version 7.4.0RC4
Use preloaded class
Using FFI::scope OK
Src length = 8673632
ZSTD_compress = 1828461
Src length = 1828461
ZSTD_decompress = 8673632
Check = OK
Using FFI extension = 0,09"
Src length = 8673632
ZSTD_compress = 1828461
Src length = 1828461
ZSTD_decompress = 8673632
Check = OK
Using ZSTD extension = 0,09"
</pre>
<p>Pour l'utilisateur, le code utilisant FFI ou l'extension Zstd est équivalent, ainsi que les performances (aucune différence notable).</p>
<h2>3. Client Redis</h2>
<p>Il existe déjà plusieurs<a class="ref-post" href="https://blog.remirepo.net/post/2016/11/13/Redis-depuis-PHP"> implémentation du client Redis</a> en C ou en PHP, Cet exemple utilisera FFI pour accéder aux fonctions de la bibliothèque <a href="https://github.com/redis/hiredis">hiredis</a>.</p>
<ul>
<li>Fichier de déclaration de la biblothèque, copié/collé/nettoyé depuis les fichiers <strong>hiredis/hredis.h</strong> et <strong>hiredis/read.h</strong> de la bibliothèque: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-redis.h">preload-redis.h</a></li>
<li>Fichier de la classe <strong>Remi\Redis</strong> qui pourra donc être préchargé: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/preload-redis.inc">preload-redis.inc</a></li>
<li>Fichier de <strong>test</strong> utilisant cette classe: <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/plain/redis.php">redis.php</a></li>
</ul>
<p><strong>Utilisation</strong> (extrait) :</p>
<pre>
$ php74 -d ffi.preload=preload-redis.h -d opcache.preload=preload-redis.inc redis.php
...
+ Remi\Redis::__construct(localhost, 6379)
+ Remi\Redis::initFFI()
+ Remi\Redis::del(foo)
int(1)
+ Remi\Redis::get(foo)
NULL
+ Remi\Redis::set(foo, 2019/10/23 12:45:03)
string(2) "OK"
+ Remi\Redis::get(foo)
string(19) "2019/10/23 12:45:03"
+ Remi\Redis::__destruct</pre>
<p>Ce code simplissime, écrit en quelques heures fonctionne est rempli sa mission.</p>
<h2>4. Liens</h2>
<ul>
<li>Documentation complète et très détaillée : <a href="https://www.php.net/ffi">https://www.php.net/ffi</a></li>
<li>Projet <a href="https://github.com/ircmaxell/FFIMe">FFIme</a> d'Anthony Ferrara permettant d'automatiser une partie du travail (expérimental)</li>
<li>Dépôt git des <a href="https://git.remirepo.net/cgit/tools/ffi-examples.git/tree/">examples</a> utilisés</li>
</ul>
<h2>5. Conclusion</h2>
<p><strong>FFI</strong> apparait comme un nouveau moyen de développement, directement en PHP, et permettant plus de fonctionnalités, sans devoir recourir à la création et la maintenance d'extension écrite en langage C.</p>
<p>Son utilisation nécessite tout de même de solides connaissances en C, pour comprendre les entêtes et la documentation des bibliothèques et pour éviter les fuites de mémoire, mais devrait attirer plus de développeurs / contributeurs.</p>
<p>L'avenir nous dira si elle tient ses promesses pour une utilisation en production, et si elle permettra de diminuer le nombres d'extensions existantes et qui devront être maintenues et adaptées pour les prochaines versions de PHP.</p>PHP extensions status with upcoming PHP 7.4urn:md5:ca4db45503aaa4b70c283999f639ac022019-05-23T13:44:00+02:002019-07-12T14:34:06+02:00RemiDéveloppementContributeurPHPplanet-php<p>With <strong>PHP 7.4</strong> entering stabilization phase, time to check the status of most commonly used PHP extensions (at least, the ones available in my repository).</p>
<p>Here is the (not yet) exhaustive list.</p> <h2>1. Compatible</h2>
<p>The last published version is compatible</p>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
</thead>
<tbody>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ahocorasick">ahocorasick</a></td>
<td><strong>0.0.6</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/amqp">amqp</a></td>
<td><strong>1.9.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/apcu">apcu</a></td>
<td><strong>5.1.17</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/apcu_bc">apcu_bc</a></td>
<td><strong>1.0.5</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/apfd">apfd</a></td>
<td><strong>1.0.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ast">ast</a></td>
<td><strong>1.0.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/base58">base58</a></td>
<td><strong>0.1.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/bitset">bitset</a></td>
<td><strong>3.0.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-brotli/">brotli</a></td>
<td><strong>0.7.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/cmark">cmark</a></td>
<td><strong>1.2.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/componere">componere</a></td>
<td><strong>3.1.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/couchbase">couchbase</a></td>
<td><strong>2.6.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/crypto">crypto</a></td>
<td><strong>0.3.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/datadog_trace">datadog_trace</a></td>
<td><strong>0.3.1</strong></td>
<td>OK, 1 failed test fixed by <a href="https://github.com/DataDog/dd-trace-php/pull/452">PR #452</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/dbase">dbase</a></td>
<td><strong>7.0.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/decimal">decimal</a></td>
<td><strong>1.3.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/druid">druid</a></td>
<td><strong>1.0.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/dio">dio</a></td>
<td><strong>0.1.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ds">ds</a></td>
<td><strong>1.2.9</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/eio">eio</a></td>
<td><strong>2.0.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/env">env</a></td>
<td><strong>0.2.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ev">ev</a></td>
<td><strong>1.0.6</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/event">event</a></td>
<td><strong>2.5.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/fann">fann</a></td>
<td><strong>1.1.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gearman">gearman</a></td>
<td><strong>2.0.5</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gender">gender</a></td>
<td><strong>1.1.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/geoip">geoip</a></td>
<td><strong>1.1.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/geospatial">geospatial</a></td>
<td><strong>0.2.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gearman">gearman</a></td>
<td><strong>2.0.5</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/geos">geos</a></td>
<td><strong>1.0.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gmagick">gmagick</a></td>
<td><strong>2.0.5RC1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/gnupg">gnupg</a></td>
<td><strong>1.4.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/grpc">grpc</a></td>
<td><strong>1.21.0RC1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/handlebars">handlebars</a></td>
<td><strong>0.8.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/hdr_histogram">hdr_histogram</a></td>
<td><strong>0.3.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://www.horde.org/">horde_lz4</a></td>
<td><strong>1.0.10</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/hprose">hprose</a></td>
<td><strong>1.6.7</strong></td>
<td>OK, was fixed by <a href="https://github.com/hprose/hprose-pecl/pull/17">PR #17</a></td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/hrtime">hrtime</a></td>
<td><strong>0.6.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/pecl_http">http</a></td>
<td><strong>3.2.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/http_message">http_message</a></td>
<td><strong>0.1.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/igbinary">igbinary</a></td>
<td><strong>3.0.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/imagick">imagick</a></td>
<td><strong>3.4.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/inotify">inotify</a></td>
<td><strong>2.0.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ip2location">ip2location</a></td>
<td><strong>8.0.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/json_post">json_post</a></td>
<td><strong>1.0.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/krb5">krb5</a></td>
<td><strong>1.1.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/leveldb">leveldb</a></td>
<td><strong>0.2.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://libvirt.org/php/">libvirt</a></td>
<td><strong>0.5.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/lua">lua</a></td>
<td><strong>2.0.6</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/luasandbox">luasandbox</a></td>
<td><strong>3.0.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/lzf">lzf</a></td>
<td><strong>1.6.7</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-lz4">lz4</a></td>
<td><strong>0.3.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mailparse">mailparse</a></td>
<td><strong>3.0.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/maxmind/MaxMind-DB-Reader-php">maxminddb</a></td>
<td><strong>1.4.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mcrypt">mcrypt</a></td>
<td><strong>1.0.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/memcache">memcache</a></td>
<td><strong>4.0.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/memcached">memcached</a></td>
<td><strong>3.1.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/memprof">memprof</a></td>
<td><strong>2.0.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mogilefs">mogilefs</a></td>
<td><strong>0.9.3.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mongodb">mongodb</a></td>
<td><strong>1.5.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/mosquitto">mosquitto</a></td>
<td><strong>0.4.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/msgpack">msgpack</a></td>
<td><strong>2.0.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/mustache">mustache</a></td>
<td><strong>0.9.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/nsq">nsq</a></td>
<td><strong>3.4.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/opencensus">opencensus</a></td>
<td><strong>0.2.2</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/parallel">parallel</a></td>
<td><strong>1.1.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/pdflib">pdflib</a></td>
<td><strong>4.1.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/pcov">pcov</a></td>
<td><strong>1.0.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/Letargie/pggi">pggi</a></td>
<td><strong>0.3.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/nrk/phpiredis">phpiredis</a></td>
<td><strong>1.0.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/tony2001/pinba_extension">pinba</a></td>
<td><strong>1.1.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/pq">pq</a></td>
<td><strong>2.1.5</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/propro">propro</a></td>
<td><strong>2.1.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/psr">psr</a></td>
<td><strong>0.6.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/radius">radius</a></td>
<td><strong>1.4.0b1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/raphf">raphf</a></td>
<td><strong>2.0.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/rar">rar</a></td>
<td><strong>4.0.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/rdkafka">rdkafka</a></td>
<td><strong>3.1.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/redis">redis</a></td>
<td><strong>4.3.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/rpminfo">rpminfo</a></td>
<td><strong>0.2.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/rrd">rrd</a></td>
<td><strong>2.0.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/sandbox">sandbox</a></td>
<td><strong>0.1.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/scrypt">scrypt</a></td>
<td><strong>1.4.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/selinux">selinux</a></td>
<td><strong>0.4.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/smbclient">smbclient</a></td>
<td><strong>1.0.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-snappy">snappy</a></td>
<td><strong>0.1.9</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/nbs-system/snuffleupagus">snuffleupagus</a></td>
<td><strong>0.5.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/solr">solr</a></td>
<td><strong>2.5.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/sqlsrv">sqlsrv</a></td>
<td><strong>5.6.1</strong></td>
<td>OK (need post alpha1)</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ssdeep">ssdeep</a></td>
<td><strong>1.1.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/ssh2">ssh2</a></td>
<td><strong>1.1.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/stats">stats</a></td>
<td><strong>2.0.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/stomp">stomp</a></td>
<td><strong>1.2.10</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/svm">svm</a></td>
<td><strong>0.2.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/swoole">swoole</a></td>
<td><strong>4.3.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/sync">sync</a></td>
<td><strong>1.1.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/taint">taint</a></td>
<td><strong>2.0.5</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/tcpwrap">tcpwrap</a></td>
<td><strong>1.2.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/termbox">termbox</a></td>
<td><strong>0.1.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/timecop">timecop</a></td>
<td><strong>2.0.2</strong></td>
<td>Some failed tests since 7.2 (related to timelib changes)</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/trace">trace</a></td>
<td><strong>1.0.1beta</strong></td>
<td>But test suite fails</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/trader">trader</a></td>
<td><strong>0.5.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/translit">translit</a></td>
<td><strong>0.6.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/uopz">uopz</a></td>
<td><strong>6.1.0</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/uuid">uuid</a></td>
<td><strong>1.0.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/uv">uv</a></td>
<td><strong>0.2.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/varnish">varnish</a></td>
<td><strong>1.2.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/vips">vips</a></td>
<td><strong>1.0.9</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/vld">vld</a></td>
<td><strong>0.16.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/krakjoe/wkhtmltox">wkhtmltox</a></td>
<td><strong>0.3.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xattr">xattr</a></td>
<td><strong>1.3.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/xdebug">xdebug</a></td>
<td><strong>2.8.0-alpha1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/xdiff">xdiff</a></td>
<td><strong>2.0.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xlswriter">xlswriter</a></td>
<td><strong>1.2.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xmldiff">xmldiff</a></td>
<td><strong>1.1.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/xxtea">xxtea</a></td>
<td><strong>1.0.11</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/yac">yac</a></td>
<td><strong>2.0.2</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/yaml">yaml</a></td>
<td><strong>2.0.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/yaz">yaz</a></td>
<td><strong>1.2.3</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/phalcon/php-zephir-parser">zephir_parser</a></td>
<td><strong>1.3.1</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/zookeeper">zookeeper</a></td>
<td><strong>0.6.4</strong></td>
<td>OK</td>
</tr>
<tr class="line">
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-zstd">zstd</a></td>
<td><strong>0.7.3</strong></td>
<td>OK</td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>2. Work in progress</h2>
<p>These extensions have been fixed upstream (or PR are available) but no official release.</p>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
</thead>
<tbody>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/cassandra">cassandra</a></td>
<td><strong>1.3.2</strong></td>
<td>Fixed by <a href="https://github.com/datastax/php-driver/pull/126">PR #126</a> and <a href="https://github.com/datastax/php-driver/pull/132">PR #132</a> awaiting review</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/interbase">interbase</a></td>
<td><strong>1.0.0-dev</strong></td>
<td>Dropped from 7.4, not released yet</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/mysql">mysql</a></td>
<td><strong>1.0.0-dev</strong></td>
<td>Dropped from 7.0, never released</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/mysql_xdevapi">mysql_xdevapi</a></td>
<td><strong>8.0.16</strong></td>
<td>Fixed by <a href="https://github.com/php/pecl-database-mysql_xdevapi/pull/6">PR #6</a> and <a href="https://github.com/php/pecl-database-mysql_xdevapi/pull/6">PR #7</a></td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/oauth">oauth</a></td>
<td><strong>2.0.4-dev</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/parle">parle</a></td>
<td><strong>0.8.1</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/recode">recode</a></td>
<td><strong>1.0.0-dev</strong></td>
<td>Dropped from 7.4, no release planed</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/seasclick">seasclick</a></td>
<td><strong>0.1.0</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/seaslog">seaslog</a></td>
<td><strong>2.0.2</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/sphinx">sphinx</a></td>
<td><strong>1.4.0-dev</strong></td>
<td>Fixed upstream (still pending for 7.0)</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/uploadprogress" hreflang="en">uploadprogress</a></td>
<td><strong>1.0.3.1</strong></td>
<td>PHP 7+ compatibility fixed upstream, but probably dead.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/v8">v8</a></td>
<td><strong>0.2.2</strong></td>
<td>Build ok but 16/147 failed tests</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/wddx">wddx</a></td>
<td><strong>1.0.0-dev</strong></td>
<td>Dropped from 7.4, no release planed</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/yaconf">yaconf</a></td>
<td><strong>1.0.8-dev</strong></td>
<td>Fixed by <a href="https://github.com/laruence/yaconf/pull/52">PR #52</a> but still no release for 7.3</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/yaf">yaf</a></td>
<td><strong>3.0.8</strong></td>
<td>Build fixed by <a href="https://github.com/laruence/yaf/pull/446">PR #446</a>, but 5/97 failed tests</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/yar">yar</a></td>
<td><strong>2.0.5</strong></td>
<td>Build ok but 1/18 failed tests</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/zip">zip</a></td>
<td><strong>1.15.5-dev</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/zmq">zmq</a></td>
<td><strong>1.1.3</strong></td>
<td>Fixed upstream</td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>3. Not compatible for now (only from 7.3 compatible extensions)</h2>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
</thead>
<tbody>
<tr>
<td> </td>
<td><a href="http://www.ioncube.com/loaders.php">ioncube_loader</a></td>
<td><strong>10.3.4</strong></td>
<td>Not supported</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/molten">molten</a></td>
<td><strong>0.1.2beta</strong></td>
<td>Don't build</td>
</tr>
<tr>
<td> </td>
<td><a href="https://phalconphp.com/en/">phalcon</a></td>
<td><strong>3.4.3</strong></td>
<td>Don't build with zephir 0.10.16</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/protobuf">protobuf</a></td>
<td><strong>3.8.0RC1</strong></td>
<td>Don't build</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/request">request</a></td>
<td><strong>1.0.0b2</strong></td>
<td>Don't build, and stil no release compatible with 7.3, PR still awating review</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/runkit7">runkit7</a></td>
<td><strong>2.0.3</strong></td>
<td>Don't build</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/v8js">v8js</a></td>
<td><strong>0.2.2</strong></td>
<td>Don't build</td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>4. Not tested yet</h2>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/pthreads">pthreads</a></td>
<td><strong>3.2.0</strong></td>
<td>From Joe: "<span class="css-901oao css-16my406 r-1qd0xha r-ad9z0x r-bcqeeo r-qvutc0" dir="auto">there won't be a 7.4 release for pthreads ..."</span></td>
</tr>
</thead>
</table>
<h2> </h2>
<h2>5. Conclusion</h2>
<ul>
<li>May 23th: Too soon for a statement, <em>alpha1</em> is not yet released.</li>
<li>June 14th: With 94% of extension already compatible with <strong>7.4.0alpha1</strong>, I think current situation is very good, and we still have a few months to fix the remaining.</li>
</ul>
<p> </p>
<p><em>Last updated on <strong>July 12th 2019</strong></em></p>Small history about QAurn:md5:56b364eab8e7e9f63deca4902d7662ff2019-03-21T16:10:00+01:002019-03-21T17:45:48+01:00RemiDéveloppementContributeurPHPplanet-php<p>Despite I'm mainly a developer, I now use most of my time on doing QA on PHP projects.</p>
<p>Here is, around release of versions7.2.17RC1 and 7.3.4RC1 a report which should help to understand this activity.</p>
<p> </p> <h1>1. Presentation</h1>
<p>Usually, tests are done by PHP developers, particularly thanks to <a href="https://travis-ci.org/php/php-src">travis</a> and then by users who will install the RC version available 2 weeks before a GA version.</p>
<p>The PHP project follow a release process (cf <a href="https://github.com/php/php-src/blob/master/README.RELEASE_PROCESS">README.RELEASE_PROCESS</a>) which gives 2 days between the preparation of a version, <strong>the Tuesday on git</strong>, and <strong>the Thursday</strong> <strong>its announcement </strong>in the mailing lists. These 2 days are especially designed to allow the build of binary packages (mostly by Microsoft and often by me for my repository) and to allow a last QA check which mays allow to discover some late issue.</p>
<p>When the new versions were available (on Tuesday afternoon) I start building the packages for my repostiory, givinf more coverage than the current <em>travis </em>configuration<em>:</em></p>
<ul>
<li>Fedora 27 to 31</li>
<li>RHEL 6, 7 and 8-Beta</li>
<li>i386 and x86_64</li>
<li>NTS and ZTS</li>
<li>various compiler versions (GCC 4 to 9) and system library versions</li>
</ul>
<p>I also run the build of the 7.3.4RC1 package in <a href="https://fedoraproject.org/wiki/Releases/Rawhide">Fedora rawhide</a> to trigger the re-build of all the PHP stack in <a href="https://blog.remirepo.net/post/2014/08/12/Koschei-continuous-integration-of-PHP-stack-in-Fedora">Koschei</a>, one of the CI tools of the Fedora project.</p>
<p>Notice : time to build all the packages for all the targets is about <strong>3h for each version</strong> ! (I really need a faster builder).</p>
<p> </p>
<h1>2. Discoverd issues</h1>
<h2>2.1. Failed tests with pcre2 version 10.33RC1</h2>
<p>Already available in <em>rawhide</em>, this version introduce a change in some error message, making 2 tests to fail.</p>
<p>Minor issue, fixed in PHP 7.3+: commit <a href="http://git.php.net/?p=php-src.git;a=commitdiff;h=c421d9afeca772968e185092950b70fdcd98f1e6">c421d9a</a>.</p>
<h2>2.2. Failed tests on 32-bit</h2>
<p>In fix of <a href="https://bugs.php.net/bug.php?id=76717">bug #76117</a> the output of <a href="http://php.net/var_export">var_export</a> have changed, make 2 tests to fail on 32-bit.</p>
<p>After <a href="https://github.com/php/php-src/commit/1fd32e9c2f15eabdc7e531b1fa76f62fc5a8ca75#commitcomment-32827253">confirmation by the autor</a> of the change, tests have been fixed in PHP 7.2+ : commits <a href="http://git.php.net/?p=php-src.git;a=commit;h=a467a89f167e9e03b4acc4bd9b1430e0d52133fa">a467a89</a> and <a href="http://git.php.net/?p=php-src.git;a=commit;h=5c8d69bf6fde2bbb3d6c168833bc9a70f0a5bc1f">5c8d69b</a>.</p>
<h2>2.3. Regression</h2>
<p><strong>Koschei</strong> allow to discover very quickly a important regression in the run of the "make test" command. After digging, this regression was introduced in the fix of <a href="https://bugs.php.net/bug.php?id=77609">bug #77609</a>, read the comments on the commit <a href="https://github.com/php/php-src/commit/3ead67239419632eecb83f0f101ead2021ee6c14">3ead672</a>.</p>
<p>After discussion between the Release managers, it have been choosen to:</p>
<ul>
<li><a href="http://git.php.net/?p=php-src.git;a=commitdiff;h=32e7b0864ca1e5094ecea73641c4dc87bcdaa684">revert</a> this change to get back to a sane situation</li>
<li>to re-run the release process (new <em>tag</em> onr <em>git</em>)</li>
</ul>
<p>The version which wil be announced shortly will not be affected byt this regression.</p>
<p> </p>
<h1>3. Conclusion</h1>
<p>To ensure of the quality of PHP, of no regression is a complex, long and serious work. Thanks to all the actors, developers, QA team and users, this works pretty well.</p>
<p>So, if you use PHP in a development environment, it is essential to install the RC versions to detect and report us quickly any problem, so we can react before the finale version.</p>
<p>For users of my repository, the RC versions of PHP and various extensions are nearly always available in the testing repositories.</p>
<p> </p>Petite histoire de QAurn:md5:5e6b085c906028c0e0111ffc924bbf152019-03-21T15:14:00+01:002019-03-21T17:45:35+01:00RemiDéveloppementContributeurPHPplanetphpfr<p>Bien que développeur, je passe désormais la majeur partie de mon temps à faire de la QA (assurance qualité) sur les projets autour de PHP.</p>
<p>Voici à travers la sortie des versions 7.2.17RC1 et 7.3.4RC1 un rapport permettant de mieux comprendre cette activité.</p>
<p> </p> <h1>1. Présentation</h1>
<p>Normalement, les tests sont assurés par les développeurs de PHP, notamment grâce à <a href="https://travis-ci.org/php/php-src">travis</a> et ensuite pas les utilisateurs qui installeront les versions RC mise à disposition 2 semaines avec la version GA.</p>
<p>Le projet PHP suit un processus de version (cf <a href="https://github.com/php/php-src/blob/master/README.RELEASE_PROCESS">README.RELEASE_PROCESS</a>) qui prévoit 2 jours entre la préparation de la version, sur <strong><em>git</em> le mardi</strong>, et son <strong>annonce le jeudi</strong> sur les listes de diffusions. Ces 2 jours sont notamment prévus pour permettre de préparer les paquets binaires (surtout Microsoft et souvent mon dépôt) et faire une dernière passe de QA qui peut permettre de détecter un problème tardif.</p>
<p>Dès que la version a été mise à disposition (mardi), j'ai commencé à lancé la construction des paquets pour mon dépôt, ce qui permet de couvrir plus de cas que la configuration actuelle de <em>travis</em></p>
<ul>
<li>Fedora 27 à 31</li>
<li>RHEL 6, 7 et 8-Beta</li>
<li>i386 et x86_64</li>
<li>NTS et ZTS</li>
<li>nombreuses versions du compilateur (GCC 4 à 9) et des bibliothèques systèmes</li>
</ul>
<p>J'ai aussi lancé la construction du paquet 7.3.4RC1 dans <a href="https://fedoraproject.org/wiki/Releases/Rawhide">Fedora rawhide</a> afin de déclencher la reconstruction de toute la pile PHP dans <a href="https://blog.remirepo.net/post/2014/08/12/Koschei-integration-continue-de-la-pile-PHP-dans-Fedora">Koschei</a>, un des outils de CI de Fedora.</p>
<p>Note : le temps de construction pour l'ensemble des cibles et d'environ <strong>3h par version</strong> ! (j'ai vraiment besoin d'une machine plus puissante)</p>
<p> </p>
<h1>2. Problèmes découverts</h1>
<h2>2.1. Tests échoués avec pcre2 version 10.33RC1</h2>
<p>Déjà disponible dans <em>rawhide</em>, cette version apporte une modification de certains messages d'erreur, provoquant un échec de 2 tests.</p>
<p>Problème mineur, corrigé dans PHP 7.3+ : changement <a href="http://git.php.net/?p=php-src.git;a=commitdiff;h=c421d9afeca772968e185092950b70fdcd98f1e6">c421d9a</a>.</p>
<h2>2.2. Tests échouées en 32 bits</h2>
<p>Suite à la correction du <a href="https://bugs.php.net/bug.php?id=76717">bug #76117</a> la sortie de <a href="http://php.net/var_export">var_export</a> a changée, entrainant un echec que 2 tests.</p>
<p>Après <a href="https://github.com/php/php-src/commit/1fd32e9c2f15eabdc7e531b1fa76f62fc5a8ca75#commitcomment-32827253">confirmation par l'auteur</a> de la modification, les tests ont été corrigés dans PHP 7.2+ : changements <a href="http://git.php.net/?p=php-src.git;a=commit;h=a467a89f167e9e03b4acc4bd9b1430e0d52133fa">a467a89</a> et <a href="http://git.php.net/?p=php-src.git;a=commit;h=5c8d69bf6fde2bbb3d6c168833bc9a70f0a5bc1f">5c8d69b</a>.</p>
<h2>2.3. Regression</h2>
<p><strong>Koschei</strong> a permis de détecter très rapidement une régression important dans l’exécution de "make test". Après recherche, cette régression a été introduite par la correction du <a href="https://bugs.php.net/bug.php?id=77609">bug #77609</a>, voir les commentaires sur le changement <a href="https://github.com/php/php-src/commit/3ead67239419632eecb83f0f101ead2021ee6c14">3ead672</a>.</p>
<p>Suite à discussion entre les responsables de version (<em>Release Managers</em>) il a été décidé</p>
<ul>
<li>de <a href="http://git.php.net/?p=php-src.git;a=commitdiff;h=32e7b0864ca1e5094ecea73641c4dc87bcdaa684">supprimer</a> ce changement pour revenir sur une situation saine</li>
<li>de relancer le processus de publication (nouveau <em>tag</em> sur <em>git</em>)</li>
</ul>
<p>Le version qui sera bientôt annoncée ne sera donc pas affectée par cette régression.</p>
<p> </p>
<h1>3. Conclusion</h1>
<p>S'assurer de la qualité de PHP, et de l'absence de régression est un travail complexe, long et sérieux. Grâce à l'ensemble des acteurs, développeurs, équipe QA et utilisateurs cela fonctionne plutôt bien.</p>
<p>Si vous utilisez PHP dans un environnement de développement, il est donc essentiel de penser à installer les versions RC pour nous signaler rapidement tout problème, afin que nous puissions réagir avant la version finale..</p>
<p>Pour les utilisateurs de mon dépôt, les versions RC de PHP et de nombreuses extensions sont presque toujours disponibles dans les dépôts de test.</p>
<p> </p>Work in progress: PHP stack for EL-8urn:md5:dc5bcf5179d570dbbc4a6a5bd6a5559e2018-12-11T11:23:00+01:002018-12-19T13:28:03+01:00RemiDéveloppementContributeurPHPRHELRPM<p>As <strong>RHEL-8.0-Beta</strong> is released, it's time to start preparing PHP stack for EPEL-8.</p>
<p>Here some notes about this work in progress.</p> <h2>1. Goals</h2>
<p>Like Fedora 29, RHEL-8 will use <strong>modules</strong>. The base distribution is reduced to a very minimal set of packages and libraries, and lot of applications / languages are now available via modules.</p>
<p>RHEL-8 provides php as a module, with 7.1 and 7.2 stream, and we can imagine more newer versions in the future.</p>
<p>All <strong>php extensions</strong>, which are dependent on the php ABI, will have to be part of the php module</p>
<p>All pure-php packages, <strong>applications</strong> or <strong>libraries</strong>, can stay in the base repository, as compatibility across version is usually good, we simply have to ensure compatibility with all streams.</p>
<p>For libraries, we already handles multiples versions, and switch to module scheme probably doesn't make sense: e.g. we can need to install various applications requiring different versions of Symfony, which won't work if Symfony was only available as a module.</p>
<p>For some applications it can make sense to move them to dedicated module, e.g. glpi, owncloud and nextcloud seems good candidates</p>
<h2>2. Modules and libraries</h2>
<p>The preparation work is available in my repository for the remi-7.2 and remi-7.3 stream, and can be imported later to EPEL-8.</p>
<p>While I have not build yet all possible extensions (~70 for now) we obviously need some libraries not in base distribution, which make some questions raising.</p>
<h3>2.1. Modules dependencies</h3>
<p>To build PHP extensions I have to enable various modules providing some libraries or tools:</p>
<ul>
<li><strong>httpd</strong>:2.4: used at build (for mod_php) and runtime,</li>
<li><strong>mariadb</strong>:10.3 used at build time for some test suites</li>
<li><strong>nginx</strong>:1.14 used at runtime for php-fpm</li>
<li><strong>nodejs</strong>:10 used at build time</li>
<li><strong>postgresql</strong>:10 used at build time for some test suites</li>
<li><strong>python27</strong>:2.7 used at build time</li>
<li><strong>python36</strong>:3.6 used at build time</li>
<li><strong>redis</strong> used at runtime for some test suites</li>
<li><strong>sos-collector</strong> use at builtime and runtime for libsodium</li>
<li><strong>swig</strong> used at buildtime</li>
<li><strong>varnish:6</strong> use at builtime and runtime for libvarnish</li>
<li><strong>virt</strong>; used at build and runtime for libvirt</li>
</ul>
<p>Some make sense (httpd, nginx, virt) but some are obviously bad and will raise issues, how can we imagine php module depending on sos-collector one ?</p>
<h3>2.2. Possible solution</h3>
<p>IMHO providing libraries in a module, and not being part of the provided module API is terrible, and should be avoid this can be fixed in various way:</p>
<ul>
<li>shared libraries only in base system, using usual solution to provide multiple versions when needed (using soname in the package name, like I do for years in my repository, or in official repositories for <em>compat</em> packages)</li>
<li>in module, only static library, or hidden one (mangled soname + filtered provides and devel packages only available for the module)</li>
</ul>
<p>Notice: all packages which will require libzip will have the same issue, as this library is for now only available in the php module.</p>
<p>Without proper Guildelines for libraries, EL-8 + EPEL will quickly become a terrible mess.</p>
<h3>2.3. Others libraries</h3>
<p>Some libraries, usually found in EPEL have been rebuild in my repository, temporarily, waiting for official EPEL-8 repository (ex: argon2, cmark, GeoIP, ImageMagick, ...)</p>
<h2>3. PHP Framework, libraries and applications</h2>
<p>The first step to be able to rebuild noarch packages for EL-8 is to have a quite huge set of tools, which includes some Framework (e.g. Symfony) and tools (e.g. phpunit).</p>
<p>As we have now a terribly complex bootstrap process, with tons of circular dependencies, I choose to use Fedora 29 noarch packages during the 1st build, and I hope it will be possible to do the same in real EPEL (tagging fc29.noarch RPMs in epel8-build).</p>
<p>This bootstrap step includes frameworks (symfony, ZF, ...) and developper tools (phpunit), and generates >400 noarch packages</p>
<p>Some packages (~20) have been fixed in rawhide to properly manage EL-8 (range dependencies and proper conditions)</p>
<p>Everything else can be build only using el8 packages from previous step.</p>
<h2>4. Current state</h2>
<p>My repository is now populated with >500 packages which includes</p>
<ul>
<li>Extensions
<ul>
<li>Nearly all</li>
</ul>
</li>
<li>Frameworks
<ul>
<li>Symfony v2, v3 and v4</li>
<li>Zend Framework</li>
<li>Sabre</li>
<li>Doctrine</li>
</ul>
</li>
<li>Developer's tools
<ul>
<li>atoum</li>
<li>composer</li>
<li>phan</li>
<li>phpcompatinfo</li>
<li>php-cs-fixer</li>
<li>PHPUnit v5, v6 and v7</li>
</ul>
</li>
<li>Web applications
<ul>
<li>GLPI</li>
<li>phpMyAdmin</li>
<li>roundcubemail</li>
<li>wordpress</li>
</ul>
</li>
</ul>
<p>More will come soon.</p>
<h2>5. Conclusion</h2>
<p>The main work is done, and most of my packages are ready in rawhide, and testable using my repository, just waiting for EPEL-8 to exists.</p>PHP extensions status with upcoming PHP 7.3urn:md5:2760c1df5644d6ef1922c3c1706881472018-07-02T11:36:00+02:002019-02-04T09:31:14+01:00RemiDéveloppementContributeurPHPplanet-php<p>With <strong>PHP 7.3</strong> entering stabilization phase, time to check the status of most commonly used PHP extensions (at least, the ones available in my repository).</p>
<p>Here is the exhaustive list.</p> <h2>1. Compatible</h2>
<p>The last published version is compatible</p>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
</thead>
<tbody>
<tr class="line">
<td> </td>
<td><a href="http://pecl.php.net/package/amqp">amqp</a></td>
<td><strong>1.9.3</strong></td>
<td>OK, was fixed by <a href="https://github.com/pdezwart/php-amqp/pull/323">PR #323</a> merged.</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/APCu" hreflang="en">APCu</a></td>
<td><strong>5.1.11</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/apcu_bc">apcu_bc</a></td>
<td><strong>1.0.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/apfd">apfd</a></td>
<td><strong>1.0.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/ast">ast</a></td>
<td><strong>0.1.6</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/Bitset">bitset</a></td>
<td><strong>3.0.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-brotli/">brotli</a></td>
<td><strong>0.5.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/cmark">cmark</a></td>
<td><strong>1.1.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/componere">componere</a></td>
<td><strong>2.1.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/couchbase">couchbase</a> v2</td>
<td><strong>2.5.0</strong></td>
<td>OK, was fixed by <a href="https://github.com/couchbase/php-couchbase/pull/22">PR #22</a>.</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/crypto">crypto</a></td>
<td><strong>0.3.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/dbase" hreflang="en">dbase</a></td>
<td><strong>7.0.0beta1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/dio">dio</a></td>
<td><strong>0.1.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/Druid">druid</a></td>
<td><strong>1.0.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/ds">ds</a></td>
<td><strong>1.2.6</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/eio" hreflang="en">eio</a></td>
<td><strong>2.0.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/env">env</a></td>
<td><strong>0.2.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/event" hreflang="en">event</a></td>
<td><strong>2.4.0RC3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/fann">fann</a></td>
<td><strong>1.1.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/gearman" hreflang="en">gearman</a></td>
<td><strong>2.0.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/geoip">geoip</a></td>
<td><strong>1.1.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/gender">gender</a></td>
<td><strong>1.1.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/geospatial" style="">geospatial</a></td>
<td><strong>0.2.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/gmagick" hreflang="en">gmagick</a></td>
<td><strong>2.0.5RC1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/gnupg" hreflang="en">gnupg</a></td>
<td><strong>1.4.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/gRPC">grpc</a></td>
<td><strong>1.12.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/handlebars">handlebars</a></td>
<td><strong>0.8.2</strong></td>
<td>OK, was fixed by <a href="https://github.com/jbboehr/php-handlebars/pull/53">PR #126</a>, but upstream applied another fix.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/hdr_histogram">hdr_histogram</a></td>
<td><strong>0.3.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/pecl_http">http</a> v2/3</td>
<td><strong>3.2.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/hrtime">hrtime</a></td>
<td><strong>0.6.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/ip2location">ip2location</a></td>
<td><strong>8.0.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://www.horde.org/">horde_lz4</a></td>
<td><strong>1.0.9</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/igbinary">igbinary</a></td>
<td><strong>2.0.7</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/imagick">imagick</a></td>
<td><strong>3.4.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/inotify">inotify</a></td>
<td><strong>2.0.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/json_post">json_post</a></td>
<td><strong>1.0.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/krb5">krb5</a></td>
<td><strong>1.1.2</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/leveldb">leveldb</a></td>
<td><strong>0.2.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://libvirt.org/php/" hreflang="en">libvirt</a></td>
<td><strong>0.5.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/lua">lua</a></td>
<td><strong>2.0.6</strong></td>
<td>OK, was fixed by <a href="https://github.com/laruence/php-lua/pull/37">PR #37</a> awaiting review.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-lz4">lz4</a></td>
<td><strong>0.3.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/lzf">lzf</a></td>
<td><strong>1.6.6</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/mcrypt">mcrypt</a></td>
<td><strong>1.0.1</strong></td>
<td>OK, but please don't use it</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/memcached">memcached</a></td>
<td><strong>3.1.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/memprof" hreflang="en">memprof</a></td>
<td><strong>2.0.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/Molten">molten</a></td>
<td><strong>0.1.2beta</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/mongodb">mongodb</a></td>
<td><strong>1.5.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/Mosquitto" hreflang="en">mosquitto</a></td>
<td><strong>0.4.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/msgpack">msgpack</a></td>
<td><strong>2.0.3</strong></td>
<td>OK, was fixed by <a href="https://github.com/msgpack/msgpack-php/pull/124">PR #124</a> (merged) and fixed by <a href="https://github.com/msgpack/msgpack-php/pull/125">PR #125</a> (still awaiting review).</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/mustache">mustache</a></td>
<td><strong>0.8.0</strong></td>
<td>OK, was fixed by <a href="https://github.com/jbboehr/php-mustache/pull/48">PR #48</a> merged.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/mysql">mysql</a></td>
<td><strong>1.0dev</strong></td>
<td>OK, but please don't use it</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/nsq">nsq</a></td>
<td><strong>3.1.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/oauth">oauth</a></td>
<td><strong>2.0.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/parle" style="outline: 1px dotted; outline-offset: 0px;">parle</a></td>
<td><strong>0.8.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/pdflib">pdflib</a></td>
<td><strong>4.1.2</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/Letargie/pggi">pggi</a></td>
<td><strong>0.3.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://phalconphp.com/en/">phalcon</a> v3</td>
<td><strong>3.4.1</strong></td>
<td>OK using zephir <strong>0.10.12</strong></td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/nrk/phpiredis" style="">phpiredis</a></td>
<td><strong>1.0.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/pq">pq</a></td>
<td><strong>2.1.5</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/propro">propro</a></td>
<td><strong>2.1.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/protobuf">protobuf</a></td>
<td><strong>3.7.0RC2</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/psr">psr</a></td>
<td><strong>0.4.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/radius">radius</a></td>
<td><strong>1.4.0b1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/raphf" hreflang="en">raphf</a></td>
<td><strong>2.0.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/rdkafka">rdkafka</a></td>
<td><strong>3.0.5</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/redis">redis</a></td>
<td><strong>4.1.0RC3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://git.remirepo.net/cgit/tools/php-rpminfo.git/">rpminfo</a></td>
<td><strong>0.2.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/rrd">rrd</a></td>
<td><strong>2.0.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/SeasLog">SeasLog</a></td>
<td><strong>1.8.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/scrypt">scrypt</a></td>
<td><strong>1.4.2</strong>(</td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/selinux" hreflang="en">selinux</a></td>
<td><strong>0.4.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/smbclient">smbclient</a></td>
<td><strong>1.0.0</strong></td>
<td>OK, was fixed by <a href="https://github.com/eduardok/libsmbclient-php/pull/60">PR #60</a> merged.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-snappy">snappy</a></td>
<td><strong>0.1.9</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/nbs-system/snuffleupagus" hreflang="en">snuffleupagus</a></td>
<td><strong>0.4.1</strong></td>
<td>OK, was fixed by <a href="https://github.com/nbs-system/snuffleupagus/pull/185">PR #185</a>.</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/sphinx" hreflang="en">sphinx</a></td>
<td><strong>1.4.0-dev</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/sqlsrv">sqlsrv</a><br />
<a href="https://pecl.php.net/package/pdo_sqlsrv">pdo_sqlsrv</a></td>
<td><strong>5.4.0preview</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/ssdeep">ssdeep</a></td>
<td><strong>1.1.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/stats">stats</a></td>
<td><strong>2.0.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/stomp">stomp</a></td>
<td><strong>2.0.2</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/swoole" hreflang="en">swoole</a></td>
<td><strong>4.0.2</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/sync">sync</a></td>
<td><strong>1.1.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/taint">taint</a></td>
<td><strong>2.0.5</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/tcpwrap">tcpwrap</a></td>
<td><strong>1.2.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/termbox">termbox</a></td>
<td><strong>0.1.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/timecop">timecop</a></td>
<td><strong>1.2.10</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/trace">trace</a></td>
<td><strong>1.0.1beta</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/trader">trader</a></td>
<td><strong>0.5.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/translit">translit</a></td>
<td><strong>0.6.2</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/uopz">uopz</a></td>
<td><strong>5.1.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/uuid">uuid</a></td>
<td><strong>1.0.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/varnish">varnish</a></td>
<td><strong>1.2.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/vips">vips</a></td>
<td><strong>1.0.8</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/vld">vld</a></td>
<td><strong>0.15.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/krakjoe/wkhtmltox">wkhtmltox</a></td>
<td><strong>0.3.2-dev</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/xattr">xattr</a></td>
<td><strong>1.3.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/xdebug">xdebug</a></td>
<td><strong>2.7.0beta1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/xdiff">xdiff</a></td>
<td><strong>2.0.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/xlswriter">xlswriter</a></td>
<td><strong>1.2.1</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/xmldiff">xmldiff</a></td>
<td><strong>1.1.2</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/xxtea">xxtea</a></td>
<td><strong>1.0.11</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/yaf" hreflang="en">yaf</a></td>
<td><strong>3.0.8</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/yaml">yaml</a></td>
<td><strong>2.0.3</strong></td>
<td>OK, was fixed by <a href="https://github.com/php/pecl-file_formats-yaml/pull/33">PR #33</a></td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/yar">yar</a></td>
<td><strong>2.0.4</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/zip" hreflang="en">zip</a></td>
<td><strong>1.15.3</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/zookeeper">zookeeper</a></td>
<td><strong>0.5.0</strong></td>
<td>OK</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/kjdev/php-ext-zstd">zstd</a></td>
<td><strong>0.4.14</strong></td>
<td>OK</td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>2. Work in progress</h2>
<p>These extensions have been fixed upstream (or PR are available) but no official release.</p>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
</thead>
<tbody>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/cassandra">cassandra</a></td>
<td><strong>1.3.2</strong></td>
<td>Fixed by <a href="https://github.com/datastax/php-driver/pull/126">PR #126</a> awaiting review.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://git.osgeo.org/gogs/geos/php-geos">geos</a></td>
<td><strong>1.0.0</strong></td>
<td>Fixed by <a href="https://git.osgeo.org/gitea/geos/php-geos/issues/20">PR #20</a> awaiting review.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/hprose">hprose</a></td>
<td><strong>1.6.6</strong></td>
<td>Fixed by <a href="https://github.com/hprose/hprose-pecl/pull/14">PR #14</a> merged.</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/mailparse" hreflang="en">mailparse</a></td>
<td><strong>3.0.2</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/memcache">memcache</a></td>
<td><strong>3.0.9-dev </strong></td>
<td>Fixed upstream, despite this extension in unmaintained</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/mogilefs">mogilefs</a></td>
<td><strong>0.9.3.1</strong></td>
<td>Fixed by <a href="https://github.com/lstrojny/pecl-mogilefs/pull/25">PR #25</a> merged.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/mysql_xdevapi">mysql_xdevapi</a></td>
<td><strong>8.0.11</strong></td>
<td>Fixed by <a href="https://github.com/php/pecl-database-mysql_xdevapi/pull/5">PR #5</a> awaiting review.</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/oauth">oauth</a></td>
<td><strong>2.0.2 </strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/opencensus">opencensus</a></td>
<td><strong>0.2.2</strong></td>
<td>Fixed by <a href="https://github.com/census-instrumentation/opencensus-php/pull/195">PR #165</a> but won't be merged as I can't sign the fucking google CLA.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/tony2001/pinba_extension">pinba</a></td>
<td><strong>1.1.1</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/rar">rar</a></td>
<td><strong>4.0.0</strong></td>
<td>Fixed by <a href="https://github.com/cataphract/php-rar/pull/4/files">PR #4</a> awaiting review.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/request">request</a></td>
<td><strong>1.0.0b2</strong></td>
<td>Fixed by <a href="https://github.com/pmjones/ext-request/pull/12">PR #12</a> merged and <a href="https://github.com/pmjones/ext-request/pull/12"> awaiting review.</a></td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/solr">solr</a> v2</td>
<td><strong>2.4.0</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/ssh2">ssh2</a></td>
<td><strong>1.1.2</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/uploadprogress" hreflang="en">uploadprogress</a></td>
<td><strong>1.0.3.1</strong></td>
<td>PHP 7+ compatibility fixed upstream, but probably dead.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/uv">uv</a></td>
<td><strong>0.2.2</strong></td>
<td>Fixed upstream and by <a href="https://github.com/bwoebi/php-uv/pull/60/files">PR #60</a> merged.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/v8js">v8js</a></td>
<td><strong>2.1.0</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/laruence/yac">yac</a></td>
<td><strong>2.0.2</strong></td>
<td>Fixed by <a href="https://github.com/laruence/yac/pull/89">PR #89</a> awaiting review.</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/yaconf">yaconf</a></td>
<td><strong>1.0.8-dev</strong></td>
<td>Fixed upstream</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/yaz">yaz</a></td>
<td><strong>1.2.2</strong></td>
<td>Fixed by <a href="https://github.com/indexdata/phpyaz/pull/7">PR #7</a> merged.</td>
</tr>
<tr>
<td>
<p> </p>
</td>
<td><a href="http://pecl.php.net/package/zmq" hreflang="en">zmq</a></td>
<td><strong>1.1.3</strong></td>
<td>Fixed by <a href="https://github.com/mkoppanen/php-zmq/pull/195">PR #195</a> awaiting review.</td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>3. Not compatible for now</h2>
<table border="1" cellpadding="1" cellspacing="1" class="pkg_list">
<thead>
<tr class="first">
<th width="3%">#</th>
<th width="15%">Name</th>
<th width="15%">Version</th>
<th width="67%">State</th>
</tr>
</thead>
<tbody>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/APM">APM</a></td>
<td><strong>2.1.3</strong></td>
<td>Don't build</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/ev">ev</a></td>
<td><strong>1.0.4</strong></td>
<td>Segfaults</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/jsond">jsond</a></td>
<td><strong>1.4.0</strong></td>
<td>Don't build, but perhaps unwanted</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/libsodium">libsodium</a></td>
<td><strong>1.0.7</strong></td>
<td>Deprecated version, unmaintained</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/pcs">pcs</a></td>
<td><strong>1.3.3</strong></td>
<td>Don't build</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/pthreads">pthreads</a></td>
<td><strong>3.1.6</strong></td>
<td>Don't build, broken for a while</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/ref">ref</a></td>
<td><strong>0.6.0</strong></td>
<td>Don't build, but dead project</td>
</tr>
<tr>
<td> </td>
<td><a href="https://github.com/tarantool/tarantool-php">tarantool</a></td>
<td><strong>0.3.0</strong></td>
<td>Don't build</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/stackdriver_debugger">stackdriver_debugger</a></td>
<td><strong>0.2.0</strong></td>
<td>Segfaults</td>
</tr>
<tr>
<td> </td>
<td><a href="https://pecl.php.net/package/swoole_serialize">swoole_serialize</a></td>
<td><strong>0.1.1</strong></td>
<td>Don't build</td>
</tr>
<tr>
<td> </td>
<td><a href="http://pecl.php.net/package/Weakref">Weakref</a></td>
<td><strong>0.3.3 </strong></td>
<td>Don't build</td>
</tr>
</tbody>
</table>
<h2> </h2>
<h2>3. Conclusion</h2>
<p>I think current status is quite good, <s>7.3.0 is only in <em>alpha</em> state, and GA planed for end of year, I hope everything will be fixed in the next weeks.</s></p>
<p>PHP 7.3.0 is now released and most extension are compatible.</p>
<p>Last updated on <strong>February 4th 2019</strong></p>End of PHP 7.2 FTBFS marathonurn:md5:2afdd7578031e564326eb5cd54fc99442017-11-14T11:10:00+01:002017-11-14T13:04:07+01:00RemiDéveloppementContributeurPHPplanet-php<p>QA is a very important part of my daily work, and since <strong>PHP 7.2 is available in Fedora rawhide</strong>, we have to ensure everything works as expected with this new version.</p>
<p> </p> <p>As already explained, <a class="ref-post" href="https://blog.remirepo.net/post/2014/08/12/Koschei-continuous-integration-of-PHP-stack-in-Fedora">Koschei</a> is our QA tool, used to <strong>monitor the full PHP stack</strong>, including ~60 extensions and ~500 libraries.</p>
<p>After the initial build of <strong>PHP 7.2.0RC3</strong> in rawhide (September 29th) we have around one hundred FTBFS packages (Failed To Build From Sources).</p>
<p>Today <a href="https://apps.fedoraproject.org/koschei/groups/php?order_by=state%2C-started&collection=f28">everything is ok</a>, all FTBFS have been fixed.</p>
<h2>1. Extensions</h2>
<p>Most PHP extensions are now compatible with PHP 7.2, excepted</p>
<ul>
<li><a href="https://pecl.php.net/package/xdebug">XDebug</a>, but version 2.6.0-dev works and a beta should be released soon</li>
<li><a href="https://pecl.php.net/package/timecop">Timecop</a>, this have been <a href="https://github.com/hnw/php-timecop/issues/29">reported</a> upstream, searching for a fix.</li>
</ul>
<h2>2. Mcrypt</h2>
<p>Lot of packages were broken because they sadly still rely on the old deprecated <a href="http://php.net/mcrypt">mcrypt</a> extension.</p>
<p>Despite I'm fighting for years to be able to remove it (see <a class="ref-post" href="https://blog.remirepo.net/post/2015/07/07/About-libmcrypt-and-php-mcrypt">about libmcrypt and php-mcrypt</a>), we still need it, so I have created the new <strong>php-pecl-mcrypt</strong> package from the <a href="https://pecl.php.net/package/mcrypt">PECL</a> cemetery. This is obviously only a temporary solution, this extension is deprecated, un-maintained and should die.</p>
<h2>3. Upstream patches</h2>
<p>Most of PHP projects consider fix for new PHP version as standard <em>bugfix</em>, which means, could be done in a simple minor version, without requiring any major change.</p>
<p>So, some projects have already made the few minor changes needed, but have not yet released new version including theses changes. So the work was only about finding these fix, and applying them in the Fedora packages.</p>
<h2>4. Pull Requests</h2>
<p>Most projects are not yet monitoring PHP 7.2 (not enabled in travis) so were not really aware of needed changes.</p>
<p>So, of course, the first work was to report this failure upstream, and usually providing a possible fix (PR).</p>
<p>Some are already merged, some are still waiting for review.</p>
<h2>5. Skip some</h2>
<p>For a very few packages, as no real good fix exists for now, we have to temporarily skip some tests with 7.2. Most are about the session change, which breaks unit tests (session_start() failing) without any real impact on the real usage.</p>
<h2>6. Common errors</h2>
<p>The more common errors, requiring a fix, are :</p>
<ul>
<li><a href="https://wiki.php.net/rfc/counting_non_countables">count</a> on not countable (and NULL is not countable)</li>
<li><strong>stricter</strong> prototype checking, fix for <a href="https://bugs.php.net/bug.php?id=73987">#73987</a>, originally applied in 7.1.2RC1 then reverted as introduce a small BC break.</li>
<li><a href="https://wiki.php.net/rfc/object-typehint">object</a> is a reserved keywork</li>
</ul>
<h2>7. Conclusion</h2>
<p>We are ready for PHP 7.2 in Fedora, and as usually, we done this the Fedora way: <strong>upstream first</strong>.</p>
<p>I also consider that having most extensions / libraries ready is a important criteria for the <strong>new version adoption</strong> by users.</p>Away from githuburn:md5:31f7a0191b2faed3e55a066a314cbe032017-03-23T10:14:00+01:002017-03-23T10:19:22+01:00RemiDéveloppementgitrepository <p>For some years, the package development tracking for my repository was managed on a <strong>github</strong> repository: <a href="https://github.com/remicollet/remirepo">https://github.com/remicollet/remirepo</a>.</p>
<p>This was, of course, for easiness.</p>
<p>Contrary to fashion of using this gratis, but not really free, service, I chose to self-host my work on the dedicated server already used for my repository, my blog and the forum.</p>
<p>All the sources of packages, tools and web sites will be progressively moved to the <strong>git.remirepo.net</strong> server, and can be browsed on <a href="https://git.remirepo.net/cgit">https://git.remirepo.net/cgit</a>.</p>
<p><strong>Github</strong> repository will stay open, only used for issues and other requests, but patch proposal should be send by email (preferably using <strong>git format-patch</strong> so I can apply them using <strong>git am</strong>).</p>
<p>I will also consider moving from <a href="https://git.zx2c4.com/cgit/about/">cgit</a> to <a href="https://pagure.io/pagure">pagure</a>, as soon as possible.</p>Partir de githuburn:md5:662f323e4b99e0e4131ae7d5716186cb2017-03-23T10:04:00+01:002017-03-23T10:18:14+01:00RemiDéveloppementdépôtgitplanetlibre <p>Depuis quelques années, le développement des paquets pour mon dépôt était géré dans un depôt <strong>github</strong> : <a href="https://github.com/remicollet/remirepo">https://github.com/remicollet/remirepo</a>.</p>
<p>C'était évidement une solution de facilité.</p>
<p>Au contraire de la mode actuelle d'utiliser ce service gratuit, mais pas vraiment libre, j'ai décidé d'auto-héberger mon travail sur le serveur dédié utilisé pour mon dépôt, mon blog et le forum.</p>
<p>L'ensemble des sources des paquets, des outils et des sites seront donc progressivement déplacés vers le serveur <strong>git.remirepo.net</strong>, est sont consultables sur <a href="https://git.remirepo.net/cgit">https://git.remirepo.net/cgit</a>.</p>
<p>Le dépôt <strong>github</strong> restera ouvert uniquement pour les rapports de bug ou demande diverses, mais les proposition de correctifs devront être transmises par messagerie (en utilisant de préférence <strong>git format-patch</strong> afin que je puisse les appliquer avec <strong>git am</strong>).</p>
<p>J'envisage aussi de remplacer, dès que possible, <a href="https://git.zx2c4.com/cgit/about/">cgit</a> par <a href="https://pagure.io/pagure">pagure</a>.</p>ZipArchive with encryptionurn:md5:ac1718ca0f5ddbbe42358d22c3c2ed502017-03-01T11:16:00+01:002017-03-01T15:17:01+01:00RemiDéveloppementPHPplanet-phpZip<p>Point of the situation with the development of <a href="https://pecl.php.net/package/zip">zip</a> extension version <strong>1.14.0</strong> which implements support of encrypted archives.</p> <p>This new feature implementation rely on <a href="https://nih.at/libzip/">libzip</a> library new version <strong>1.2.0</strong>.</p>
<p>For now, only build using system library is supported for this new feature, but an update of the bundled library is planed.</p>
<p>When everything will be validated, version will be released and merged in php sources (ext/zip), probably in PHP 7.2.</p>
<p><img alt="" class="media" src="https://blog.remirepo.net/public/icons/emblem-important-2-24.png" style="{figureStyle}" /> this development is in progress, nothing final, proposed methods still can change.</p>
<h2>RPM installation</h2>
<p>The <strong>php-pecl-zip</strong>-1.4.0.0-0.2.20170301dev package is available in <strong>remi-test</strong> repository (and remi-php70-test, remi-php71-test).</p>
<h2>Installation from sources</h2>
<p>From a clone of the sources, available in <a href="https://github.com/pierrejoye/php_zip">github</a> :</p>
<pre>
$ phpize
$ ./configure --with-libzip
...
checking for libzip... from pkgconfig: version 1.2.0 found in /usr/lib64
checking for zip_open in -lzip... yes
checking for zip_file_set_encryption in -lzip... yes
...
$ make
...
Build complete.
Don't forget to run 'make test'.
$ make test
...
PASS ZipArchive::setEncryption*() functions [tests/oo_encryption.phpt]
</pre>
<h2>Encrypted archive creation</h2>
<p>Three methods are available to manage encryption :</p>
<pre>
ZipArchive::setEncryptionName($name, $method [, $password]);
ZipArchive::setEncryptionIndex($index, $method [, $password]);
ZipArchive::setPassword($password);
</pre>
<p>Encryption method being one of the new constants: ZipArchive::EM_NONE, ZipArchive::EM_AES_128, ZipArchive::EM_AES_192 or ZipArchive::EM_AES_256.</p>
<p><strong>Example 1:</strong></p>
<p>Using per file password</p>
<pre>
$zip = new ZipArchive;
$zip->open(__DIR__ . '/encrypted.zip', ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE);
$zip->addFile(__FILE__, 'foo.php');
$zip->setEncryptionName('foo.php', ZipArchive::EM_AES_256, 'secret');
$zip->close();</pre>
<p><strong>Example 2:</strong></p>
<p>Using default (global) password</p>
<pre>
$zip = new ZipArchive;
$zip->open(__DIR__ . '/encrypted.zip', ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE);
$zip->setPassword('secret');
$zip->addFile(__FILE__, 'foo.php');
$zip->setEncryptionName('foo.php', ZipArchive::EM_AES_256);
$zip->close();</pre>
<h2>Encrypted archive reading</h2>
<p><strong>Example</strong> :</p>
<pre>
$zip = new ZipArchive;
$zip->open(__DIR__ . '/encrypted.zip');
print_r($zip->statName($file));
$zip->setPassword('secret');
$text = $zip->getFromName('foo.php');
$zip->close();</pre>
<p>To be noticed :</p>
<ul>
<li>the <em>setPassword</em> method call, which set the default password</li>
<li>the <em>statName</em> method output now includes a new information field: <em>encryption_method</em> (259 is ZipArchive::EM_AES_256)</li>
</ul>
<h2>Encrypted archive reading using stream</h2>
<p>The password need to be given using a stream <a href="http://php.net/context">context</a>.</p>
<p><strong>Exemple</strong> :</p>
<pre>
$ctx = stream_context_create(array(
'zip' => array(
'password' => 'secret'
)
));
$text = file_get_contents('zip://' . __DIR__ . '/encrypted.zip#foo.php', false, $ctx);</pre>
<h2>Conclusion</h2>
<p>Full script used in above examples is available in the extension sources: <a href="https://raw.githubusercontent.com/pierrejoye/php_zip/master/examples/encryption.php">encryption.php</a></p>
<p>This new feature seems really useful and will improve compatibility with other tools, such as <strong>WinZip</strong> for Windows or <strong>7za</strong> for Linux.</p>
<p>This change should be available in <strong>Fedora 26</strong> which already have libzip 1.2.0.</p>ZipArchive avec chiffrementurn:md5:1e81031b6d77384c2a1af3ffe16aebca2017-03-01T10:17:00+01:002017-03-02T07:19:36+01:00RemiDéveloppementPHPplanetlibreplanetphpfrZip<p>Un petit point d'avancement du développement de l'extension <a href="https://pecl.php.net/package/zip">zip</a> version <strong>1.14.0</strong> qui intègre désormais le support des archives chiffrées.</p> <p>L'implémentation de cette nouvelle fonctionnalité repose sur l'utilisation de la bibliothèque <a href="https://nih.at/libzip/">libzip</a> version <strong>1.2.0</strong> récemment publiée.</p>
<p>Actuellement seule la compilation avec la bibliothèque système offre ce support, mais une mise à jour de la version embarquée est prévue.</p>
<p>Lorsque tout sera validé, la version sera publiée et intégrée aux sources de php (ext/zip), sans doute pour PHP 7.2.</p>
<p><img alt="" class="media" src="https://blog.remirepo.net/public/icons/emblem-important-2-24.png" style="{figureStyle}" /> il s'agit d'un développement en cours, rien n'est définitif, et les méthodes proposées peuvent encore changer.</p>
<h2>Installation en RPM</h2>
<p>Le paquet <strong>php-pecl-zip</strong>-1.4.0.0-0.2.20170301dev est disponible dans le dépôt <strong>remi-test</strong> (et remi-php70-test, remi-php71-test).</p>
<h2>Installation depuis les sources</h2>
<p>Depuis un clone des sources disponibles dans <a href="https://github.com/pierrejoye/php_zip">github</a> :</p>
<pre>
$ phpize
$ ./configure --with-libzip
...
checking for libzip... from pkgconfig: version 1.2.0 found in /usr/lib64
checking for zip_open in -lzip... yes
checking for zip_file_set_encryption in -lzip... yes
...
$ make
...
Build complete.
Don't forget to run 'make test'.
$ make test
...
PASS ZipArchive::setEncryption*() functions [tests/oo_encryption.phpt]
</pre>
<h2>Création d'un archive chiffrée</h2>
<p>Trois méthodes permettent de gérer le cryptage</p>
<pre>
ZipArchive::setEncryptionName($name, $method [, $password]);
ZipArchive::setEncryptionIndex($index, $method [, $password]);
ZipArchive::setPassword($password);
</pre>
<p>Le choix de la méthode de chiffrement devant être une des constantes ZipArchive::EM_NONE, ZipArchive::EM_AES_128, ZipArchive::EM_AES_192 ou ZipArchive::EM_AES_256.</p>
<p><strong>Exemple 1</strong> :</p>
<p>Mot de passe par fichier</p>
<pre>
$zip = new ZipArchive;
$zip->open(__DIR__ . '/encrypted.zip', ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE);
$zip->addFile(__FILE__, 'foo.php');
$zip->setEncryptionName('foo.php', ZipArchive::EM_AES_256, 'secret');
$zip->close();</pre>
<p><strong>Exemple 2</strong> :</p>
<p>Mot de passe par defaut (global)</p>
<pre>
$zip = new ZipArchive;
$zip->open(__DIR__ . '/encrypted.zip', ZIPARCHIVE::CREATE | ZipArchive::OVERWRITE);
$zip->setPassword('secret');
$zip->addFile(__FILE__, 'foo.php');
$zip->setEncryptionName('foo.php', ZipArchive::EM_AES_256);
$zip->close();</pre>
<h2>Lecture d'une archive chiffrée</h2>
<p><strong>Exemple</strong> :</p>
<pre>
$zip = new ZipArchive;
$zip->open(__DIR__ . '/encrypted.zip');
print_r($zip->statName($file));
$zip->setPassword('secret');
$text = $zip->getFromName('foo.php');
$zip->close();</pre>
<p>A noter :</p>
<ul>
<li>utilisation de la méthode <em>setPassword</em> qui positionne le mot de passe utilisé par défaut.</li>
<li>la sortie de la méthode <em>statName</em> retourne une nouvelle information : <em>encryption_method</em> (259 pour ZipArchive::EM_AES_256)</li>
</ul>
<h2>Lecture d'un archive chiffrée via les flux</h2>
<p>Il est nécessaire de passer le mot de passe en utilisant un <a href="http://php.net/context">context</a>.</p>
<p><strong>Exemple</strong> :</p>
<pre>
$ctx = stream_context_create(array(
'zip' => array(
'password' => 'secret'
)
));
$text = file_get_contents('zip://' . __DIR__ . '/encrypted.zip#foo.php', false, $ctx);</pre>
<h2>Conclusion</h2>
<p>Le script utilisé dans les exemples ci-dessus est disponible dans les sources de l'extension : <a href="https://raw.githubusercontent.com/pierrejoye/php_zip/master/examples/encryption.php">encryption.php</a></p>
<p>Cette nouvelle fonctionnalité me semble très utile, et devrait offrir une meilleure compatibilité avec les outils existants, comme <strong>WinZip</strong> sous Windows ou <strong>7za</strong> sous Linux.</p>
<p>Pour <strong>Fedora</strong>, cette évolution devrait être disponible dans Fedora 26 qui dispose déjà de libzip 1.2.0.</p>PHP 7.1 and number checkurn:md5:11ef52099fa034acfaf07b0d52c720482016-06-11T09:40:00+02:002016-06-11T10:54:51+02:00RemiDéveloppementPHPplanet-php<p>PHP 7.1 introduce a <strong>new check during conversion of string to number</strong>.</p> <p>Example :</p>
<pre>
$ module load php70
$ php -v
PHP 7.0.8RC1 (cli) (built: Jun 8 2016 06:25:44) ( NTS )
$ php -r 'var_dump("1K" * 1024);'
int(1024)
$ module load php71
$ php -v
PHP 7.1.0alpha1 (cli) (built: Jun 8 2016 09:36:05) ( NTS )
$ php -r 'var_dump("1K" * 1024);'
PHP Notice: A non well formed numeric value encountered in Command line code on line 1
int(1024)</pre>
<p>See it on <a href="https://3v4l.org/9Lkpn">3v4l.org</a>.</p>
<p>It is obvious that this new message is useful, but such code is very common.</p>
<p><strong>Some examples in real projects:</strong></p>
<ul>
<li>GLPI in <a href="https://github.com/glpi-project/glpi/commit/25f02addabbb727cda7bb48a2c1185edb06373f5">toolbox</a> (suffix) or in <a href="https://github.com/glpi-project/glpi/commit/6dd7c3ae2a3d1866c1fd1e45a32170af5d51c97b">dropdown</a> (empty string)</li>
<li>jquery-file-upload see <a href="https://github.com/blueimp/jQuery-File-Upload/pull/3451">PR #3451</a></li>
</ul>
<p>You can start checking your code ;)</p>PHP 7.1 et contrôle des nombresurn:md5:f659ad0f6a0b0603cee4bee44b0fbfd22016-06-11T09:35:00+02:002016-06-11T08:52:17+02:00RemiDéveloppementPHPplanetlibreplanetphpfr<p>PHP 7.1 introduit un <strong>nouveau contrôle lors de la conversion d'une chaine en nombre</strong>.</p> <p>Exemple :</p>
<pre>
$ module load php70
$ php -v
PHP 7.0.8RC1 (cli) (built: Jun 8 2016 06:25:44) ( NTS )
$ php -r 'var_dump("1K" * 1024);'
int(1024)
$ module load php71
$ php -v
PHP 7.1.0alpha1 (cli) (built: Jun 8 2016 09:36:05) ( NTS )
$ php -r 'var_dump("1K" * 1024);'
PHP Notice: A non well formed numeric value encountered in Command line code on line 1
int(1024)</pre>
<p>Voir aussi sur <a href="https://3v4l.org/9Lkpn">3v4l.org</a>.</p>
<p>Il est évident que ce nouveau message est utile, mais c'est un exemple très fréquemment rencontré.</p>
<p><strong>Quelque exemples, dans des projets rééls :</strong></p>
<ul>
<li>GLPI dans <a href="https://github.com/glpi-project/glpi/commit/25f02addabbb727cda7bb48a2c1185edb06373f5">toolbox</a> (suffixe) ou dans <a href="https://github.com/glpi-project/glpi/commit/6dd7c3ae2a3d1866c1fd1e45a32170af5d51c97b">dropdown</a> (chaine vide)</li>
<li>jquery-file-upload voir <a href="https://github.com/blueimp/jQuery-File-Upload/pull/3451">PR #3451</a></li>
</ul>
<p>Vous pouvez commencer à vérifier votre code ;)</p>Tests de performance de PHPUnit et couverture de codeurn:md5:59626e0acedb6c742dc395a1f43cb5502015-11-09T09:05:00+01:002015-11-09T09:24:15+01:00RemiDéveloppementPHPPHPUnitplanetlibreplanetphpfr<p>Comme il a déjà été dit de nombreuses fois, PHP 7 est plus rapide que PHP 5.</p><p>Depuis <a href="https://phpunit.de/">PHPUnit</a> <strong>4.8</strong> vous pouvez choisir entre <a href="http://xdebug.org/">XDebug</a> et <a href="http://php.net/manual/fr/debugger-about.php">phpdbg</a> comme pilote pour récupérer les données de couverture du code, voir <a href="https://thephp.cc/news/2015/08/phpunit-4-8-code-coverage-support">PHPUnit 4.8: Code Coverage Support</a>.</p><p>Voici quelques résultats de tests de performance.</p> <p>Tous les tests utilisent <a class="ref-post" href="https://blog.remirepo.net/post/2015/10/02/PHPUnit-5.0">PHPUnit 5.0.8</a>, <a class="ref-post" href="https://blog.remirepo.net/post/2014/08/25/PHP-5.6-en-Software-Collection">PHP 5.6.15 en SCL</a> ou <a class="ref-post" href="https://blog.remirepo.net/post/2015/03/25/PHP-7.0-en-Software-Collection">PHP 7.0.0RC6 en SCL</a> et <a href="https://pecl.php.net/package-changelog.php?package=xdebug">XDebug 2.4.0beta1</a> (récemment publié avec quelques correctifs supplémentaires) sur les tests unitaires de <a href="https://github.com/composer/composer">composer</a>.</p><h2>PHP 5 sans couverture de code</h2><pre>$ php56 vendor/bin/phpunit -v
Runtime: PHP 5.6.15
Time: 4.78 seconds, Memory: 40.25Mb</pre><h2>PHP 7 sans couverture de code</h2><pre>$ php70 vendor/bin/phpunit -v
Runtime: PHP 7.0.0RC6
Time: 3.37 seconds, Memory: 22.00Mb</pre><p>Donc PHP 7 est bien plus rapide et permet de gagner <strong>30%</strong> de temps d'exécution et <strong>45%</strong> de mémoire.</p><h2>PHP 5 avec couverture de code</h2><pre>$ php56 vendor/bin/phpunit -v
Runtime: PHP 5.6.15 with Xdebug 2.4.0beta1
Time: 1.89 minutes, Memory: 90.50Mb</pre><h2>PHP 7 avec couverture de code et XDebug</h2><pre>$ php70 vendor/bin/phpunit -v
Runtime: PHP 7.0.0RC6 with Xdebug 2.4.0beta1
Time: 39.41 seconds, Memory: 52.00Mb</pre><p>PHP 7 de nouveau vraiment plus rapide (65% de temps, 43% de mémoire)</p><h2>PHP 7 avec couverture de code et phpdbg</h2><pre>$ php70-phpdbg -qrr vendor/bin/phpunit -v
Runtime: PHPDBG 7.0.0RC6
Time: 13.07 seconds, Memory: 92.00Mb</pre><p>Terriblement plus rapide :) 66% du temps d'exécution économisé comparé à XDebug, et 89% comparé à PHP 5</p><p>J'ai remarqué que beaucoup de développeurs n'était pas au courant de cette dernière solution, quel dommage ! J'espère que ce billet vous encouragera à la tester.</p><p> </p>