Skip to content

Commit

Permalink
Backport PHP >=7.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
gocom committed Nov 18, 2018
1 parent 45f5cc7 commit cfbb92d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/test export-ignore
/.coveralls.yml export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml export-ignore
Expand Down
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
language: php
php:
- 5.5
- 5.4
- 7.2
- 7.1
- 7.0
- 5.6
before_script:
- composer install
script:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.textile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ h1. Changelog

Here's a summary of changes in each release. The list doesn't include some small changes or updates to test cases.

h2. "Version 2.5.5 - 2018/11/18":https://github.com/textile/php-textile/releases/tag/v2.5.5

* Fix PHP >= 7.1 compatibility.

_The 2.5 branch was feature frozen at this point._

h2. "Version 2.5.4 - 2013/11/06":https://github.com/textile/php-textile/releases/tag/v2.5.4
Expand Down
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Additions and fixes Copyright (c) 2010 Stef Dawson http://stefdawson.co
Additions and fixes Copyright (c) 2010-13 Netcarver http://github.com/netcarver
Additions and fixes Copyright (c) 2011 Jeff Soo http://ipsedixit.net
Additions and fixes Copyright (c) 2012 Robert Wetzlmayr http://wetzlmayr.com/
Additions and fixes Copyright (c) 2012-13 Jukka Svahn http://rahforum.biz/
Additions and fixes Copyright (c) 2012-18 Jukka Svahn http://rahforum.biz/

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand All @@ -35,4 +35,3 @@ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 changes: 1 addition & 1 deletion README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ h3. Manually

The only file that is necessary for the correct operation of PHP-Textile 2.x is @classTextile.php@ from the root directory. "Grab a copy of the latest Textile v2.5.x release":https://github.com/textile/php-textile/releases, extract the archive and include the @classTextile.php@ file in your application:

bc. include "classTextile.php";
bc. require "classTextile.php";

h2. Usage

Expand Down
8 changes: 4 additions & 4 deletions classTextile.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Additions and fixes Copyright (c) 2010-13 Netcarver http://github.com/netcarver
* Additions and fixes Copyright (c) 2011 Jeff Soo http://ipsedixit.net
* Additions and fixes Copyright (c) 2012 Robert Wetzlmayr http://wetzlmayr.com/
* Additions and fixes Copyright (c) 2012-13 Jukka Svahn http://rahforum.biz/
* Additions and fixes Copyright (c) 2012-18 Jukka Svahn http://rahforum.biz/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -411,7 +411,7 @@ class Textile
* @var string
*/

protected $ver = '2.5.4';
protected $ver = '2.5.5';

/**
* Regular expression snippets.
Expand Down Expand Up @@ -1448,7 +1448,7 @@ protected function formatAttributeString(array $attribute_array)

protected function parseAttribsToArray($in, $element = '', $include_id = true, $autoclass = '')
{
$style = '';
$style = array();
$class = '';
$lang = '';
$colspan = '';
Expand Down Expand Up @@ -1553,7 +1553,7 @@ protected function parseAttribsToArray($in, $element = '', $include_id = true, $
}

$o = '';
if ($style) {
if (!empty($style)) {
$tmps = array();
foreach ($style as $s) {
$parts = explode(';', $s);
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
"php": ">=5.0.0"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"symfony/yaml": "2.3.*",
"phpunit/phpunit": "5.7.*",
"symfony/yaml": "2.4.*",
"satooshi/php-coveralls": "0.6.*"
},
"scripts": {
"test": "./vendor/bin/phpunit"
}
}

0 comments on commit cfbb92d

Please sign in to comment.