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

Commit d8a66d6

Browse files
committed
Added docs
1 parent 3bc0faa commit d8a66d6

File tree

8 files changed

+307
-0
lines changed

8 files changed

+307
-0
lines changed

docs/CODE_OF_CONDUCT.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Contributor Code of Conduct
2+
3+
This project adheres to [The Code Manifesto](http://codemanifesto.com)
4+
as its guidelines for contributor interactions.
5+
6+
## The Code Manifesto
7+
8+
We want to work in an ecosystem that empowers developers to reach their
9+
potential — one that encourages growth and effective collaboration. A space that
10+
is safe for all.
11+
12+
A space such as this benefits everyone that participates in it. It encourages
13+
new developers to enter our field. It is through discussion and collaboration
14+
that we grow, and through growth that we improve.
15+
16+
In the effort to create such a place, we hold to these values:
17+
18+
1. **Discrimination limits us.** This includes discrimination on the basis of
19+
race, gender, sexual orientation, gender identity, age, nationality, technology
20+
and any other arbitrary exclusion of a group of people.
21+
2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort
22+
levels. Remember that, and if brought to your attention, heed it.
23+
3. **We are our biggest assets.** None of us were born masters of our trade.
24+
Each of us has been helped along the way. Return that favor, when and where
25+
you can.
26+
4. **We are resources for the future.** As an extension of #3, share what you
27+
know. Make yourself a resource to help those that come after you.
28+
5. **Respect defines us.** Treat others as you wish to be treated. Make your
29+
discussions, criticisms and debates from a position of respectfulness. Ask
30+
yourself, is it true? Is it necessary? Is it constructive? Anything less is
31+
unacceptable.
32+
6. **Reactions require grace.** Angry responses are valid, but abusive language
33+
and vindictive actions are toxic. When something happens that offends you,
34+
handle it assertively, but be respectful. Escalate reasonably, and try to
35+
allow the offender an opportunity to explain themselves, and possibly correct
36+
the issue.
37+
7. **Opinions are just that: opinions.** Each and every one of us, due to our
38+
background and upbringing, have varying opinions. The fact of the matter, is
39+
that is perfectly acceptable. Remember this: if you respect your own
40+
opinions, you should respect the opinions of others.
41+
8. **To err is human.** You might not intend it, but mistakes do happen and
42+
contribute to build experience. Tolerate honest mistakes, and don't hesitate
43+
to apologize if you make one yourself.

docs/CONTRIBUTING.md

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# CONTRIBUTING
2+
3+
## RESOURCES
4+
5+
If you wish to contribute to this project, please be sure to
6+
read/subscribe to the following resources:
7+
8+
- [Coding Standards](https://github.com/zendframework/zend-coding-standard)
9+
- [Forums](https://discourse.zendframework.com/c/contributors)
10+
- [Slack](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/zendframework/zend-expressive-authorization/issues/new).
15+
16+
## RUNNING TESTS
17+
18+
To run tests:
19+
20+
- Clone the repository:
21+
22+
```console
23+
$ git clone git://github.com/zendframework/zend-expressive-authorization.git
24+
$ cd zend-expressive-authorization
25+
```
26+
27+
- Install dependencies via composer:
28+
29+
```console
30+
$ composer install
31+
```
32+
33+
If you don't have `composer` installed, please download it from https://getcomposer.org/download/
34+
35+
- Run the tests using the "test" command shipped in the `composer.json`:
36+
37+
```console
38+
$ composer test
39+
```
40+
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:
54+
55+
```console
56+
$ composer cs-check
57+
```
58+
59+
To attempt to automatically fix common CS issues:
60+
61+
```console
62+
$ composer cs-fix
63+
```
64+
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/zendframework/zend-expressive-authorization)
76+
3. Clone the canonical repository locally and enter it.
77+
78+
```console
79+
$ git clone git://github.com/zendframework/zend-expressive-authorization.git
80+
$ cd zend-expressive-authorization
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} git@github.com:{username}/zend-expressive-authorization.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:
96+
97+
98+
```console
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'
131+
```
132+
133+
... do some work ...
134+
135+
136+
```console
137+
$ git commit
138+
```
139+
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://git@github.com/{username}/zend-expressive-authorization.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+
"zendframework" (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+
```
184+
185+
- Remote branch removal
186+
187+
```console
188+
$ git push {username} :<branchname>
189+
```

docs/ISSUE_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Provide a narrative description of the issue.
2+
3+
### Code to reproduce the issue
4+
5+
```php
6+
```
7+
8+
### Expected results
9+
10+
### Actual results
11+

docs/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Provide a narrative description of what you are trying to accomplish:
2+
3+
- [ ] Are you fixing a bug?
4+
- [ ] Detail how the bug is invoked currently.
5+
- [ ] Detail the original, incorrect behavior.
6+
- [ ] Detail the new, expected behavior.
7+
- [ ] Base your feature on the `master` branch, and submit against that branch.
8+
- [ ] Add a regression test that demonstrates the bug, and proves the fix.
9+
- [ ] Add a `CHANGELOG.md` entry for the fix.
10+
11+
- [ ] Are you creating a new feature?
12+
- [ ] Why is the new feature needed? What purpose does it serve?
13+
- [ ] How will users use the new feature?
14+
- [ ] Base your feature on the `develop` branch, and submit against that branch.
15+
- [ ] Add only one feature per pull request; split multiple features over multiple pull requests
16+
- [ ] Add tests for the new feature.
17+
- [ ] Add documentation for the new feature.
18+
- [ ] Add a `CHANGELOG.md` entry for the new feature.
19+
20+
- [ ] Is this related to quality assurance?
21+
- [ ] Detail why the changes are necessary.
22+
23+
- [ ] Is this related to documentation?
24+
- [ ] Is it a typographical and/or grammatical fix?
25+
- [ ] Is it new documentation?

docs/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+
[Slack](https://zendframework-slack.herokuapp.com)
7+
- For detailed questions (e.g., those requiring examples) use our
8+
[forums](https://discourse.zendframework.com/c/questions/components)
9+
- To report issues, use this repository's
10+
[issue tracker](https://github.com/zendframework/zend-expressive-authorization/issues/new)
11+
12+
**DO NOT** use the issue tracker to ask questions; use Slack 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.

docs/book/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="container">
2+
<div class="jumbotron">
3+
<h1>zendframework/zend-expressive-authentication</h1>
4+
5+
<p>Authentication middleware for PSR-7 applications.</p>
6+
7+
<pre><code class="language-bash">$ composer require zendframework/zend-expressive-authentication</code></pre>
8+
</div>
9+
</div>

docs/book/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../README.md

docs/book/intro.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# zendframework/zend-expressive-authentication
2+
3+
This component provides authentication abstraction and authentication middleware
4+
for PSR-7 applications.

0 commit comments

Comments
 (0)