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

Commit 289e53c

Browse files
committed
Docs update
- moved documentation from doc to docs directory - added PR and ISSUE github templates - updated CODE_OF_CONDUCT and CONTRIBUTING files
1 parent b3ee595 commit 289e53c

36 files changed

+145
-121
lines changed

CONDUCT.md renamed to docs/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 renamed to docs/CONTRIBUTING.md

Lines changed: 23 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,43 @@
22

33
## RESOURCES
44

5-
If you wish to contribute to Zend Framework, please be sure to
5+
If you wish to contribute to this project, please be sure to
66
read/subscribe to the following resources:
77

8-
- [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards)
9-
- [Contributor's Guide](http://framework.zend.com/participate/contributor-guide)
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
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)
1512

16-
If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-view/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).
13+
If you are working on new features or refactoring
14+
[create a proposal](https://github.com/zendframework/zend-view/issues/new).
3615

3716
## RUNNING TESTS
3817

39-
> ### Note: testing versions prior to 2.4
40-
>
41-
> This component originates with Zend Framework 2. During the lifetime of ZF2,
42-
> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no
43-
> changes were necessary. However, due to the migration, tests may not run on
44-
> versions < 2.4. As such, you may need to change the PHPUnit dependency if
45-
> attempting a fix on such a version.
46-
4718
To run tests:
4819

4920
- Clone the repository:
5021

5122
```console
52-
$ git clone git@github.com:zendframework/zend-view.git
53-
$ cd
23+
$ git clone git://github.com/zendframework/zend-view.git
24+
$ cd zend-view
5425
```
5526

5627
- Install dependencies via composer:
5728

5829
```console
59-
$ curl -sS https://getcomposer.org/installer | php --
60-
$ ./composer.phar install
30+
$ composer install
6131
```
6232

63-
If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/
33+
If you don't have `composer` installed, please download it from https://getcomposer.org/download/
6434

65-
- Run the tests via `phpunit` and the provided PHPUnit config, like in this example:
35+
- Run the tests using the "test" command shipped in the `composer.json`:
6636

6737
```console
68-
$ ./vendor/bin/phpunit
38+
$ composer test
6939
```
7040

71-
You can turn on conditional tests with the phpunit.xml file.
41+
You can turn on conditional tests with the `phpunit.xml` file.
7242
To do so:
7343

7444
- Copy `phpunit.xml.dist` file to `phpunit.xml`
@@ -77,24 +47,22 @@ To do so:
7747

7848
## Running Coding Standards Checks
7949

80-
This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding
81-
standards checks, and provides configuration for our selected checks.
82-
`phpcs` is installed by default via Composer.
50+
First, ensure you've installed dependencies via composer, per the previous
51+
section on running tests.
8352

84-
To run checks only:
53+
To run CS checks only:
8554

8655
```console
8756
$ composer cs-check
8857
```
8958

90-
`phpcs` also includes a tool for fixing most CS violations, `phpcbf`:
91-
59+
To attempt to automatically fix common CS issues:
9260

9361
```console
9462
$ composer cs-fix
9563
```
9664

97-
If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure
65+
If the above fixes any CS issues, please re-run the tests to ensure
9866
they pass, and make sure you add and commit the changes after verification.
9967

10068
## Recommended Workflow for Contributions
@@ -103,12 +71,12 @@ Your first step is to establish a public repository from which we can
10371
pull your work into the master repository. We recommend using
10472
[GitHub](https://github.com), as that is where the component is already hosted.
10573

106-
1. Setup a [GitHub account](http://github.com/), if you haven't yet
107-
2. Fork the repository (http://github.com/zendframework/zend-view)
74+
1. Setup a [GitHub account](https://github.com/), if you haven't yet
75+
2. Fork the repository (https://github.com/zendframework/zend-view)
10876
3. Clone the canonical repository locally and enter it.
10977

11078
```console
111-
$ git clone git@github.com:zendframework/zend-view.git
79+
$ git clone git://github.com/zendframework/zend-view.git
11280
$ cd zend-view
11381
```
11482

@@ -188,15 +156,7 @@ To send a pull request, you have two options.
188156
If using GitHub, you can do the pull request from there. Navigate to
189157
your repository, select the branch you just created, and then select the
190158
"Pull Request" button in the upper right. Select the user/organization
191-
"zendframework" as the recipient.
192-
193-
If using your own repository - or even if using GitHub - you can use `git
194-
format-patch` to create a patchset for us to apply; in fact, this is
195-
**recommended** for security-related patches. If you use `format-patch`, please
196-
send the patches as attachments to:
197-
198-
- [email protected] for patches without security implications
199-
- [email protected] for security patches
159+
"zendframework" (or whatever the upstream organization is) as the recipient.
200160

201161
#### What branch to issue the pull request against?
202162

@@ -227,8 +187,3 @@ repository, we suggest doing some cleanup of these branches.
227187
```console
228188
$ git push {username} :<branchname>
229189
```
230-
231-
232-
## Conduct
233-
234-
Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project.

docs/ISSUE_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
- [ ] I was not able to find an [open](https://github.com/zendframework/zend-view/issues?q=is%3Aopen) or [closed](https://github.com/zendframework/zend-view/issues?q=is%3Aclosed) issue matching what I'm seeing.
2+
- [ ] This is not a question. (Questions should be asked on [chat](https://zendframework.slack.com/) ([Signup here](https://zendframework-slack.herokuapp.com/)) or our [forums](https://discourse.zendframework.com/).)
3+
4+
Provide a narrative description of what you are trying to accomplish.
5+
6+
### Code to reproduce the issue
7+
8+
<!-- Please provide the minimum code necessary to recreate the issue -->
9+
10+
```php
11+
```
12+
13+
### Expected results
14+
15+
<!-- What do you think should have happened? -->
16+
17+
### Actual results
18+
19+
<!-- What did you actually observe? -->

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+
[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/components)
9+
- To report issues, use this repository's
10+
[issue tracker](https://github.com/zendframework/zend-view/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.

doc/book/cookbook/setting-module-specific-layouts.md renamed to docs/book/cookbook/setting-module-specific-layouts.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class LayoutListener extends AbstractListenerAggregate
6262
if (! $controller) {
6363
return;
6464
}
65-
65+
6666
// Extract module name
6767
$module = substr($controller, 0, strpos($controller, '\\'));
6868

@@ -105,7 +105,7 @@ class Module
105105
$templateMapResolver = $application->getServiceManager()->get(
106106
'ViewTemplateMapResolver'
107107
);
108-
108+
109109
// Create and register layout listener
110110
$listener = new LayoutListener($templateMapResolver);
111111
$listener->attach($application->getEventManager());
@@ -115,7 +115,7 @@ class Module
115115
}
116116
```
117117

118-
> More informations on registering module-specific listeners can be found in the
118+
> More informations on registering module-specific listeners can be found in the
119119
> [documentation of zend-mvc](https://docs.zendframework.com/zend-mvc/examples/#registering-module-specific-listeners).
120120
121121
## Add Template Scripts to the Configuration

doc/book/helpers/advanced-usage.md renamed to docs/book/helpers/advanced-usage.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,20 @@ class SpecialPurpose extends AbstractHelper
211211
>
212212
> ```php
213213
> namespace MyModule\View\Helper;
214-
>
214+
>
215215
> use Zend\View\Helper\EscapeHtml;
216-
>
216+
>
217217
> class SpecialPurpose
218218
> {
219219
> private $count = 0;
220-
>
220+
>
221221
> private $escaper;
222-
>
222+
>
223223
> public function __construct(EscapeHtml $escaper)
224224
> {
225225
> $this->escaper = $escaper;
226226
> }
227-
>
227+
>
228228
> public function __invoke()
229229
> {
230230
> $this->count++;
@@ -234,12 +234,12 @@ class SpecialPurpose extends AbstractHelper
234234
> }
235235
> }
236236
> ```
237-
>
237+
>
238238
> Then we would write a factory like the following:
239-
>
239+
>
240240
> ```php
241241
> use Zend\ServiceManager\AbstractPluginManager;
242-
>
242+
>
243243
> class SpecialPurposeFactory
244244
> {
245245
> public function __invoke($container)
@@ -248,7 +248,7 @@ class SpecialPurpose extends AbstractHelper
248248
> // zend-servicemanager v3. v2 passes the helper manager directly.
249249
> $container = $container->get('ViewHelperManager');
250250
> }
251-
>
251+
>
252252
> return new SpecialPurpose($container->get('escapeHtml'));
253253
> }
254254
> }
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)