Skip to content

Commit 3939020

Browse files
committed
Results of running zf-maintainer rebase-doc-templates
- supports document are placed into the main direcotry instead of docs because there we have component documentation used by apigility.org
1 parent 3a0b7ff commit 3939020

File tree

9 files changed

+223
-87
lines changed

9 files changed

+223
-87
lines changed

.gitattributes

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

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
vendor/
2-
phpunit.xml
3-
clover.xml
4-
coveralls-upload.json
1+
/clover.xml
2+
/coveralls-upload.json
3+
/phpunit.xml
4+
/vendor/

CONDUCT.md renamed to CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributor Code of Conduct
22

3-
The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com)
3+
This project adheres to [The Code Manifesto](http://codemanifesto.com)
44
as its guidelines for contributor interactions.
55

66
## The Code Manifesto

CONTRIBUTING.md

Lines changed: 155 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,189 @@
11
# CONTRIBUTING
22

3-
Apigility and related modules (of which this is one) are open source and licensed
4-
as [BSD-3-Clause](http://opensource.org/licenses/BSD-3-Clause). Contributions
5-
are welcome in the form of issue reports and pull requests.
6-
7-
All pull requests should include unit tests when applicable, and should follow
8-
our coding standards (more on these below); failure to do so may result in
9-
rejection of the pull request. If you need help writing tests, please ask on the
10-
developer mailing list and/or in IRC.
11-
123
## RESOURCES
134

14-
If you wish to contribute to Apigility modules, please be sure to
5+
If you wish to contribute to this project, please be sure to
156
read/subscribe to the following resources:
167

17-
- [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
18-
- [ZF Git Guide](https://github.com/zendframework/zf2/blob/master/README-GIT.md)
19-
- [Apigility developer mailing list](http://bit.ly/apigility-dev)
20-
- Apigility developer IRC channel: #apigility-dev on Freenode.net
8+
- [Coding Standards](https://github.com/zendframework/zend-coding-standard)
9+
- [Forums](https://discourse.zendframework.com/c/contributors)
10+
- [Chat](https://zendframework-slack.herokuapp.com)
11+
- [Code of Conduct](CODE_OF_CONDUCT.md)
12+
13+
If you are working on new features or refactoring
14+
[create a proposal](https://github.com/zfcampus/zf-api-problem/issues/new).
2115

22-
If you are working on new features, refactoring an existing module, or proposing
23-
a new module, please send an email to the developer mailing list.
16+
## RUNNING TESTS
2417

25-
## REPORTING POTENTIAL SECURITY ISSUES
18+
To run tests:
2619

27-
If you have encountered a potential security vulnerability in any Apigility
28-
module, please report it to us at [[email protected]](mailto:[email protected]).
29-
We will work with you to verify the vulnerability and patch it.
20+
- Clone the repository:
3021

31-
When reporting issues, please provide the following information:
22+
```console
23+
$ git clone git://github.com/zfcampus/zf-api-problem.git
24+
$ cd zf-api-problem
25+
```
3226

33-
- Module(s) affected
34-
- A description indicating how to reproduce the issue
35-
- A summary of the security vulnerability and impact
27+
- Install dependencies via composer:
3628

37-
We request that you contact us via the email address above and give the project
38-
contributors a chance to resolve the vulnerability and issue a new release prior
39-
to any public exposure; this helps protect Apigility users, and provides them
40-
with a chance to upgrade and/or update in order to protect their applications.
29+
```console
30+
$ composer install
31+
```
4132

42-
For sensitive email communications, please use
43-
[our PGP key](http://framework.zend.com/zf-security-pgp-key.asc).
33+
If you don't have `composer` installed, please download it from https://getcomposer.org/download/
4434

45-
## RUNNING TESTS
35+
- Run the tests using the "test" command shipped in the `composer.json`:
36+
37+
```console
38+
$ composer test
39+
```
4640

47-
First, use [Composer](https://getcomposer.org) to install all dependencies:
41+
You can turn on conditional tests with the `phpunit.xml` file.
42+
To do so:
43+
44+
- Copy `phpunit.xml.dist` file to `phpunit.xml`
45+
- Edit `phpunit.xml` to enable any specific functionality you
46+
want to test, as well as to provide test values to utilize.
47+
48+
## Running Coding Standards Checks
49+
50+
First, ensure you've installed dependencies via composer, per the previous
51+
section on running tests.
52+
53+
To run CS checks only:
4854

4955
```console
50-
$ composer install
56+
$ composer cs-check
5157
```
5258

53-
To run tests, use the PHPUnit executable installed by Composer:
59+
To attempt to automatically fix common CS issues:
5460

5561
```console
56-
$ composer test
62+
$ composer cs-fix
5763
```
5864

59-
## CODING STANDARDS
65+
If the above fixes any CS issues, please re-run the tests to ensure
66+
they pass, and make sure you add and commit the changes after verification.
67+
68+
## Recommended Workflow for Contributions
69+
70+
Your first step is to establish a public repository from which we can
71+
pull your work into the master repository. We recommend using
72+
[GitHub](https://github.com), as that is where the component is already hosted.
73+
74+
1. Setup a [GitHub account](https://github.com/), if you haven't yet
75+
2. Fork the repository (https://github.com/zfcampus/zf-api-problem)
76+
3. Clone the canonical repository locally and enter it.
77+
78+
```console
79+
$ git clone git://github.com/zfcampus/zf-api-problem.git
80+
$ cd zf-api-problem
81+
```
82+
83+
4. Add a remote to your fork; substitute your GitHub username in the command
84+
below.
85+
86+
```console
87+
$ git remote add {username} [email protected]:{username}/zf-api-problem.git
88+
$ git fetch {username}
89+
```
90+
91+
### Keeping Up-to-Date
92+
93+
Periodically, you should update your fork or personal repository to
94+
match the canonical ZF repository. Assuming you have setup your local repository
95+
per the instructions above, you can do the following:
6096

61-
While Apigility uses Zend Framework 2 coding standards, in practice, we check
62-
standards against PSR-1/2. To check for CS issues:
6397

6498
```console
65-
$ composer cs-check
99+
$ git checkout master
100+
$ git fetch origin
101+
$ git rebase origin/master
102+
# OPTIONALLY, to keep your remote up-to-date -
103+
$ git push {username} master:master
104+
```
105+
106+
If you're tracking other branches -- for example, the "develop" branch, where
107+
new feature development occurs -- you'll want to do the same operations for that
108+
branch; simply substitute "develop" for "master".
109+
110+
### Working on a patch
111+
112+
We recommend you do each new feature or bugfix in a new branch. This simplifies
113+
the task of code review as well as the task of merging your changes into the
114+
canonical repository.
115+
116+
A typical workflow will then consist of the following:
117+
118+
1. Create a new local branch based off either your master or develop branch.
119+
2. Switch to your new local branch. (This step can be combined with the
120+
previous step with the use of `git checkout -b`.)
121+
3. Do some work, commit, repeat as necessary.
122+
4. Push the local branch to your remote repository.
123+
5. Send a pull request.
124+
125+
The mechanics of this process are actually quite trivial. Below, we will
126+
create a branch for fixing an issue in the tracker.
127+
128+
```console
129+
$ git checkout -b hotfix/9295
130+
Switched to a new branch 'hotfix/9295'
66131
```
67132

68-
This will report CS issues. You can also attempt to fix many reported errors
69-
automatically:
133+
... do some work ...
134+
70135

71136
```console
72-
$ composer cs-fix
137+
$ git commit
73138
```
74139

75-
If you use `cs-fix` to fix issues, make certain you add and commit any files
76-
changed!
140+
... write your log message ...
141+
142+
143+
```console
144+
$ git push {username} hotfix/9295:hotfix/9295
145+
Counting objects: 38, done.
146+
Delta compression using up to 2 threads.
147+
Compression objects: 100% (18/18), done.
148+
Writing objects: 100% (20/20), 8.19KiB, done.
149+
Total 20 (delta 12), reused 0 (delta 0)
150+
To ssh://[email protected]/{username}/zf-api-problem.git
151+
b5583aa..4f51698 HEAD -> master
152+
```
153+
154+
To send a pull request, you have two options.
155+
156+
If using GitHub, you can do the pull request from there. Navigate to
157+
your repository, select the branch you just created, and then select the
158+
"Pull Request" button in the upper right. Select the user/organization
159+
"zfcampus" (or whatever the upstream organization is) as the recipient.
160+
161+
#### What branch to issue the pull request against?
162+
163+
Which branch should you issue a pull request against?
164+
165+
- For fixes against the stable release, issue the pull request against the
166+
"master" branch.
167+
- For new features, or fixes that introduce new elements to the public API (such
168+
as new public methods or properties), issue the pull request against the
169+
"develop" branch.
170+
171+
### Branch Cleanup
172+
173+
As you might imagine, if you are a frequent contributor, you'll start to
174+
get a ton of branches both locally and on your remote.
175+
176+
Once you know that your changes have been accepted to the master
177+
repository, we suggest doing some cleanup of these branches.
178+
179+
- Local branch cleanup
180+
181+
```console
182+
$ git branch -d <branchname>
183+
```
77184

78-
## Conduct
185+
- Remote branch removal
79186

80-
Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project.
187+
```console
188+
$ git push {username} :<branchname>
189+
```

LICENSE.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
Copyright (c) 2014-2016, Zend Technologies USA, Inc.
2-
1+
Copyright (c) 2014-2018, Zend Technologies USA, Inc.
32
All rights reserved.
43

54
Redistribution and use in source and binary forms, with or without modification,
65
are permitted provided that the following conditions are met:
76

8-
- Redistributions of source code must retain the above copyright notice,
9-
this list of conditions and the following disclaimer.
7+
- Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
109

11-
- Redistributions in binary form must reproduce the above copyright notice,
12-
this list of conditions and the following disclaimer in the documentation
13-
and/or other materials provided with the distribution.
10+
- Redistributions in binary form must reproduce the above copyright notice, this
11+
list of conditions and the following disclaimer in the documentation and/or
12+
other materials provided with the distribution.
1413

1514
- Neither the name of Zend Technologies USA, Inc. nor the names of its
1615
contributors may be used to endorse or promote products derived from this

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ZF Api Problem
22
==============
33

4-
[![Build Status](https://travis-ci.org/zfcampus/zf-api-problem.svg?branch=master)](https://travis-ci.org/zfcampus/zf-api-problem)
4+
[![Build Status](https://secure.travis-ci.org/zfcampus/zf-api-problem.svg?branch=master)](https://secure.travis-ci.org/zfcampus/zf-api-problem)
55
[![Coverage Status](https://coveralls.io/repos/github/zfcampus/zf-api-problem/badge.svg?branch=master)](https://coveralls.io/github/zfcampus/zf-api-problem?branch=master)
66

77
Introduction

SUPPORT.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Getting Support
2+
3+
Zend Framework offers three support channels:
4+
5+
- For real-time questions, use our
6+
[chat](https://zendframework-slack.herokuapp.com)
7+
- For detailed questions (e.g., those requiring examples) use our
8+
[forums](https://discourse.zendframework.com/c/questions/apigility)
9+
- To report issues, use this repository's
10+
[issue tracker](https://github.com/zfcampus/zf-api-problem/issues/new)
11+
12+
**DO NOT** use the issue tracker to ask questions; use chat or the forums for
13+
that. Questions posed to the issue tracker will be closed.
14+
15+
When reporting an issue, please include the following details:
16+
17+
- A narrative description of what you are trying to accomplish.
18+
- The minimum code necessary to reproduce the issue.
19+
- The expected results of exercising that code.
20+
- The actual results received.
21+
22+
We may ask for additional details: what version of the library you are using,
23+
and what PHP version was used to reproduce the issue.
24+
25+
You may also submit a failing test case as a pull request.

composer.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,20 @@
11
{
22
"name": "zfcampus/zf-api-problem",
33
"description": "ZF2 Module providing API-Problem assets and rendering",
4-
"type": "library",
54
"license": "BSD-3-Clause",
65
"keywords": [
7-
"zf2",
8-
"zend",
6+
"zf",
7+
"zendframework",
98
"module",
109
"rest",
1110
"api-problem"
1211
],
13-
"homepage": "http://apigility.org/",
1412
"support": {
15-
"email": "[email protected]",
16-
"irc": "irc://irc.freenode.net/apigility",
13+
"issues": "https://github.com/zfcampus/zf-api-problem/issues",
1714
"source": "https://github.com/zfcampus/zf-api-problem",
18-
"issues": "https://github.com/zfcampus/zf-api-problem/issues"
19-
},
20-
"extra": {
21-
"branch-alias": {
22-
"dev-master": "1.2-dev",
23-
"dev-develop": "1.3-dev"
24-
},
25-
"zf": {
26-
"module": "ZF\\ApiProblem"
27-
}
15+
"rss": "https://github.com/zfcampus/zf-api-problem/releases.atom",
16+
"chat": "https://zendframework-slack.herokuapp.com",
17+
"forum": "https://discourse.zendframework.com/c/questions/apigility"
2818
},
2919
"require": {
3020
"php": "^5.6 || ^7.0",
@@ -49,15 +39,26 @@
4939
"ZFTest\\ApiProblem\\": "test/"
5040
}
5141
},
42+
"config": {
43+
"sort-packages": true
44+
},
45+
"extra": {
46+
"branch-alias": {
47+
"dev-master": "1.2.x-dev",
48+
"dev-develop": "1.3.x-dev"
49+
},
50+
"zf": {
51+
"module": "ZF\\ApiProblem"
52+
}
53+
},
5254
"scripts": {
5355
"check": [
5456
"@cs-check",
5557
"@test"
5658
],
57-
"upload-coverage": "coveralls -v",
5859
"cs-check": "phpcs",
5960
"cs-fix": "phpcbf",
60-
"test": "phpunit",
61-
"test-coverage": "phpunit --coverage-clover clover.xml"
61+
"test": "phpunit --colors=always",
62+
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml"
6263
}
6364
}

0 commit comments

Comments
 (0)