Skip to content

Commit 96ca6d0

Browse files
authored
Issue/304 (#307)
* Goodbye PHP 7.2 * Update Guzzle * Ignore-platform-reqs on PHP Nightly * Added missing extensions * PHP 8 uses libxml-2.9 * inspect CS only when clover has been generated
1 parent c445d7d commit 96ca6d0

File tree

4 files changed

+41
-31
lines changed

4 files changed

+41
-31
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,26 @@ env:
1010
- PHPUNIT_BIN='vendor/bin/phpunit'
1111
- PHPUNIT_CONFIG='phpunit.xml.dist'
1212
- PHPUNIT_FLAGS='--stop-on-failure --verbose'
13+
- COMPOSER_FLAGS=''
1314

1415
matrix:
1516
include:
1617
- php: '7.4'
1718
env:
1819
- PHPUNIT_FLAGS="--stop-on-failure --verbose --coverage-text --coverage-clover=coverage.xml"
20+
- php: 'nightly'
21+
env:
22+
- COMPOSER_FLAGS="--ignore-platform-reqs"
1923
allow_failures:
2024
- php: nightly
2125

2226
before_script:
2327
- composer config --global repo.packagist composer https://packagist.org
24-
- composer install
28+
- composer install $COMPOSER_FLAGS
2529

2630
script :
2731
- $PHPUNIT_BIN -c $PHPUNIT_CONFIG $PHPUNIT_FLAGS
28-
- ./vendor/bin/php-cs-fixer fix --dry-run src/
32+
- if [ -f "coverage.xml" ]; then ./vendor/bin/php-cs-fixer fix --dry-run src/; fi
2933
- ./bin/feedio check tests/feeds.txt
3034

3135
after_script:

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
],
1717
"require": {
1818
"php": ">=7.1",
19+
"ext-dom": "*",
20+
"ext-json": "*",
21+
"ext-libxml": "*",
1922
"guzzlehttp/guzzle": "~6.2|~7.0",
2023
"psr/log": "~1.0",
21-
"symfony/console": "~3.4|~4.0|~5.0",
22-
"ext-dom": "*"
24+
"symfony/console": "~3.4|~4.0|~5.0"
2325
},
2426
"require-dev": {
2527
"phpunit/phpunit": "~9.3.0",

composer.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/FeedIo/Explorer.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,16 @@ public function discover(string $url) : array
5252
$stream = $this->client->getResponse($url, new \DateTime('@0'));
5353

5454
$internalErrors = libxml_use_internal_errors(true);
55-
$entityLoaderDisabled = libxml_disable_entity_loader(true);
55+
if (LIBXML_VERSION < 20900) {
56+
$entityLoaderDisabled = libxml_disable_entity_loader(true);
57+
}
5658

5759
$feeds = $this->extractFeeds($stream->getBody());
5860

5961
libxml_use_internal_errors($internalErrors);
60-
libxml_disable_entity_loader($entityLoaderDisabled);
62+
if (LIBXML_VERSION < 20900) {
63+
libxml_disable_entity_loader($entityLoaderDisabled);
64+
}
6165

6266
return $feeds;
6367
}

0 commit comments

Comments
 (0)