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

Commit 49d047d

Browse files
committed
Initial import
Imported ZendView renderer from zend-expressive as a standalone package.
0 parents  commit 49d047d

31 files changed

+2127
-0
lines changed

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/test export-ignore
2+
/vendor export-ignore
3+
.gitattributes export-ignore
4+
.gitignore export-ignore
5+
.travis.yml export-ignore
6+
phpunit.xml.dist export-ignore
7+
phpcs.xml export-ignore

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
vendor/
2+
composer.lock

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
sudo: false
2+
3+
language: php
4+
5+
cache:
6+
directories:
7+
- $HOME/.composer/cache
8+
- vendor
9+
10+
matrix:
11+
fast_finish: true
12+
include:
13+
- php: 5.5
14+
- php: 5.6
15+
env:
16+
- EXECUTE_CS_CHECK=true
17+
- php: 7
18+
- php: hhvm
19+
allow_failures:
20+
- php: 7
21+
- php: hhvm
22+
23+
before_install:
24+
- composer self-update
25+
26+
install:
27+
- travis_retry composer install --no-interaction --ignore-platform-reqs --prefer-source
28+
- composer info -i
29+
30+
script:
31+
- ./vendor/bin/phpunit
32+
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi
33+
34+
notifications:
35+
email: true

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file, in reverse chronological order by release.
4+
5+
## 0.1.0 - TBD
6+
7+
### Added
8+
9+
- Nothing.
10+
11+
### Deprecated
12+
13+
- Nothing.
14+
15+
### Removed
16+
17+
- Nothing.
18+
19+
### Fixed
20+
21+
- Nothing.

CONTRIBUTING.md

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
# CONTRIBUTING
2+
3+
## RESOURCES
4+
5+
If you wish to contribute to Zend Framework, please be sure to
6+
read/subscribe to the following resources:
7+
8+
- [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
9+
- [Contributor's Guide](CONTRIBUTING.md)
10+
- ZF Contributor's mailing list:
11+
Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html
12+
Subscribe: [email protected]
13+
- ZF Contributor's IRC channel:
14+
#zftalk.dev on Freenode.net
15+
16+
If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-expressive-zendviewrenderer/issues/new).
17+
18+
## Reporting Potential Security Issues
19+
20+
If you have encountered a potential security vulnerability, please **DO NOT** report it on the public
21+
issue tracker: send it to us at [[email protected]](mailto:[email protected]) instead.
22+
We will work with you to verify the vulnerability and patch it as soon as possible.
23+
24+
When reporting issues, please provide the following information:
25+
26+
- Component(s) affected
27+
- A description indicating how to reproduce the issue
28+
- A summary of the security vulnerability and impact
29+
30+
We request that you contact us via the email address above and give the project
31+
contributors a chance to resolve the vulnerability and issue a new release prior
32+
to any public exposure; this helps protect users and provides them with a chance
33+
to upgrade and/or update in order to protect their applications.
34+
35+
For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
36+
37+
## RUNNING TESTS
38+
39+
To run tests:
40+
41+
- Clone the repository:
42+
43+
```console
44+
$ git clone [email protected]:zendframework/zend-expressive-zendviewrenderer.git
45+
$ cd zend-expressive-zendviewrenderer
46+
```
47+
48+
- Install dependencies via composer:
49+
50+
```console
51+
$ curl -sS https://getcomposer.org/installer | php --
52+
$ ./composer.phar install
53+
```
54+
55+
If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
56+
57+
- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
58+
59+
```console
60+
$ ./vendor/bin/phpunit
61+
```
62+
63+
You can turn on conditional tests with the phpunit.xml file.
64+
To do so:
65+
66+
- Copy `phpunit.xml.dist` file to `phpunit.xml`
67+
- Edit `phpunit.xml` to enable any specific functionality you
68+
want to test, as well as to provide test values to utilize.
69+
70+
## Running Coding Standards Checks
71+
72+
This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
73+
standards checks, and provides configuration for our selected checks.
74+
`phpcs` is installed by default via Composer.
75+
76+
To run checks only:
77+
78+
```console
79+
$ ./vendor/bin/phpcs
80+
```
81+
82+
`phpcs` also includes a tool for fixing most CS violations, `phpcbf`:
83+
84+
85+
```console
86+
$ ./vendor/bin/phpcbf
87+
```
88+
89+
If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
90+
they pass, and make sure you add and commit the changes after verification.
91+
92+
## Recommended Workflow for Contributions
93+
94+
Your first step is to establish a public repository from which we can
95+
pull your work into the master repository. We recommend using
96+
[GitHub](https://github.com), as that is where the component is already hosted.
97+
98+
1. Setup a [GitHub account](http://github.com/), if you haven't yet
99+
2. Fork the repository (http://github.com/zendframework/zend-expressive-zendviewrenderer)
100+
3. Clone the canonical repository locally and enter it.
101+
102+
```console
103+
$ git clone git://github.com:zendframework/zend-expressive-zendviewrenderer.git
104+
$ cd zend-expressive-zendviewrenderer
105+
```
106+
107+
4. Add a remote to your fork; substitute your GitHub username in the command
108+
below.
109+
110+
```console
111+
$ git remote add {username} [email protected]:{username}/zend-expressive-zendviewrenderer.git
112+
$ git fetch {username}
113+
```
114+
115+
### Keeping Up-to-Date
116+
117+
Periodically, you should update your fork or personal repository to
118+
match the canonical ZF repository. Assuming you have setup your local repository
119+
per the instructions above, you can do the following:
120+
121+
122+
```console
123+
$ git checkout master
124+
$ git fetch origin
125+
$ git rebase origin/master
126+
# OPTIONALLY, to keep your remote up-to-date -
127+
$ git push {username} master:master
128+
```
129+
130+
If you're tracking other branches -- for example, the "develop" branch, where
131+
new feature development occurs -- you'll want to do the same operations for that
132+
branch; simply substitute "develop" for "master".
133+
134+
### Working on a patch
135+
136+
We recommend you do each new feature or bugfix in a new branch. This simplifies
137+
the task of code review as well as the task of merging your changes into the
138+
canonical repository.
139+
140+
A typical workflow will then consist of the following:
141+
142+
1. Create a new local branch based off either your master or develop branch.
143+
2. Switch to your new local branch. (This step can be combined with the
144+
previous step with the use of `git checkout -b`.)
145+
3. Do some work, commit, repeat as necessary.
146+
4. Push the local branch to your remote repository.
147+
5. Send a pull request.
148+
149+
The mechanics of this process are actually quite trivial. Below, we will
150+
create a branch for fixing an issue in the tracker.
151+
152+
```console
153+
$ git checkout -b hotfix/9295
154+
Switched to a new branch 'hotfix/9295'
155+
```
156+
157+
... do some work ...
158+
159+
160+
```console
161+
$ git commit
162+
```
163+
164+
... write your log message ...
165+
166+
167+
```console
168+
$ git push {username} hotfix/9295:hotfix/9295
169+
Counting objects: 38, done.
170+
Delta compression using up to 2 threads.
171+
Compression objects: 100% (18/18), done.
172+
Writing objects: 100% (20/20), 8.19KiB, done.
173+
Total 20 (delta 12), reused 0 (delta 0)
174+
To ssh://[email protected]/{username}/zend-expressive-zendviewrenderer.git
175+
b5583aa..4f51698 HEAD -> master
176+
```
177+
178+
To send a pull request, you have two options.
179+
180+
If using GitHub, you can do the pull request from there. Navigate to
181+
your repository, select the branch you just created, and then select the
182+
"Pull Request" button in the upper right. Select the user/organization
183+
"zendframework" as the recipient.
184+
185+
If using your own repository - or even if using GitHub - you can use `git
186+
format-patch` to create a patchset for us to apply; in fact, this is
187+
**recommended** for security-related patches. If you use `format-patch`, please
188+
send the patches as attachments to:
189+
190+
- [email protected] for patches without security implications
191+
- [email protected] for security patches
192+
193+
#### What branch to issue the pull request against?
194+
195+
Which branch should you issue a pull request against?
196+
197+
- For fixes against the stable release, issue the pull request against the
198+
"master" branch.
199+
- For new features, or fixes that introduce new elements to the public API (such
200+
as new public methods or properties), issue the pull request against the
201+
"develop" branch.
202+
203+
### Branch Cleanup
204+
205+
As you might imagine, if you are a frequent contributor, you'll start to
206+
get a ton of branches both locally and on your remote.
207+
208+
Once you know that your changes have been accepted to the master
209+
repository, we suggest doing some cleanup of these branches.
210+
211+
- Local branch cleanup
212+
213+
```console
214+
$ git branch -d <branchname>
215+
```
216+
217+
- Remote branch removal
218+
219+
```console
220+
$ git push {username} :<branchname>
221+
```

LICENSE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright (c) 2015, Zend Technologies USA, Inc.
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5+
6+
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7+
8+
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9+
10+
- Neither the name of Zend Technologies USA, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11+
12+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# zend-view PhpRenderer Integration for Expressive
2+
3+
[![Build Status](https://secure.travis-ci.org/zendframework/zend-expressive-zendviewrenderer.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-expressive-zendviewrenderer)
4+
5+
[zend-view PhpRenderer](https://github.com/zendframework/zend-view) integration
6+
for [Expressive](https://github.com/zendframework/zend-expressive).
7+
8+
## Installation
9+
10+
Install this library using composer:
11+
12+
```bash
13+
$ composer require zendframework/zend-expressive-zendviewrenderer
14+
```
15+
16+
We recommend using a dependency injection container, and typehint against
17+
[container-interop](https://github.com/container-interop/container-interop). We
18+
can recommend the following implementations:
19+
20+
- [zend-servicemanager](https://github.com/zendframework/zend-servicemanager):
21+
`composer require zendframework/zend-servicemanager`
22+
- [pimple-interop](https://github.com/moufmouf/pimple-interop):
23+
`composer require mouf/pimple-interop`
24+
- [Aura.Di](https://github.com/auraphp/Aura.Di)
25+
26+
## Documentation
27+
28+
See the [zend-expressive](https://github.com/zendframework/zend-expressive/blob/master/doc/book)
29+
documentation tree, or browse online at http://zend-expressive.rtfd.org.

composer.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "zendframework/zend-expressive-zendviewrenderer",
3+
"description": "zend-view PhpRenderer integration for Expressive",
4+
"type": "library",
5+
"license": "BSD-3-Clause",
6+
"keywords": [
7+
"expressive",
8+
"http",
9+
"middleware",
10+
"psr",
11+
"psr-7",
12+
"zf2"
13+
],
14+
"require": {
15+
"php": ">=5.5",
16+
"container-interop/container-interop": "^1.1",
17+
"zendframework/zend-expressive": "^0.4",
18+
"zendframework/zend-filter": "^2.5",
19+
"zendframework/zend-servicemanager": "^2.5",
20+
"zendframework/zend-view": "^2.5"
21+
},
22+
"require-dev": {
23+
"phpunit/phpunit": "^4.7",
24+
"squizlabs/php_codesniffer": "^2.3"
25+
},
26+
"autoload": {
27+
"psr-4": {
28+
"Zend\\Expressive\\ZendView\\": "src/"
29+
}
30+
},
31+
"autoload-dev": {
32+
"psr-4": {
33+
"ZendTest\\Expressive\\ZendView\\": "test/"
34+
}
35+
},
36+
"suggest": {
37+
"mouf/pimple-interop": "^1.0 to use Pimple for dependency injection",
38+
"aura/di": "3.0.*@beta to make use of Aura.Di dependency injection container"
39+
}
40+
}

phpcs.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Zend Framework coding standard">
3+
<description>Zend Framework coding standard</description>
4+
5+
<!-- display progress -->
6+
<arg value="p"/>
7+
<arg name="colors"/>
8+
9+
<!-- inherit rules from: -->
10+
<rule ref="PSR2"/>
11+
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
12+
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
13+
<properties>
14+
<property name="ignoreBlankLines" value="false"/>
15+
</properties>
16+
</rule>
17+
18+
<!-- Paths to check -->
19+
<file>src</file>
20+
<file>test</file>
21+
</ruleset>

0 commit comments

Comments
 (0)