[
https://issues.apache.org/jira/browse/AVRO-2527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16916412#comment-16916412
]
Kengo Seki commented on AVRO-2527:
----------------------------------
[~busbey] AFAIK, [PHP 6 is an abandoned version|https://wiki.php.net/rfc/php6]
and there's no 6.x release in the official download page
([https://www.php.net/downloads.php] and
[https://www.php.net/releases/index.php]). So I think we can simply ignore it.
Regarding 5.6, this change doesn't break the compatibility immediately, at
least for the main code under the lib directory. We can make sure that as
follows:
{code:java}
~/repos/avro$ git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
~/repos/avro$ curl -sL https://github.com/apache/avro/pull/622.patch | git
apply
~/repos/avro$ git diff --stat
lang/php/lib/avro/datum.php | 2 +-
lang/php/test/AllTests.php | 4 ++--
lang/php/test/DataFileTest.php | 30 ++++++++++++++++++------------
lang/php/test/DatumIOTest.php | 2 +-
lang/php/test/FloatIntEncodingTest.php | 2 +-
lang/php/test/IODatumReaderTest.php | 2 +-
lang/php/test/InterOpTest.php | 2 +-
lang/php/test/LongEncodingTest.php | 2 +-
lang/php/test/NameTest.php | 4 ++--
lang/php/test/ProtocolFileTest.php | 2 +-
lang/php/test/SchemaTest.php | 2 +-
lang/php/test/StringIOTest.php | 2 +-
share/docker/Dockerfile | 8 +++++---
13 files changed, 36 insertions(+), 28 deletions(-)
~/repos/avro$ ./build.sh docker
(snip)
sekikn@b752bbc0e0b0:~/avro$ exit # exit and relogin as root for installing PHP
5.6
+ (( 0 ))
+ exit 0
~/repos/avro$ docker run -it -v $(pwd):/root/avro -w /root/avro avro-build bash
root@7219f6f7e4f5:~/avro# apt-get update
(snip)
root@7219f6f7e4f5:~/avro# apt-get install -y php5.6 php5.6-gmp
(snip)
root@7219f6f7e4f5:~/avro# curl -sL -o phpunit
https://phar.phpunit.de/phpunit-5.7.phar # PHPUnit 5.7 is the only version
that supports both PHP 5.6 and 7.x
root@7219f6f7e4f5:~/avro/lang/php$ php7.1 /usr/local/bin/phpunit -v
test/AllTests.php # Confirm that all tests pass for PHP 7.1
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
Runtime: PHP 7.1.31-1+0~20190807.22+debian9~1.gbpf402ed
............................................................... 63 / 404 ( 15%)
.......................................III..................... 126 / 404 ( 31%)
............................................................... 189 / 404 ( 46%)
............................................................... 252 / 404 ( 62%)
............................................................... 315 / 404 ( 77%)
............................................................... 378 / 404 ( 93%)
.......................... 404 / 404 (100%)
Time: 133 ms, Memory: 12.00MB
(snip)
OK, but incomplete, skipped, or risky tests!
Tests: 404, Assertions: 854, Incomplete: 3.
root@7219f6f7e4f5:~/avro/lang/php$ php5.6 /usr/local/bin/phpunit -v
test/AllTests.php # Confirm that all tests also pass for PHP 5.6
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.
Runtime: PHP 5.6.40-10+0~20190807.18+debian9~1.gbp5642bf
............................................................... 63 / 404 ( 15%)
.......................................III..................... 126 / 404 ( 31%)
............................................................... 189 / 404 ( 46%)
............................................................... 252 / 404 ( 62%)
............................................................... 315 / 404 ( 77%)
............................................................... 378 / 404 ( 93%)
.......................... 404 / 404 (100%)
Time: 212 ms, Memory: 19.50MB
(snip)
OK, but incomplete, skipped, or risky tests!
Tests: 404, Assertions: 854, Incomplete: 3.
{code}
So, how about the following:
* Update lang/php/README.md to tell users the following things:
** PHP 7.x is the officially supported version by Avro
** But the current code is also supposed to work with PHP 5.6, though we may
drop that support in the future version
* Update the following build-related files to test backward compatibility in
the CI:
** In share/docker/Dockerfile, download both PHP 5.6 and 7.1, and PHPUnit 5.7
** In build.sh, test backward compatibility for PHP 5.6, in addition to the
ordinal test for PHP 7.x, if both PHP 5.6 and PHPUnit 5.7 exist
> Upgrade PHP version to 7.x
> --------------------------
>
> Key: AVRO-2527
> URL: https://issues.apache.org/jira/browse/AVRO-2527
> Project: Apache Avro
> Issue Type: Improvement
> Components: php
> Reporter: Kengo Seki
> Assignee: Kengo Seki
> Priority: Major
>
> Avro currently supports PHP 5.x, but [its support period has expired on Jan
> 2019|https://www.php.net/supported-versions.php].
> We should support PHP 7.1+, on which the community support is continuing at
> this time.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)