From 92e0ca8fd30b257a993a66511198267ca7d9d8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Wer=C5=82os?= <9282069+kubawerlos@users.noreply.github.com> Date: Mon, 25 Mar 2019 13:51:00 +0100 Subject: [PATCH] Use composer-require-checker (#10) --- .composer-require-checker.json | 9 +++++++++ .travis.yml | 4 +++- composer.json | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .composer-require-checker.json diff --git a/.composer-require-checker.json b/.composer-require-checker.json new file mode 100644 index 0000000..34521cf --- /dev/null +++ b/.composer-require-checker.json @@ -0,0 +1,9 @@ +{ + "symbol-whitelist": [ + "PhpCsFixer\\PhpunitConstraintXmlMatchesXsd\\Constraint\\XmlMatchesXsd", + + "null", "true", "false", + "static", "self", "parent", + "array", "string", "int", "float", "bool", "iterable", "callable", "void" + ] +} diff --git a/.travis.yml b/.travis.yml index 88c1c65..ba85c50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ before_install: - composer global show -ND 2>&1 | grep "hirak/prestissimo" || travis_retry composer global require $DEFAULT_COMPOSER_FLAGS hirak/prestissimo install: - - composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS + - travis_retry composer update $DEFAULT_COMPOSER_FLAGS $COMPOSER_FLAGS - composer info -D | sort script: @@ -46,10 +46,12 @@ jobs: stage: Static code analysis php: 7.3 install: + - travis_retry composer update $DEFAULT_COMPOSER_FLAGS - travis_retry composer update -d dev-tools $DEFAULT_COMPOSER_FLAGS - composer info -d dev-tools -D | sort script: - composer validate --strict || travis_terminate 1 - composer normalize -d ./dev-tools ./../composer.json --dry-run || travis_terminate 1 + - dev-tools/vendor/bin/composer-require-checker check composer.json --config-file=.composer-require-checker.json || travis_terminate 1 - dev-tools/vendor/bin/phpmd src,tests text phpmd.xml || travis_terminate 1 - dev-tools/vendor/bin/php-cs-fixer fix --diff --dry-run -v || travis_terminate 1 diff --git a/composer.json b/composer.json index ef5ca01..02b05ad 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,8 @@ ], "require": { "php": "^5.5 || ^7.0", + "ext-dom": "*", + "ext-libxml": "*", "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0 || ^8.0", "phpunitgoodpractices/polyfill": "^1.1" },