File tree 4 files changed +41
-31
lines changed
4 files changed +41
-31
lines changed Original file line number Diff line number Diff line change 10
10
- PHPUNIT_BIN='vendor/bin/phpunit'
11
11
- PHPUNIT_CONFIG='phpunit.xml.dist'
12
12
- PHPUNIT_FLAGS='--stop-on-failure --verbose'
13
+ - COMPOSER_FLAGS=''
13
14
14
15
matrix :
15
16
include :
16
17
- php : ' 7.4'
17
18
env :
18
19
- PHPUNIT_FLAGS="--stop-on-failure --verbose --coverage-text --coverage-clover=coverage.xml"
20
+ - php : ' nightly'
21
+ env :
22
+ - COMPOSER_FLAGS="--ignore-platform-reqs"
19
23
allow_failures :
20
24
- php : nightly
21
25
22
26
before_script :
23
27
- composer config --global repo.packagist composer https://packagist.org
24
- - composer install
28
+ - composer install $COMPOSER_FLAGS
25
29
26
30
script :
27
31
- $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
29
33
- ./bin/feedio check tests/feeds.txt
30
34
31
35
after_script :
Original file line number Diff line number Diff line change 16
16
],
17
17
"require" : {
18
18
"php" : " >=7.1" ,
19
+ "ext-dom" : " *" ,
20
+ "ext-json" : " *" ,
21
+ "ext-libxml" : " *" ,
19
22
"guzzlehttp/guzzle" : " ~6.2|~7.0" ,
20
23
"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"
23
25
},
24
26
"require-dev" : {
25
27
"phpunit/phpunit" : " ~9.3.0" ,
Original file line number Diff line number Diff line change @@ -52,12 +52,16 @@ public function discover(string $url) : array
52
52
$ stream = $ this ->client ->getResponse ($ url , new \DateTime ('@0 ' ));
53
53
54
54
$ 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
+ }
56
58
57
59
$ feeds = $ this ->extractFeeds ($ stream ->getBody ());
58
60
59
61
libxml_use_internal_errors ($ internalErrors );
60
- libxml_disable_entity_loader ($ entityLoaderDisabled );
62
+ if (LIBXML_VERSION < 20900 ) {
63
+ libxml_disable_entity_loader ($ entityLoaderDisabled );
64
+ }
61
65
62
66
return $ feeds ;
63
67
}
You can’t perform that action at this time.
0 commit comments