Skip to content

Commit 3bc969a

Browse files
committed
Merge branch 'Psr7-Decorators'
Closes #67 Fixes #66
2 parents 4c76c96 + 336f97c commit 3bc969a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4205
-8542
lines changed

.travis.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ sudo: false
33
language: php
44

55
php:
6-
- 7.0
76
- 7.1
87
- 7.2
98
- nightly
@@ -13,14 +12,14 @@ matrix:
1312
- php: nightly
1413

1514
before_script:
16-
- if [[ "$TRAVIS_PHP_VERSION" == '7.0' ]]; then composer require satooshi/php-coveralls:^0.7 squizlabs/php_codesniffer:^2.5 -n ; fi
17-
- if [[ "$TRAVIS_PHP_VERSION" != '7.0' ]]; then composer install -n ; fi
15+
- composer require php-coveralls/php-coveralls:^2.1.0
16+
- composer install -n
1817

1918
script:
20-
- if [[ "$TRAVIS_PHP_VERSION" == '7.0' ]]; then mkdir -p build/logs && phpunit --coverage-clover build/logs/clover.xml ; fi
21-
- if [[ "$TRAVIS_PHP_VERSION" != '7.0' ]]; then vendor/bin/phpunit ; fi
22-
- if [[ "$TRAVIS_PHP_VERSION" == '7.0' ]]; then vendor/bin/phpcs ; fi
23-
- vendor/bin/phpstan analyse -l 3 src/
19+
- mkdir -p build/logs && phpunit --coverage-clover build/logs/clover.xml
20+
- vendor/bin/phpunit
21+
- vendor/bin/phpcs
22+
- vendor/bin/phpstan analyse src tests
2423

2524
after_script:
26-
- if [[ "$TRAVIS_PHP_VERSION" == '7.0' ]]; then php vendor/bin/coveralls -v ; fi
25+
- php vendor/bin/coveralls -v

README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Slim-Http
22

3-
Strict PSR-7 implementation used by the Slim Framework, but you may use it
4-
separately with any framework compatible with the PSR-7 standard.
3+
Slim PSR-7 Object Decorators
54

65
[![Build Status](https://travis-ci.org/slimphp/Slim-Http.svg?branch=master)](https://travis-ci.org/slimphp/Slim-Http)
76
[![Coverage Status](https://coveralls.io/repos/slimphp/Slim-Http/badge.svg?branch=master&service=github)](https://coveralls.io/github/slimphp/Slim-Http?branch=master)
@@ -18,7 +17,7 @@ $ composer require slim/http "^0.1"
1817
```
1918

2019
This will install the `slim/http` component and all required dependencies.
21-
PHP 7.0, or newer, is required.
20+
PHP 7.1, or newer, is required.
2221

2322
## Usage
2423

composer.json

+21-15
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "slim/http",
33
"type": "library",
4-
"description": "Slim's PSR-7 implementation",
5-
"keywords": ["psr7","psr-7","http"],
4+
"description": "Slim PSR-7 Object Decorators",
5+
"keywords": ["psr7", "psr-7", "http"],
66
"homepage": "http://slimframework.com",
77
"license": "MIT",
88
"authors": [
@@ -23,20 +23,24 @@
2323
}
2424
],
2525
"require": {
26-
"php": ">=7.0.0",
27-
"psr/http-message": "^1.0"
26+
"ext-json": "*",
27+
"ext-libxml": "*",
28+
"ext-SimpleXML": "*",
29+
"php": "^7.1",
30+
"psr/http-factory": "^1.0",
31+
"psr/http-message": "^1.0",
32+
"php-http/message-factory": "^1.0"
2833
},
2934
"require-dev": {
30-
"squizlabs/php_codesniffer": "^2.5",
31-
"phpunit/phpunit": "^6.0|^7.0",
32-
"php-http/psr7-integration-tests": "dev-master",
33-
"phpstan/phpstan": "^0.9"
35+
"nyholm/psr7": "^1.0",
36+
"phpunit/phpunit": "^7.0",
37+
"phpstan/phpstan": "^0.10.3",
38+
"squizlabs/php_codesniffer": "^3.3.2",
39+
"zendframework/zend-diactoros": "^2.0",
40+
"php-http/psr7-integration-tests": "dev-master"
3441
},
3542
"provide": {
36-
"psr/http-message-implementation": "1.0"
37-
},
38-
"conflict": {
39-
"slim/slim": "^3.0"
43+
"php-http/message-factory": "^1.0"
4044
},
4145
"autoload": {
4246
"psr-4": {
@@ -51,9 +55,11 @@
5155
"scripts": {
5256
"test": [
5357
"@phpunit",
54-
"@phpcs"
58+
"@phpcs",
59+
"@phpstan"
5560
],
56-
"phpunit": "php vendor/bin/phpunit",
57-
"phpcs": "php vendor/bin/phpcs"
61+
"phpunit": "php vendor/bin/phpunit --process-isolation",
62+
"phpcs": "php vendor/bin/phpcs",
63+
"phpstan": "php -d memory_limit=-1 vendor/bin/phpstan analyse src tests"
5864
}
5965
}

phpstan.neon.dist

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
level: max
3+
ignoreErrors:
4+
- '#Access to an undefined property Slim\\Http\\Decorators\\ResponseDecorator::\$foo#'
5+
- '#Access to an undefined property Slim\\Http\\Decorators\\ServerRequestDecorator::\$foo#'
6+
- '#Access to an undefined property Slim\\Http\\Decorators\\UriDecorator::\$foo#'
7+
- '#Parameter \#1 \$port of method Slim\\Http\\Decorators\\UriDecorator::withPort() expects int|null, string given#'

src/Body.php

-22
This file was deleted.

src/Collection.php

-203
This file was deleted.

src/CollectionInterface.php

-32
This file was deleted.

0 commit comments

Comments
 (0)