Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merging develop to master in preparation for 2.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Sep 27, 2018
2 parents 786cc5c + 760c6aa commit 0bae781
Show file tree
Hide file tree
Showing 129 changed files with 2,339 additions and 3,012 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.tmp/
doc/html/
vendor/
zf-mkdoc-theme/
Expand Down
38 changes: 7 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,17 @@ cache:
env:
global:
- COMPOSER_ARGS="--no-interaction"
- LEGACY_DEPS="phpunit/phpunit"

matrix:
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- php: 5.6
env:
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- CHECK_CS=true
- TEST_COVERAGE=true
- INTEGRATION_DEPS="php-coveralls/php-coveralls"
- php: 7
env:
- DEPS=latest
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=locked
- CS_CHECK=true
- TEST_COVERAGE=true
- php: 7.1
env:
- DEPS=latest
Expand All @@ -52,26 +32,22 @@ matrix:
- php: 7.2
env:
- DEPS=latest
- php: 7.2
name: Integration tests
- php: nightly
env:
- INTEGRATION_DEPS="http-interop/http-factory-diactoros"
- DEPS=latest

before_install:
- if [[ $TEST_COVERAGE != 'true' && "$(php --version | grep xdebug -ci)" -ge 1 ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- travis_retry composer self-update
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi

install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- travis_retry composer install $COMPOSER_ARGS
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $INTEGRATION_DEPS != '' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $INTEGRATION_DEPS ; fi
- stty cols 120 && composer show

script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- if [[ $CHECK_CS == 'true' ]]; then composer cs-check ; fi
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry php vendor/bin/php-coveralls -v ; fi
Expand Down
60 changes: 56 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,75 @@

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 1.8.7 - TBD
## 2.0.0 - 2018-09-27

### Added

- Nothing.
- [#326](https://github.com/zendframework/zend-diactoros/pull/326) adds [PSR-17](https://www.php-fig.org/psr/psr-17/) HTTP Message Factory implementations, including:

- `Zend\Diactoros\RequestFactory`
- `Zend\Diactoros\ResponseFactory`
- `Zend\Diactoros\ServerRequestFactory`
- `Zend\Diactoros\StreamFactory`
- `Zend\Diactoros\UploadedFileFactory`
- `Zend\Diactoros\UriFactory`

These factories may be used to produce the associated instances; we encourage
users to rely on the PSR-17 factory interfaces to allow exchanging PSR-7
implementations within their applications.

- [#328](https://github.com/zendframework/zend-diactoros/pull/328) adds a package-level exception interface, `Zend\Diactoros\Exception\ExceptionInterface`,
and several implementations for specific exceptions raised within the package.
These include:

- `Zend\Diactoros\Exception\DeserializationException` (extends `UnexpectedValueException`)
- `Zend\Diactoros\Exception\InvalidArgumentException` (extends `InvalidArgumentException`)
- `Zend\Diactoros\Exception\InvalidStreamPointerPositionException` (extends `RuntimeException`)
- `Zend\Diactoros\Exception\SerializationException` (extends `UnexpectedValueException`)
- `Zend\Diactoros\Exception\UnreadableStreamException` (extends `RuntimeException`)
- `Zend\Diactoros\Exception\UnrecognizedProtocolVersionException` (extends `UnexpectedValueException`)
- `Zend\Diactoros\Exception\UnrewindableStreamException` (extends `RuntimeException`)
- `Zend\Diactoros\Exception\UnseekableStreamException` (extends `RuntimeException`)
- `Zend\Diactoros\Exception\UntellableStreamException` (extends `RuntimeException`)
- `Zend\Diactoros\Exception\UnwritableStreamException` (extends `RuntimeException`)
- `Zend\Diactoros\Exception\UploadedFileAlreadyMovedException` (extends `RuntimeException`)
- `Zend\Diactoros\Exception\UploadedFileErrorException` (extends `RuntimeException`)

### Changed

- Nothing.
- [#329](https://github.com/zendframework/zend-diactoros/pull/329) adds return type hints and scalar parameter type hints wherever possible.
The changes were done to help improve code quality, in part by reducing manual
type checking. If you are extending any classes, you may need to update your
signatures; check the signatures of the class(es) you are extending for changes.

- [#162](https://github.com/zendframework/zend-diactoros/pull/162) modifies `Serializer\Request` such that it now no longer raises an `UnexpectedValueException` via its `toString()` method
when an unexpected HTTP method is encountered; this can be done safely, as the value can never
be invalid due to other changes in the same patch.

- [#162](https://github.com/zendframework/zend-diactoros/pull/162) modifies `RequestTrait` such that it now invalidates non-string method arguments to either
the constructor or `withMethod()`, raising an `InvalidArgumentException` for any that do not validate.

### Deprecated

- Nothing.

### Removed

- Nothing.
- [#308](https://github.com/zendframework/zend-diactoros/pull/308) removes the following methods from the `ServerRequestFactory` class:
- `normalizeServer()` (use `Zend\Diactoros\normalizeServer()` instead)
- `marshalHeaders()` (use `Zend\Diactoros\marshalHeadersFromSapi()` instead)
- `marshalUriFromServer()` (use `Zend\Diactoros\marshalUriFromSapi()` instead)
- `marshalRequestUri()` (use `Uri::getPath()` from the `Uri` instance returned by `marshalUriFromSapi()` instead)
- `marshalHostAndPortFromHeaders()` (use `Uri::getHost()` and `Uri::getPort()` from the `Uri` instances returned by `marshalUriFromSapi()` instead)
- `stripQueryString()` (use `explode("?", $path, 2)[0]` instead)
- `normalizeFiles()` (use `Zend\Diactoros\normalizeUploadedFiles()` instead)

- [#295](https://github.com/zendframework/zend-diactoros/pull/295) removes `Zend\Diactoros\Server`. You can use the `RequestHandlerRunner` class from
[zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner) to provide these capabilities instead.

- [#295](https://github.com/zendframework/zend-diactoros/pull/295) removes `Zend\Diactoros\Response\EmitterInterface` and the various emitter implementations.
These can now be found in the package [zendframework/zend-httphandlerrunner](https://docs.zendframework.com/zend-httphandlerrunner/), which also provides
a PSR-7-implementation agnostic way of using them.

### Fixed

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Develop:
This package supercedes and replaces [phly/http](https://github.com/phly/http).

`zend-diactoros` is a PHP package containing implementations of the [accepted PSR-7 HTTP message interfaces](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md), as well as a "server" implementation similar to [node's http.Server](http://nodejs.org/api/http.html).
`zend-diactoros` is a PHP package containing implementations of the
[PSR-7 HTTP message interfaces](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.md)
and [PSR-17 HTTP message factory interfaces](https://www.php-fig.org/psr/psr-17).

* File issues at https://github.com/zendframework/zend-diactoros/issues
* Issue patches to https://github.com/zendframework/zend-diactoros/pulls
Expand All @@ -20,9 +22,9 @@ This package supercedes and replaces [phly/http](https://github.com/phly/http).

Documentation is available at:

- https://zendframework.github.io/zend-diactoros/
- https://docs.zendframework.com/zend-diactoros/

Source files for documentation are [in the doc/ tree](doc/).
Source files for documentation are [in the docs/ tree](docs/).

[Master]: https://travis-ci.org/zendframework/zend-diactoros
[Master image]: https://secure.travis-ci.org/zendframework/zend-diactoros.svg?branch=master
Expand Down
31 changes: 16 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,45 @@
{
"name": "zendframework/zend-diactoros",
"description": "PSR HTTP Message implementations",
"type": "library",
"license": "BSD-2-Clause",
"license": "BSD-3-Clause",
"keywords": [
"http",
"psr",
"psr-7"
],
"homepage": "https://github.com/zendframework/zend-diactoros",
"support": {
"docs": "https://docs.zendframework.com/zend-diactoros/",
"issues": "https://github.com/zendframework/zend-diactoros/issues",
"source": "https://github.com/zendframework/zend-diactoros"
"source": "https://github.com/zendframework/zend-diactoros",
"rss": "https://github.com/zendframework/zend-diactoros/releases.atom",
"slack": "https://zendframework-slack.herokuapp.com",
"forum": "https://discourse.zendframework.com/c/questions/exprssive"
},
"config": {
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "1.8.x-dev",
"dev-develop": "1.9.x-dev",
"dev-release-2.0": "2.0.x-dev"
"dev-master": "2.0.x-dev",
"dev-develop": "2.1.x-dev",
"dev-release-1.8": "1.8.x-dev"
}
},
"require": {
"php": "^5.6 || ^7.0",
"php": "^7.1",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"ext-dom": "*",
"ext-libxml": "*",
"http-interop/http-factory-tests": "^0.5.0",
"php-http/psr7-integration-tests": "dev-master",
"phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7",
"zendframework/zend-coding-standard": "~1.0"
"phpunit/phpunit": "^7.0.2",
"zendframework/zend-coding-standard": "~1.0.0"
},
"provide": {
"psr/http-factory-implementation": "1.0",
"psr/http-message-implementation": "1.0"
},
"autoload": {
Expand All @@ -55,11 +60,7 @@
"autoload-dev": {
"psr-4": {
"ZendTest\\Diactoros\\": "test/"
},
"files": [
"test/TestAsset/Functions.php",
"test/TestAsset/SapiResponse.php"
]
}
},
"scripts": {
"check": [
Expand Down
Loading

0 comments on commit 0bae781

Please sign in to comment.