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

Commit

Permalink
Merge branch 'hotfix/8'
Browse files Browse the repository at this point in the history
Close #8
  • Loading branch information
weierophinney committed May 10, 2016
2 parents 67dfe50 + cabc7f0 commit 86c0b53
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 75 deletions.
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
.buildpath
.DS_Store
.idea
.project
.settings/
.*.sw*
.*.un~
nbproject
doc/html/
tmp/
vendor/
composer.lock
zf-mkdoc-theme/

clover.xml
coveralls-upload.json
phpunit.xml
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ cache:
directories:
- $HOME/.composer/cache
- vendor
- $HOME/.local
- zf-mkdoc-theme

env:
global:
- SITE_URL: https://zendframework.github.io/zend-psr7bridge
- GH_USER_NAME: "Matthew Weier O'Phinney"
- GH_USER_EMAIL: [email protected]
- GH_REF: github.com/zendframework/zend-psr7bridge.git
- secure: "QsS9xhQuW/8b3kiYNf1mAN2DpGkyqFGqcUZzv4wO+IMhq7NeE9HST7y5H0ByecJb822DBh6IZMEH3a75J0ekECFlYYdXj54ZzXghEAqL+R3uwmlxNGvmj1Q8N/VS5xt0N6qusN8a91tvXOsprKwzFY2v+/aS+gnaNIKha69Z9nlqcQnrAaeldWgBJcc//Y/sf0k0bzpqFScAwkgEVVk6PI1yuwXhnNiJa0e7YFbVJrk1uMQVNuKIUaQfQEMX4pI7RfhtD6/oOrwxt35ep35NNfEAG8UhAmv0vSZ9xEcepwu37cnS06Jn2g7PAQ0QYwrxv01OGrtprrD98SQaXJV9HcBDmbjh4L3+rVRR5j9moIob4jj20K3d7AmNzt5Ffe5v0TBk43pw7Ub0tFbwpDlcHKDqd97tPanUJso/TIEIprYap/5rY5HwDwvYn3xelKYWtvuJg3Qc9joJkRp2cuWXEjnKjlmeFW0YoX1Qv9fSuuWjJ9aMFqteZFQLxe64byQs0j64QiHSPMSGOT569JgxsFqcrfWkHKmvyiYQJknMWKN3DxdSlKk089jyA28QcSC8unEV25bhpCMEBFF1GOzX3IrcH12qf3EcP37xJiEVDkOAL0///+oxRQanqMPxynfUAmiY9+58GACeoaxqPM+yvpUBIDwnM3p2qG0VN1Hcn9I="

matrix:
fast_finish: true
Expand All @@ -16,6 +26,8 @@ matrix:
- php: 5.6
env:
- EXECUTE_COVERAGE=true
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- PATH="$HOME/.local/bin:$PATH"
- php: 7
- php: hhvm
allow_failures:
Expand All @@ -38,6 +50,10 @@ script:
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_COVERAGE != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi

after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi

after_script:
- if [[ $EXECUTE_COVERAGE == 'true' ]]; then ./vendor/bin/coveralls ; fi
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file, in reverse

### Added

- Nothing.
- [#8](https://github.com/zendframework/zend-psr8bridge/pull/8) adds and
publishes the documentation to https://zendframework.github.io/zend-psr7bridge/

### Deprecated

Expand Down
28 changes: 2 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,5 @@ versa.

**Note: This project is a work in progress.**

Initial functionality is only covering conversion of non-body request data from
PSR-7 to zend-http in order to facilitate routing in
[zend-expressive](https://github.com/zendframework/zend-expressive); we plan to
expand this once initial work on zend-expressive is complete.

## Installation

Install this library using composer:

```console
$ composer require zendframework/zend-psr7bridge
```

## Documentation

Documentation is [in the doc tree](doc/), and can be compiled using [bookdown](http://bookdown.io):

```console
$ bookdown doc/bookdown.json
$ php -S 0.0.0.0:8080 -t doc/html/ # then browse to http://localhost:8080/
```

> ### Bookdown
>
> You can install bookdown globally using `composer global require bookdown/bookdown`. If you do
> this, make sure that `$HOME/.composer/vendor/bin` is on your `$PATH`.
- Issues: https://github.com/zendframework/zend-psr7bridge/issues
- Documentation: https://zendframework.github.io/zend-psr7bridge/
12 changes: 12 additions & 0 deletions doc/book/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="container">
<div class="jumbotron">
<h1>zend-psr7bridge</h1>

<p>
PSR-7 &lt;-&gt; zend-http message conversions.
</p>

<pre><code class="language-bash">$ composer require zendframework/zend-psr7bridge</code></pre>
</div>
</div>

13 changes: 1 addition & 12 deletions doc/book/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
# zend-psr7bridge

Code for converting [PSR-7](http://www.php-fig.org/psr/psr-7/) messages to
[zend-http](https://github.com/zendframework/zend-http) messages, and vice
versa.

**Note: This project is a work in progress.**

Initial functionality is only covering conversion of non-body request data from
PSR-7 to zend-http in order to facilitate routing in
[zend-expressive](https://github.com/zendframework/zend-expressive); we plan to
expand this once initial work on zend-expressive is complete.
../../README.md
7 changes: 0 additions & 7 deletions doc/book/install.md

This file was deleted.

7 changes: 7 additions & 0 deletions doc/book/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Introduction

Code for converting [PSR-7](http://www.php-fig.org/psr/psr-7/) messages to
[zend-http](https://zendframework.github.io/zend-http/) messages, and vice
versa.

**Note: This project is a work in progress.**
36 changes: 17 additions & 19 deletions doc/book/usage-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,26 @@ It is useful to omit these for purposes of routing, for instance, when you may
not need this more process-intensive data. By default, the `$shallow` flag is
`false`, meaning a full conversion is done.

### Examples
## Examples

- Doing a full conversion:
### Full conversion to zend-http request

```php
<?php
use Zend\Http\PhpEnvironment\Response;
use Zend\Psr7Bridge\Psr7ServerRequest;
```php
use Zend\Http\PhpEnvironment\Response;
use Zend\Psr7Bridge\Psr7ServerRequest;

// Assume $controller is a Zend\Mvc\Controller\AbstractController instance.
$result = $controller->dispatch(
Psr7ServerRequest::toZend($request),
new Response()
);
```
// Assume $controller is a Zend\Mvc\Controller\AbstractController instance.
$result = $controller->dispatch(
Psr7ServerRequest::toZend($request),
new Response()
);
```

- Doing a shallow conversion:
### Shallow conversion to zend-http request

```php
<?php
use Zend\Psr7Bridge\Psr7ServerRequest;
```php
use Zend\Psr7Bridge\Psr7ServerRequest;

// Assume $router is a Zend\Mvc\Router\Http\TreeRouteStack instance.
$match = $router->match(Psr7ServerRequest::toZend($request, true));
```
// Assume $router is a Zend\Router\Http\TreeRouteStack instance.
$match = $router->match(Psr7ServerRequest::toZend($request, true));
```
9 changes: 0 additions & 9 deletions doc/bookdown.json

This file was deleted.

10 changes: 10 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
docs_dir: doc/book
site_dir: doc/html
pages:
- index.md
- Intro: intro.md
- Usage: usage-examples.md
site_name: zend-psr7bridge
site_description: zend-psr7bridge
repo_url: 'https://github.com/zendframework/zend-psr7bridge'
copyright: 'Copyright (c) 2016 <a href="http://www.zend.com/">Zend Technologies USA Inc.</a>'

0 comments on commit 86c0b53

Please sign in to comment.