diff options
Diffstat (limited to 'vendor/sabre/xml')
-rw-r--r-- | vendor/sabre/xml/.gitignore | 14 | ||||
-rw-r--r-- | vendor/sabre/xml/.travis.yml | 22 | ||||
-rw-r--r-- | vendor/sabre/xml/CHANGELOG.md | 6 | ||||
-rw-r--r-- | vendor/sabre/xml/composer.json | 20 | ||||
-rw-r--r-- | vendor/sabre/xml/lib/Service.php | 18 | ||||
-rw-r--r-- | vendor/sabre/xml/lib/Version.php | 2 |
6 files changed, 46 insertions, 36 deletions
diff --git a/vendor/sabre/xml/.gitignore b/vendor/sabre/xml/.gitignore index a85591183..9715e9028 100644 --- a/vendor/sabre/xml/.gitignore +++ b/vendor/sabre/xml/.gitignore @@ -5,18 +5,4 @@ composer.lock # Tests tests/cov tests/.phpunit.result.cache -.*.swp - -# Composer binaries -bin/phpunit -bin/php-cs-fixer -bin/phpstan -bin/phpstan.phar - -# Vim -.*.swp - -# IDEs -/.idea - .php_cs.cache diff --git a/vendor/sabre/xml/.travis.yml b/vendor/sabre/xml/.travis.yml index 953c2a60b..ebca5e837 100644 --- a/vendor/sabre/xml/.travis.yml +++ b/vendor/sabre/xml/.travis.yml @@ -9,28 +9,30 @@ php: env: global: - RUN_PHPSTAN="FALSE" + matrix: + - PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml" + - PREFER_LOWEST="--prefer-lowest" REPORT_COVERAGE="FALSE" WITH_COVERAGE="" matrix: include: - name: 'PHPStan' - php: 7.2 - env: RUN_PHPSTAN="TRUE" + php: 7.4 + env: + - RUN_PHPSTAN="TRUE" + - REPORT_COVERAGE="FALSE" fast_finish: true cache: directories: - $HOME/.composer/cache -install: - - if [ $RUN_PHPSTAN == "TRUE" ]; then composer require --dev phpstan/phpstan:^0.12; fi - before_script: - - composer install + - composer update $PREFER_LOWEST script: - - if [ $RUN_PHPSTAN == "FALSE" ]; then ./bin/php-cs-fixer fix --dry-run --diff; fi - - if [ $RUN_PHPSTAN == "FALSE" ]; then ./bin/phpunit --configuration tests/phpunit.xml --coverage-clover=coverage.xml; fi - - if [ $RUN_PHPSTAN == "TRUE" ]; then php ./bin/phpstan analyse -c phpstan.neon lib; fi + - if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi + - if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi + - if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi after_success: - - bash <(curl -s https://codecov.io/bash) + - if [ $REPORT_COVERAGE == "TRUE" ]; then bash <(curl -s https://codecov.io/bash); fi diff --git a/vendor/sabre/xml/CHANGELOG.md b/vendor/sabre/xml/CHANGELOG.md index bbfc8ddec..9d70609f8 100644 --- a/vendor/sabre/xml/CHANGELOG.md +++ b/vendor/sabre/xml/CHANGELOG.md @@ -1,6 +1,12 @@ ChangeLog ========= +2.2.1 (2020-05-11) +------------------ + +* #183: fixed warning 'xml cannot be empty while reading', which might lead to a infinite-loop (@mrow4a) +* #179, #178, #177 #176: several build/continous integration related improvements (@phil-davis) + 2.2.0 (2020-01-31) ------------------ diff --git a/vendor/sabre/xml/composer.json b/vendor/sabre/xml/composer.json index 2af0dd458..40abe149b 100644 --- a/vendor/sabre/xml/composer.json +++ b/vendor/sabre/xml/composer.json @@ -45,9 +45,23 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "~2.16.1", - "phpunit/phpunit" : "^7 || ^8" + "phpstan/phpstan": "^0.12", + "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0" }, - "config" : { - "bin-dir" : "bin/" + "scripts": { + "phpstan": [ + "phpstan analyse lib tests" + ], + "cs-fixer": [ + "php-cs-fixer fix" + ], + "phpunit": [ + "phpunit --configuration tests/phpunit.xml" + ], + "test": [ + "composer phpstan", + "composer cs-fixer", + "composer phpunit" + ] } } diff --git a/vendor/sabre/xml/lib/Service.php b/vendor/sabre/xml/lib/Service.php index 9a2c47794..596c93cc4 100644 --- a/vendor/sabre/xml/lib/Service.php +++ b/vendor/sabre/xml/lib/Service.php @@ -115,12 +115,13 @@ class Service // Unfortunately the XMLReader doesn't support streams. When it // does, we can optimize this. $input = (string) stream_get_contents($input); + } - // If input is an empty string, then its safe to throw exception - if ('' === $input) { - throw new ParseException('The input element to parse is empty. Do not attempt to parse'); - } + // If input is empty, then its safe to throw exception + if (empty($input)) { + throw new ParseException('The input element to parse is empty. Do not attempt to parse'); } + $r = $this->getReader(); $r->contextUri = $contextUri; $r->XML($input, null, $this->options); @@ -158,12 +159,13 @@ class Service // Unfortunately the XMLReader doesn't support streams. When it // does, we can optimize this. $input = (string) stream_get_contents($input); + } - // If input is empty string, then its safe to throw exception - if ('' === $input) { - throw new ParseException('The input element to parse is empty. Do not attempt to parse'); - } + // If input is empty, then its safe to throw exception + if (empty($input)) { + throw new ParseException('The input element to parse is empty. Do not attempt to parse'); } + $r = $this->getReader(); $r->contextUri = $contextUri; $r->XML($input, null, $this->options); diff --git a/vendor/sabre/xml/lib/Version.php b/vendor/sabre/xml/lib/Version.php index cf2810c2a..56c5c5285 100644 --- a/vendor/sabre/xml/lib/Version.php +++ b/vendor/sabre/xml/lib/Version.php @@ -16,5 +16,5 @@ class Version /** * Full version number. */ - const VERSION = '2.2.0'; + const VERSION = '2.2.1'; } |