PHP 7.1 compatibility

Closes #96
Closes #101
Closes #102
This commit is contained in:
ankitm123 2017-02-23 10:42:52 +08:00 committed by Adrien Crivelli
parent a1a03428e7
commit 5df662e1a3
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
5 changed files with 79 additions and 25 deletions

View File

@ -8,10 +8,9 @@ php:
matrix:
include:
- php: 7.0
- php: 7.1
env: COVERAGE=1
allow_failures:
- php: 7.1
- php: hhvm
cache:

View File

@ -30,12 +30,12 @@
"ext-xmlwriter": "*"
},
"require-dev": {
"dompdf/dompdf": "^0.7.0",
"mpdf/mpdf": "^6.1",
"tecnickcom/tcpdf": "^6.2",
"squizlabs/php_codesniffer": "^2.7",
"phpunit/phpunit": "^5.7",
"friendsofphp/php-cs-fixer": "^2.0"
"friendsofphp/php-cs-fixer": "^2.0",
"dompdf/dompdf": "^0.8.0"
},
"suggest": {
"ext-zip": "Required to handle .xlsx .ods or .gnumeric files",

90
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "97eae2a53946fe7524d2f8840bcc791e",
"content-hash": "c03c0e68b10b664a8fd8dc61adfacda2",
"packages": [],
"packages-dev": [
{
@ -63,28 +63,29 @@
},
{
"name": "dompdf/dompdf",
"version": "v0.7.0",
"version": "v0.8.0",
"source": {
"type": "git",
"url": "https://github.com/dompdf/dompdf.git",
"reference": "5c98652b1a5beb7e3cc8ec35419b2828dd63ab14"
"reference": "0f418c6b58fdeafc2a0e80eb1fa5e644e185089c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/5c98652b1a5beb7e3cc8ec35419b2828dd63ab14",
"reference": "5c98652b1a5beb7e3cc8ec35419b2828dd63ab14",
"url": "https://api.github.com/repos/dompdf/dompdf/zipball/0f418c6b58fdeafc2a0e80eb1fa5e644e185089c",
"reference": "0f418c6b58fdeafc2a0e80eb1fa5e644e185089c",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-gd": "*",
"ext-mbstring": "*",
"phenx/php-font-lib": "0.4.*",
"phenx/php-svg-lib": "0.1.*",
"phenx/php-font-lib": "0.5.*",
"phenx/php-svg-lib": "0.2.*",
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
"phpunit/phpunit": "4.8.*",
"squizlabs/php_codesniffer": "2.*"
},
"type": "library",
"extra": {
@ -120,7 +121,7 @@
],
"description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
"homepage": "https://github.com/dompdf/dompdf",
"time": "2016-05-11T00:36:29+00:00"
"time": "2017-02-16T02:40:40+00:00"
},
{
"name": "friendsofphp/php-cs-fixer",
@ -282,22 +283,25 @@
},
{
"name": "phenx/php-font-lib",
"version": "0.4",
"version": "0.5",
"source": {
"type": "git",
"url": "https://github.com/PhenX/php-font-lib.git",
"reference": "b8af0cacdc3cbf1e41a586fcb78f506f4121a088"
"reference": "19ad2bebc35be028fcc0221025fcbf3d436a3962"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/b8af0cacdc3cbf1e41a586fcb78f506f4121a088",
"reference": "b8af0cacdc3cbf1e41a586fcb78f506f4121a088",
"url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/19ad2bebc35be028fcc0221025fcbf3d436a3962",
"reference": "19ad2bebc35be028fcc0221025fcbf3d436a3962",
"shasum": ""
},
"require-dev": {
"phpunit/phpunit": "^4.8"
},
"type": "library",
"autoload": {
"psr-0": {
"FontLib\\": "src/"
"psr-4": {
"FontLib\\": "src/FontLib"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -312,22 +316,25 @@
],
"description": "A library to read, parse, export and make subsets of different types of font files.",
"homepage": "https://github.com/PhenX/php-font-lib",
"time": "2015-05-06T20:02:39+00:00"
"time": "2017-02-11T10:58:43+00:00"
},
{
"name": "phenx/php-svg-lib",
"version": "0.1",
"version": "v0.2",
"source": {
"type": "git",
"url": "https://github.com/PhenX/php-svg-lib.git",
"reference": "b419766515b3426c6da74b0e29e93d71c4f17099"
"reference": "de291bec8449b89acfe85691b5c71434797959dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/b419766515b3426c6da74b0e29e93d71c4f17099",
"reference": "b419766515b3426c6da74b0e29e93d71c4f17099",
"url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/de291bec8449b89acfe85691b5c71434797959dc",
"reference": "de291bec8449b89acfe85691b5c71434797959dc",
"shasum": ""
},
"require": {
"sabberworm/php-css-parser": "6.0.*"
},
"type": "library",
"autoload": {
"psr-0": {
@ -346,7 +353,7 @@
],
"description": "A library to read, parse and export to PDF SVG files.",
"homepage": "https://github.com/PhenX/php-svg-lib",
"time": "2015-05-06T18:49:49+00:00"
"time": "2016-12-13T20:25:45+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@ -989,6 +996,47 @@
],
"time": "2016-10-10T12:19:37+00:00"
},
{
"name": "sabberworm/php-css-parser",
"version": "6.0.1",
"source": {
"type": "git",
"url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
"reference": "9ea4b00c569b19f731d0c2e0e802055877ff40c2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/9ea4b00c569b19f731d0c2e0e802055877ff40c2",
"reference": "9ea4b00c569b19f731d0c2e0e802055877ff40c2",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"autoload": {
"psr-0": {
"Sabberworm\\CSS": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Raphael Schweikert"
}
],
"description": "Parser for CSS Files written in PHP",
"homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser",
"keywords": [
"css",
"parser",
"stylesheet"
],
"time": "2015-08-24T08:48:52+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
"version": "1.0.0",

View File

@ -1741,6 +1741,7 @@ class PclZip
$v_memory_limit = ini_get('memory_limit');
$v_memory_limit = trim($v_memory_limit);
$last = strtolower(substr($v_memory_limit, -1));
$v_memory_limit = (int) $v_memory_limit;
if ($last == 'g') {
//$v_memory_limit = $v_memory_limit*1024*1024*1024;

View File

@ -2837,6 +2837,8 @@ class Worksheet extends BIFFwriter
$type = 0x07;
break;
}
$type = (int) $type;
$options |= $type << 0;
// error style
@ -2852,6 +2854,8 @@ class Worksheet extends BIFFwriter
$errorStyle = 0x02;
break;
}
$errorStyle = (int) $errorStyle;
$options |= $errorStyle << 4;
// explicit formula?
@ -2899,6 +2903,8 @@ class Worksheet extends BIFFwriter
$operator = 0x07;
break;
}
$operator = (int) $operator;
$options |= $operator << 20;
$data = pack('V', $options);