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

PSR-7 Decorators Migration #67

Merged
merged 30 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6b4aff7
update README repository description and PHP version
l0gicgate Oct 16, 2018
3072554
update composer project description and dependencies
l0gicgate Oct 16, 2018
54894d0
remove all existing Slim-Http src/ and tests/ files
l0gicgate Oct 16, 2018
a7c10c5
add ResponseDecorator, ServerRequestDecorator and UriDecorator
l0gicgate Oct 16, 2018
5f6435e
add DecoratedResponseFactory, DecoratedServerRequestFactory and Decor…
l0gicgate Oct 16, 2018
b410356
add PSR-17 providers to enable testing with two different PSR-7 imple…
l0gicgate Oct 16, 2018
748834d
remove unused declarations in PHP Unit bootstrapper
l0gicgate Oct 16, 2018
5178e2e
add supporting tests for all decorators
l0gicgate Oct 16, 2018
1475320
downgrade PHP version to 7.0 in composer configuration
l0gicgate Oct 16, 2018
7cfbe60
upgrade php version to 7.1 to meet PHPUnit requirement
l0gicgate Oct 16, 2018
da3bc9d
remove PHP 7.0 from Travis-CI config
l0gicgate Oct 16, 2018
2aa22f8
attempt to fix Travic-CI config
l0gicgate Oct 16, 2018
20f75e4
attempt to fix Travis-CI config
l0gicgate Oct 16, 2018
6325430
attempt to fix Travis-CI config
l0gicgate Oct 16, 2018
f3ff3fc
attempt to fix Travis-CI config
l0gicgate Oct 16, 2018
4826201
remove phpstan and upgrade codesniffer version in Travis-CI config
l0gicgate Oct 16, 2018
2a9bf6d
update codesniffer version and add phpstan in composer.json and Travi…
l0gicgate Oct 16, 2018
5df6a0c
fix phpstan errors
l0gicgate Oct 16, 2018
df8d037
change minimum PHP version to 7.1 in README
l0gicgate Oct 16, 2018
787b0ea
remove unused dependencies http-factory-tests and psr7-integration-tests
l0gicgate Oct 17, 2018
d0551be
Integrate PHPStan to level 3
akrabat Oct 22, 2018
2020cfb
Set PHPStan level to max and fix errors
akrabat Oct 22, 2018
2244484
Cast the output of json_encode() to a string when creating a stream
akrabat Oct 22, 2018
f40a2eb
Test against psr7-integration-tests
akrabat Oct 22, 2018
2cafe1d
Merge pull request #1 from akrabat/psr7-integration-tests
l0gicgate Oct 22, 2018
97c68f8
refactor to use underlying implementation instead of cloning in all w…
l0gicgate Oct 23, 2018
7db1e01
fix Travis-CI phpstan function call
l0gicgate Oct 23, 2018
6955948
remove unused import in base Test class
l0gicgate Oct 23, 2018
f7feaa3
remove unused imports in Psr7Integration/Nyholm tests
l0gicgate Oct 23, 2018
336f97c
remove memory limit setting used for phpstan in Travis-CI config
l0gicgate Oct 23, 2018
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
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ sudo: false
language: php

php:
- 7.0
- 7.1
- 7.2
- nightly
Expand All @@ -13,14 +12,14 @@ matrix:
- php: nightly

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

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

after_script:
- if [[ "$TRAVIS_PHP_VERSION" == '7.0' ]]; then php vendor/bin/coveralls -v ; fi
- php vendor/bin/coveralls -v
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Slim-Http

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

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

This will install the `slim/http` component and all required dependencies.
PHP 7.0, or newer, is required.
PHP 7.1, or newer, is required.

## Usage

Expand Down
36 changes: 21 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "slim/http",
"type": "library",
"description": "Slim's PSR-7 implementation",
"keywords": ["psr7","psr-7","http"],
"description": "Slim PSR-7 Object Decorators",
"keywords": ["psr7", "psr-7", "http"],
"homepage": "http://slimframework.com",
"license": "MIT",
"authors": [
Expand All @@ -23,20 +23,24 @@
}
],
"require": {
"php": ">=7.0.0",
"psr/http-message": "^1.0"
"ext-json": "*",
"ext-libxml": "*",
"ext-SimpleXML": "*",
"php": "^7.1",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0",
"php-http/message-factory": "^1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.5",
"phpunit/phpunit": "^6.0|^7.0",
"php-http/psr7-integration-tests": "dev-master",
"phpstan/phpstan": "^0.9"
"nyholm/psr7": "^1.0",
"phpunit/phpunit": "^7.0",
"phpstan/phpstan": "^0.10.3",
"squizlabs/php_codesniffer": "^3.3.2",
"zendframework/zend-diactoros": "^2.0",
"php-http/psr7-integration-tests": "dev-master"
},
"provide": {
"psr/http-message-implementation": "1.0"
},
"conflict": {
"slim/slim": "^3.0"
"php-http/message-factory": "^1.0"
},
"autoload": {
"psr-4": {
Expand All @@ -51,9 +55,11 @@
"scripts": {
"test": [
"@phpunit",
"@phpcs"
"@phpcs",
"@phpstan"
],
"phpunit": "php vendor/bin/phpunit",
"phpcs": "php vendor/bin/phpcs"
"phpunit": "php vendor/bin/phpunit --process-isolation",
"phpcs": "php vendor/bin/phpcs",
"phpstan": "php -d memory_limit=-1 vendor/bin/phpstan analyse src tests"
}
}
7 changes: 7 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
level: max
ignoreErrors:
- '#Access to an undefined property Slim\\Http\\Decorators\\ResponseDecorator::\$foo#'
- '#Access to an undefined property Slim\\Http\\Decorators\\ServerRequestDecorator::\$foo#'
- '#Access to an undefined property Slim\\Http\\Decorators\\UriDecorator::\$foo#'
- '#Parameter \#1 \$port of method Slim\\Http\\Decorators\\UriDecorator::withPort() expects int|null, string given#'
22 changes: 0 additions & 22 deletions src/Body.php

This file was deleted.

203 changes: 0 additions & 203 deletions src/Collection.php

This file was deleted.

32 changes: 0 additions & 32 deletions src/CollectionInterface.php

This file was deleted.

Loading