Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to meta files and support for PHPUnit 9 #161

Merged
merged 5 commits into from
Nov 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
.github/ export-ignore
tests/ export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php_cs export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
phpstan.neon.dist export-ignore
phpunit.xml.dist export-ignore
.github/ export-ignore
tests/ export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php_cs export-ignore
.scrutinizer.yml export-ignore
.travis.yml export-ignore
phpstan.neon.dist export-ignore
phpstan.baseline.dist export-ignore
phpunit.xml.dist export-ignore
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/composer.lock
/phpstan.neon
/phpunit.xml
/vendor/
composer.lock
phpstan.neon
phpunit.xml
vendor
.php_cs.cache
.phpunit.result.cache
20 changes: 7 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,21 @@ php:

env:
global:
- TEST_COMMAND="composer test"
- TEST_COMMAND="./vendor/bin/phpunit"

branches:
except:
- /^patch-.*$/

matrix:
fast_finish: true
allow_failures:
- php: nightly
env: COMPOSER_FLAGS="--ignore-platform-reqs"
include:
- php: 7.2
name: Lowest version of dependencies
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
- php: nightly
name: PHP 8.0
env: COMPOSER_FLAGS="--ignore-platform-reqs"

before_install:
- if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;
- name: "PHP: 8.0"
php: nightly

- name: "Lowest version of dependencies"
php: 7.2
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="./vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"

install:
- composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
Expand Down
8 changes: 2 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A fast PHP7 implementation of PSR-7",
"license": "MIT",
"keywords": ["psr-7", "psr-17"],
"homepage": "http://tnyholm.se",
"homepage": "https://tnyholm.se",
"authors": [
{
"name": "Tobias Nyholm",
Expand All @@ -21,7 +21,7 @@
"psr/http-factory": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^7.5 || 8.5",
"phpunit/phpunit": "^7.5 || 8.5 || 9.4",
"php-http/psr7-integration-tests": "^1.0",
"http-interop/http-factory-tests": "^0.8",
"symfony/error-handler": "^4.4"
Expand All @@ -40,10 +40,6 @@
"Tests\\Nyholm\\Psr7\\": "tests/"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml"
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
Expand Down
47 changes: 22 additions & 25 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true" bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="Unit tests">
<directory>tests/</directory>
</testsuite>

<testsuite name="Integration tests">
<directory>./vendor/http-interop/http-factory-tests/test</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>

<php>
<const name="REQUEST_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="RESPONSE_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="SERVER_REQUEST_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="UPLOADED_FILE_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="URI_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="STREAM_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
</php>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Unit tests">
<directory>tests/</directory>
</testsuite>
<testsuite name="Integration tests">
<directory>./vendor/http-interop/http-factory-tests/test</directory>
</testsuite>
</testsuites>
<php>
<const name="REQUEST_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="RESPONSE_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="SERVER_REQUEST_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="UPLOADED_FILE_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="URI_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
<const name="STREAM_FACTORY" value="Nyholm\Psr7\Factory\Psr17Factory"/>
</php>
</phpunit>