Compare commits

..
3 Commits
Author SHA1 Message Date
Jeremy Benoist 8667dae74b Merge pull request #4 from j0k3r/php53
Restore compatibility with PHP 5.3
2015-06-11 09:39:26 +02:00
Jeremy Benoist eecae93161 Try hhvm instead of nightly
HHVM nightly is no longer supported on Ubuntu Precise.
See https://github.com/travis-ci/travis-ci/issues/3788 and https://github.com/facebook/hhvm/issues/5220
2015-06-10 09:33:25 +02:00
Jeremy Benoist 814c6e4730 Restore compatibility with PHP 5.3 2015-06-10 09:33:21 +02:00
4 changed files with 13 additions and 6 deletions
+4 -2
View File
@@ -1,18 +1,20 @@
language: php
php:
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
- nightly
- hhvm-nightly
- hhvm
# run build against nightly but allow them to fail
matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm-nightly
- php: hhvm
# faster builds on new travis setup not using sudo
sudo: false
+1 -1
View File
@@ -24,7 +24,7 @@
"role": "Developer (original JS version)"
}],
"require": {
"php": ">=5.4",
"php": ">=5.3.3",
"ext-tidy": ">=1.2"
},
"autoload": {
+1 -1
View File
@@ -27,6 +27,6 @@
</filter>
<logging>
<log type="coverage-html" target="coverage" title="FullText" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-html" target="coverage" title="Readability" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70"/>
</logging>
</phpunit>
+7 -2
View File
@@ -47,7 +47,6 @@ namespace Readability;
*/
class Readability
{
public $version = '1.7.2-without-multi-page';
public $convertLinksToFootnotes = false;
public $revertForcedParagraphElements = true;
public $articleTitle;
@@ -195,7 +194,13 @@ class Readability
libxml_use_internal_errors(true);
$this->dom = new \DOMDocument();
$this->dom->preserveWhiteSpace = false;
@$this->dom->loadHTML($html, LIBXML_NOBLANKS | LIBXML_COMPACT | LIBXML_NOERROR);
if (PHP_VERSION_ID >= 50400) {
$this->dom->loadHTML($html, LIBXML_NOBLANKS | LIBXML_COMPACT | LIBXML_NOERROR);
} else {
$this->dom->loadHTML($html);
}
libxml_use_internal_errors(false);
}