This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging develop to master in preparation for 1.5.0 release.
- Loading branch information
Showing
12 changed files
with
2,414 additions
and
613 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file, in reverse chronological order by release. | ||
|
||
## 1.5.0 - 2018-05-08 | ||
|
||
### Added | ||
|
||
- [#159](https://github.com/zfcampus/zf-apigility-skeleton/pull/159) adds a development requirement on zendframework/zend-test, ensuring users | ||
have the ability to run existing unit tests, as well as write and execute new ones out of the box. | ||
|
||
### Changed | ||
|
||
- [#164](https://github.com/zfcampus/zf-apigility-skeleton/pull/164) updates all dependencies to versions that will work with PHP 7.2, where possible. | ||
|
||
- [#154](https://github.com/zfcampus/zf-apigility-skeleton/pull/154) modifies the `config/autoload/.gitignore` rules to omit `*.local-development.php` files. | ||
|
||
### Deprecated | ||
|
||
- Nothing. | ||
|
||
### Removed | ||
|
||
- Nothing. | ||
|
||
### Fixed | ||
|
||
- Nothing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,201 @@ | ||
# CONTRIBUTING | ||
|
||
Apigility and related modules (of which this is one) are open source and licensed | ||
as [BSD-3-Clause](http://opensource.org/licenses/BSD-3-Clause). Contributions | ||
are welcome in the form of issue reports and pull requests. | ||
|
||
All pull requests should include unit tests when applicable, and should follow | ||
our coding standards (more on these below); failure to do so may result in | ||
rejection of the pull request. If you need help writing tests, please ask on the | ||
developer mailing list and/or in IRC. | ||
|
||
## RESOURCES | ||
|
||
If you wish to contribute to Apigility modules, please be sure to | ||
If you wish to contribute to this project, please be sure to | ||
read/subscribe to the following resources: | ||
|
||
- [Coding Standards](https://github.com/zendframework/zf2/wiki/Coding-Standards) | ||
- [ZF Git Guide](https://github.com/zendframework/zf2/blob/master/README-GIT.md) | ||
- [Apigility developer mailing list](http://bit.ly/apigility-dev) | ||
- Apigility developer IRC channel: #apigility-dev on Freenode.net | ||
- [Coding Standards](https://github.com/zendframework/zend-coding-standard) | ||
- [Forums](https://discourse.zendframework.com/c/contributors) | ||
- [Chat](https://zendframework-slack.herokuapp.com) | ||
- [Code of Conduct](CODE_OF_CONDUCT.md) | ||
|
||
If you are working on new features or refactoring | ||
[create a proposal](https://github.com/zfcampus/zf-api-problem/issues/new). | ||
|
||
If you are working on new features, refactoring an existing module, or proposing | ||
a new module, please send an email to the developer mailing list. | ||
## RUNNING TESTS | ||
|
||
## REPORTING POTENTIAL SECURITY ISSUES | ||
To run tests: | ||
|
||
If you have encountered a potential security vulnerability in any Apigility | ||
module, please report it to us at [[email protected]](mailto:[email protected]). | ||
We will work with you to verify the vulnerability and patch it. | ||
- Clone the repository: | ||
|
||
When reporting issues, please provide the following information: | ||
```console | ||
$ git clone git://github.com/zfcampus/zf-api-problem.git | ||
$ cd zf-api-problem | ||
``` | ||
|
||
- Module(s) affected | ||
- A description indicating how to reproduce the issue | ||
- A summary of the security vulnerability and impact | ||
- Install dependencies via composer: | ||
|
||
We request that you contact us via the email address above and give the project | ||
contributors a chance to resolve the vulnerability and issue a new release prior | ||
to any public exposure; this helps protect Apigility users, and provides them | ||
with a chance to upgrade and/or update in order to protect their applications. | ||
```console | ||
$ composer install | ||
``` | ||
|
||
For sensitive email communications, please use | ||
[our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). | ||
If you don't have `composer` installed, please download it from https://getcomposer.org/download/ | ||
|
||
## RUNNING TESTS | ||
- Make sure that `zendframework/zend-test` is installed: | ||
|
||
```console | ||
$ composer require --dev zendframework/zend-test | ||
``` | ||
|
||
- Run the tests using the "test" command shipped in the `composer.json`: | ||
|
||
```console | ||
$ composer test | ||
``` | ||
|
||
You can turn on conditional tests with the `phpunit.xml` file. | ||
To do so: | ||
|
||
- Copy `phpunit.xml.dist` file to `phpunit.xml` | ||
- Edit `phpunit.xml` to enable any specific functionality you | ||
want to test, as well as to provide test values to utilize. | ||
|
||
## Running Coding Standards Checks | ||
|
||
First, ensure you've installed dependencies via composer, per the previous | ||
section on running tests. | ||
|
||
First, use [Composer](https://getcomposer.org) to install all dependencies: | ||
Make sure that `squizlabs/php_codesniffer` is installed: | ||
|
||
```bash | ||
$ composer install | ||
```console | ||
$ composer require --dev squizlabs/php_codesniffer | ||
``` | ||
|
||
Make sure that `zendframework/zend-test` is installed: | ||
To run CS checks only: | ||
|
||
```bash | ||
$ composer require --dev zendframework/zend-test | ||
```console | ||
$ composer cs-check | ||
``` | ||
|
||
To run tests: | ||
To attempt to automatically fix common CS issues: | ||
|
||
```bash | ||
$ composer test | ||
```console | ||
$ composer cs-fix | ||
``` | ||
|
||
## CODING STANDARDS | ||
If the above fixes any CS issues, please re-run the tests to ensure | ||
they pass, and make sure you add and commit the changes after verification. | ||
|
||
While Apigility uses Zend Framework coding standards, in practice, we verify | ||
against [PSR-2](http://www.php-fig.org/psr/psr-2/). | ||
## Recommended Workflow for Contributions | ||
|
||
First, ensure you've installed dependencies via composer: | ||
Your first step is to establish a public repository from which we can | ||
pull your work into the master repository. We recommend using | ||
[GitHub](https://github.com), as that is where the component is already hosted. | ||
|
||
```bash | ||
$ composer require --dev squizlabs/php_codesniffer | ||
1. Setup a [GitHub account](https://github.com/), if you haven't yet | ||
2. Fork the repository (https://github.com/zfcampus/zf-api-problem) | ||
3. Clone the canonical repository locally and enter it. | ||
|
||
```console | ||
$ git clone git://github.com/zfcampus/zf-api-problem.git | ||
$ cd zf-api-problem | ||
``` | ||
|
||
4. Add a remote to your fork; substitute your GitHub username in the command | ||
below. | ||
|
||
```console | ||
$ git remote add {username} [email protected]:{username}/zf-api-problem.git | ||
$ git fetch {username} | ||
``` | ||
|
||
### Keeping Up-to-Date | ||
|
||
Periodically, you should update your fork or personal repository to | ||
match the canonical ZF repository. Assuming you have setup your local repository | ||
per the instructions above, you can do the following: | ||
|
||
|
||
```console | ||
$ git checkout master | ||
$ git fetch origin | ||
$ git rebase origin/master | ||
# OPTIONALLY, to keep your remote up-to-date - | ||
$ git push {username} master:master | ||
``` | ||
|
||
To check for CS issues: | ||
If you're tracking other branches -- for example, the "develop" branch, where | ||
new feature development occurs -- you'll want to do the same operations for that | ||
branch; simply substitute "develop" for "master". | ||
|
||
```bash | ||
$ composer cs-check | ||
### Working on a patch | ||
|
||
We recommend you do each new feature or bugfix in a new branch. This simplifies | ||
the task of code review as well as the task of merging your changes into the | ||
canonical repository. | ||
|
||
A typical workflow will then consist of the following: | ||
|
||
1. Create a new local branch based off either your master or develop branch. | ||
2. Switch to your new local branch. (This step can be combined with the | ||
previous step with the use of `git checkout -b`.) | ||
3. Do some work, commit, repeat as necessary. | ||
4. Push the local branch to your remote repository. | ||
5. Send a pull request. | ||
|
||
The mechanics of this process are actually quite trivial. Below, we will | ||
create a branch for fixing an issue in the tracker. | ||
|
||
```console | ||
$ git checkout -b hotfix/9295 | ||
Switched to a new branch 'hotfix/9295' | ||
``` | ||
|
||
This will report CS issues. Alternately, you can have most errors automatically | ||
fixed as well: | ||
... do some work ... | ||
|
||
```bash | ||
$ composer cs-fix | ||
|
||
```console | ||
$ git commit | ||
``` | ||
|
||
... write your log message ... | ||
|
||
|
||
```console | ||
$ git push {username} hotfix/9295:hotfix/9295 | ||
Counting objects: 38, done. | ||
Delta compression using up to 2 threads. | ||
Compression objects: 100% (18/18), done. | ||
Writing objects: 100% (20/20), 8.19KiB, done. | ||
Total 20 (delta 12), reused 0 (delta 0) | ||
To ssh://[email protected]/{username}/zf-api-problem.git | ||
b5583aa..4f51698 HEAD -> master | ||
``` | ||
|
||
After running `composer cs-fix`, be sure to add and commit any files that were | ||
updated, after first verifying that the changes do not break tests. | ||
To send a pull request, you have two options. | ||
|
||
If using GitHub, you can do the pull request from there. Navigate to | ||
your repository, select the branch you just created, and then select the | ||
"Pull Request" button in the upper right. Select the user/organization | ||
"zfcampus" (or whatever the upstream organization is) as the recipient. | ||
|
||
#### What branch to issue the pull request against? | ||
|
||
Which branch should you issue a pull request against? | ||
|
||
- For fixes against the stable release, issue the pull request against the | ||
"master" branch. | ||
- For new features, or fixes that introduce new elements to the public API (such | ||
as new public methods or properties), issue the pull request against the | ||
"develop" branch. | ||
|
||
### Branch Cleanup | ||
|
||
As you might imagine, if you are a frequent contributor, you'll start to | ||
get a ton of branches both locally and on your remote. | ||
|
||
Once you know that your changes have been accepted to the master | ||
repository, we suggest doing some cleanup of these branches. | ||
|
||
- Local branch cleanup | ||
|
||
```console | ||
$ git branch -d <branchname> | ||
``` | ||
|
||
## Conduct | ||
- Remote branch removal | ||
|
||
Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. | ||
```console | ||
$ git push {username} :<branchname> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Getting Support | ||
|
||
Zend Framework offers three support channels: | ||
|
||
- For real-time questions, use our | ||
[chat](https://zendframework-slack.herokuapp.com) | ||
- For detailed questions (e.g., those requiring examples) use our | ||
[forums](https://discourse.zendframework.com/c/questions/apigility) | ||
- To report issues, use this repository's | ||
[issue tracker](https://github.com/zfcampus/zf-apigility-skeleton/issues/new) | ||
|
||
**DO NOT** use the issue tracker to ask questions; use chat or the forums for | ||
that. Questions posed to the issue tracker will be closed. | ||
|
||
When reporting an issue, please include the following details: | ||
|
||
- A narrative description of what you are trying to accomplish. | ||
- The minimum code necessary to reproduce the issue. | ||
- The expected results of exercising that code. | ||
- The actual results received. | ||
|
||
We may ask for additional details: what version of the library you are using, | ||
and what PHP version was used to reproduce the issue. | ||
|
||
You may also submit a failing test case as a pull request. |
Oops, something went wrong.