Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ringcentral/psr7
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: swlib/psr7
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Oct 30, 2015

  1. Added travis-ci badge

    mjacobus committed Oct 30, 2015
    Copy the full SHA
    d57c967 View commit details

Commits on Oct 31, 2015

  1. Copy the full SHA
    a5e1b55 View commit details

Commits on Nov 2, 2015

  1. Copy the full SHA
    d14cd47 View commit details

Commits on Nov 3, 2015

  1. Merge pull request #42 from jeskew/fix/seek_end-seeks-to-end

    Copy SEEK_END behavior from fseek
    jeskew committed Nov 3, 2015
    Copy the full SHA
    44939e8 View commit details
  2. 1.2.1 release

    jeskew committed Nov 3, 2015
    Copy the full SHA
    4d0bdbe View commit details

Commits on Nov 11, 2015

  1. Copy the full SHA
    97e33db View commit details

Commits on Dec 3, 2015

  1. Copy the full SHA
    819f170 View commit details
  2. Merge pull request #48 from bshaffer/issue-47

    fixes #47 - proper handling of hier-part
    mtdowling committed Dec 3, 2015
    Copy the full SHA
    86341c6 View commit details

Commits on Dec 13, 2015

  1. Copy the full SHA
    c0ce3a5 View commit details

Commits on Dec 21, 2015

  1. Copy the full SHA
    16e8662 View commit details

Commits on Dec 22, 2015

  1. Merge pull request #51 from colinodell/http-451

    Add HTTP 451 Unavailable For Legal Reasons
    mtdowling committed Dec 22, 2015
    Copy the full SHA
    c6eb9f4 View commit details
  2. Merge pull request #41 from mjacobus/ci-badge

    Added travis-ci badge
    mtdowling committed Dec 22, 2015
    Copy the full SHA
    299b487 View commit details

Commits on Jan 5, 2016

  1. Copy the full SHA
    1bd2a13 View commit details
  2. Merge pull request #55 from kurlzor/bugfix/cannot-use-0-as-filename-i…

    …n-multipart-stream
    
    Accept "0" as a valid file name for multipart form file uploads
    mtdowling committed Jan 5, 2016
    Copy the full SHA
    f61a4c3 View commit details

Commits on Jan 12, 2016

  1. Copy the full SHA
    9eb3c09 View commit details
  2. Update README.md

    fixed typo in README.md
    KonstantinKuklin committed Jan 12, 2016
    Copy the full SHA
    d69a6d5 View commit details
  3. Merge pull request #59 from KonstantinKuklin/patch1

    Update README.md
    mtdowling committed Jan 12, 2016
    Copy the full SHA
    0c1ef83 View commit details
  4. Merge pull request #58 from fabpot/port-fix

    added missing port to the Host when non-standard
    mtdowling committed Jan 12, 2016
    Copy the full SHA
    1829021 View commit details

Commits on Jan 23, 2016

  1. Copy the full SHA
    5924a7f View commit details
  2. 1.2.2 release

    jeskew committed Jan 23, 2016
    Copy the full SHA
    f5d04bd View commit details

Commits on Feb 1, 2016

  1. Copy the full SHA
    24ad240 View commit details

Commits on Feb 10, 2016

  1. README.md typo fix.

    rayrutjes committed Feb 10, 2016
    Copy the full SHA
    8b73f3f View commit details
  2. Another readme.md fix.

    rayrutjes committed Feb 10, 2016
    Copy the full SHA
    15d85c5 View commit details
  3. Merge pull request #61 from rayrutjes/patch-1

    README.md typo fix.
    jeremeamia committed Feb 10, 2016
    Copy the full SHA
    fd28d4e View commit details
  4. Merge pull request #62 from rayrutjes/patch-2

    Another readme.md fix.
    jeremeamia committed Feb 10, 2016
    Copy the full SHA
    396b361 View commit details

Commits on Feb 12, 2016

  1. Copy the full SHA
    1393131 View commit details

Commits on Feb 13, 2016

  1. Copy the full SHA
    d1ce743 View commit details
  2. Merge pull request #64 from vagrus/additional_test_case

    additional test case for Uri resolving
    mtdowling committed Feb 13, 2016
    Copy the full SHA
    39dc20b View commit details

Commits on Feb 14, 2016

  1. Fix PSR-2 issues

    gzumba committed Feb 14, 2016
    Copy the full SHA
    427e9ae View commit details

Commits on Feb 17, 2016

  1. Merge pull request #63 from andythorne/seekable-cache

    Ensure all requested bytes are read when using seek on caching stream
    jeskew committed Feb 17, 2016
    Copy the full SHA
    62fcb6c View commit details

Commits on Feb 18, 2016

  1. Merge pull request #60 from gzumba/gzip-with-filename

    Handle gzip format with a FNAME header
    mtdowling committed Feb 18, 2016
    Copy the full SHA
    1136f3a View commit details
  2. 1.2.3 release

    jeskew committed Feb 18, 2016
    Copy the full SHA
    2e89629 View commit details

Commits on Feb 27, 2016

  1. Add uploaded file and tests

    Took some idaes and code snippets from guzzle#32
    ivank committed Feb 27, 2016
    Copy the full SHA
    e4a804a View commit details
  2. Add ServerRequest and tests

    Took ideas and some code snippets from guzzle#32
    ivank committed Feb 27, 2016
    Copy the full SHA
    2b282b9 View commit details
  3. Use more accurate test data

    ivank committed Feb 27, 2016
    Copy the full SHA
    93f4583 View commit details
  4. Copy the full SHA
    8d93b1c View commit details
  5. Copy the full SHA
    4ca5ac8 View commit details
  6. Use stricter style

    ivank committed Feb 27, 2016
    Copy the full SHA
    a73f6c6 View commit details
  7. Copy the full SHA
    29fa3d6 View commit details
  8. Remove obsolete copyright

    Since this is almost completely modified
    ivank committed Feb 27, 2016
    Copy the full SHA
    efa4c6f View commit details
  9. Use a stricter style

    ivank committed Feb 27, 2016
    Copy the full SHA
    9e75fe3 View commit details
  10. Update dockblock consistency

    ivank committed Feb 27, 2016
    Copy the full SHA
    cd25a41 View commit details
  11. Update phpdocs

    ivank committed Feb 27, 2016
    Copy the full SHA
    d320ba3 View commit details
  12. Remove redundant initial value

    This value is set by the default argument in the constructor
    ivank committed Feb 27, 2016
    Copy the full SHA
    264386e View commit details
  13. Copy the full SHA
    69765f4 View commit details

Commits on Mar 18, 2016

  1. Copy the full SHA
    0768f9b View commit details

Commits on Mar 21, 2016

  1. Fix typo

    BenMorel committed Mar 21, 2016
    Copy the full SHA
    033e726 View commit details
  2. Merge pull request #73 from BenMorel/patch-1

    Fix typo
    jeskew committed Mar 21, 2016
    Copy the full SHA
    82eb530 View commit details
  3. Merge pull request #54 from ivank/server-request

    ServerRequest and UploadedFIle Implementation
    mtdowling committed Mar 21, 2016
    Copy the full SHA
    ee6a9b7 View commit details

Commits on Mar 22, 2016

  1. Add test to confirm an extending class can instantiate. Specifically …

    …a situation in which a non-standard port results in access to private static members caused a fatal.
    Ben Lake committed Mar 22, 2016
    Copy the full SHA
    c0e2008 View commit details
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
Makefile export-ignore
phpunit.xml.dist export-ignore
13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
phpunit.xml
composer.phar
composer.lock
composer-test.lock
vendor/
build/artifacts/
artifacts/
docs/_build
docs/*.pyc
.idea
.DS_STORE
vendor/
composer.lock
phpunit.xml
15 changes: 9 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -5,16 +5,19 @@ php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- hhvm

sudo: false
dist: trusty

cache:
directories:
- vendor
- $HOME/.composer/cache

install:
- travis_retry composer install --no-interaction --prefer-source
- travis_retry composer install --no-interaction --prefer-dist

script: make test

matrix:
allow_failures:
- php: hhvm
fast_finish: true
88 changes: 88 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,93 @@
# CHANGELOG

* Added response first-line to response string exception (fixes #145)
* Fix `AppendStream::detach` to not close streams
* Clarify exception message when stream is detached
* Added a test for #129 behavior
* Deprecated parsing folded header lines as per RFC 7230

## 1.4.2 - 2017-03-20

* Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing
calls to `trigger_error` when deprecated methods are invoked.

## 1.4.1 - 2017-02-27

* Reverted BC break by reintroducing behavior to automagically fix a URI with a
relative path and an authority by adding a leading slash to the path. It's only
deprecated now.
* Added triggering of silenced deprecation warnings.

## 1.4.0 - 2017-02-21

* Fix `Stream::read` when length parameter <= 0.
* `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory.
* Fix `ServerRequest::getUriFromGlobals` when `Host` header contains port.
* Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form.
* Allow `parse_response` to parse a response without delimiting space and reason.
* Ensure each URI modification results in a valid URI according to PSR-7 discussions.
Invalid modifications will throw an exception instead of returning a wrong URI or
doing some magic.
- `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception
because the path of a URI with an authority must start with a slash "/" or be empty
- `(new Uri())->withScheme('http')` will return `'http://localhost'`
* Fix compatibility of URIs with `file` scheme and empty host.
* Added common URI utility methods based on RFC 3986 (see documentation in the readme):
- `Uri::isDefaultPort`
- `Uri::isAbsolute`
- `Uri::isNetworkPathReference`
- `Uri::isAbsolutePathReference`
- `Uri::isRelativePathReference`
- `Uri::isSameDocumentReference`
- `Uri::composeComponents`
- `UriNormalizer::normalize`
- `UriNormalizer::isEquivalent`
- `UriResolver::relativize`
* Deprecated `Uri::resolve` in favor of `UriResolver::resolve`
* Deprecated `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments`

## 1.3.1 - 2016-06-25

* Fix `Uri::__toString` for network path references, e.g. `//example.org`.
* Fix missing lowercase normalization for host.
* Fix handling of URI components in case they are `'0'` in a lot of places,
e.g. as a user info password.
* Fix `Uri::withAddedHeader` to correctly merge headers with different case.
* Fix trimming of header values in `Uri::withAddedHeader`. Header values may
be surrounded by whitespace which should be ignored according to RFC 7230
Section 3.2.4. This does not apply to header names.
* Fix `Uri::withAddedHeader` with an array of header values.
* Fix `Uri::resolve` when base path has no slash and handling of fragment.
* Fix handling of encoding in `Uri::with(out)QueryValue` so one can pass the
key/value both in encoded as well as decoded form to those methods. This is
consistent with withPath, withQuery etc.
* Fix `ServerRequest::withoutAttribute` when attribute value is null.

## 1.3.0 - 2016-04-13

* Added remaining interfaces needed for full PSR7 compatibility
(ServerRequestInterface, UploadedFileInterface, etc.).
* Added support for stream_for from scalars.
* Can now extend Uri.
* Fixed a bug in validating request methods by making it more permissive.

## 1.2.3 - 2016-02-18

* Fixed support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote
streams, which can sometimes return fewer bytes than requested with `fread`.
* Fixed handling of gzipped responses with FNAME headers.

## 1.2.2 - 2016-01-22

* Added support for URIs without any authority.
* Added support for HTTP 451 'Unavailable For Legal Reasons.'
* Added support for using '0' as a filename.
* Added support for including non-standard ports in Host headers.

## 1.2.1 - 2015-11-02

* Now supporting negative offsets when seeking to SEEK_END.

## 1.2.0 - 2015-08-15

* Body as `"0"` is now properly added to a response.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -9,5 +9,21 @@ coverage:
view-coverage:
open artifacts/coverage/index.html

check-tag:
$(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))

tag: check-tag
@echo Tagging $(TAG)
chag update $(TAG)
git commit -a -m '$(TAG) release'
chag tag
@echo "Release has been created. Push using 'make release'"
@echo "Changes made in the release commit"
git diff HEAD~1 HEAD

release: check-tag
git push origin master
git push origin $(TAG)

clean:
rm -rf artifacts/*
Loading