This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
220 additions
and
191 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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
/test export-ignore | ||
/vendor export-ignore | ||
.coveralls.yml export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
.php_cs export-ignore | ||
phpunit.xml.dist export-ignore | ||
/.coveralls.yml export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/composer.lock export-ignore | ||
/docs/ export-ignore | ||
/mkdocs.yml export-ignore | ||
/phpcs.xml export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/test/ export-ignore |
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,16 +1,7 @@ | ||
.buildpath | ||
.DS_Store | ||
.idea | ||
.project | ||
.settings/ | ||
.*.sw* | ||
.*.un~ | ||
nbproject | ||
tmp/ | ||
doc/html/ | ||
zf-mkdoc-theme/ | ||
|
||
clover.xml | ||
coveralls-upload.json | ||
phpunit.xml | ||
vendor | ||
/clover.xml | ||
/coveralls-upload.json | ||
/docs/html/ | ||
/phpunit.xml | ||
/vendor/ | ||
/zf-mkdoc-theme.tgz | ||
/zf-mkdoc-theme/ |
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 |
---|---|---|
@@ -1,11 +1,26 @@ | ||
# zend-validator | ||
|
||
[![Build Status](https://secure.travis-ci.org/zendframework/zend-validator.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-validator) | ||
[![Coverage Status](https://coveralls.io/repos/zendframework/zend-validator/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-validator?branch=master) | ||
[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-validator/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-validator?branch=master) | ||
|
||
zend-validator provides a set of commonly needed validators. It also provides a | ||
simple validator chaining mechanism by which multiple validators may be applied | ||
to a single datum in a user-defined order. | ||
|
||
- File issues at https://github.com/zendframework/zend-validator/issues | ||
- Documentation is at https://docs.zendframework.com/zend-validator/ | ||
## Installation | ||
|
||
Run the following to install this library: | ||
|
||
```bash | ||
$ composer require zendframework/zend-validator | ||
``` | ||
|
||
## Documentation | ||
|
||
Browse the documentation online at https://docs.zendframework.com/zend-validator/ | ||
|
||
## Support | ||
|
||
* [Issues](https://github.com/zendframework/zend-validator/issues/) | ||
* [Chat](https://zendframework-slack.herokuapp.com/) | ||
* [Forum](https://discourse.zendframework.com/) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -2,73 +2,43 @@ | |
|
||
## RESOURCES | ||
|
||
If you wish to contribute to Zend Framework, 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) | ||
- [Contributor's Guide](http://framework.zend.com/participate/contributor-guide) | ||
- ZF Contributor's mailing list: | ||
Archives: http://zend-framework-community.634137.n4.nabble.com/ZF-Contributor-f680267.html | ||
Subscribe: [email protected] | ||
- ZF Contributor's IRC channel: | ||
#zftalk.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/zendframework/zend-validator/issues/new). | ||
|
||
## Reporting Potential Security Issues | ||
|
||
If you have encountered a potential security vulnerability, please **DO NOT** report it on the public | ||
issue tracker: send it to us at [[email protected]](mailto:[email protected]) instead. | ||
We will work with you to verify the vulnerability and patch it as soon as possible. | ||
|
||
When reporting issues, please provide the following information: | ||
|
||
- Component(s) affected | ||
- A description indicating how to reproduce the issue | ||
- A summary of the security vulnerability and impact | ||
|
||
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 users and provides them with a chance | ||
to upgrade and/or update in order to protect their applications. | ||
|
||
For sensitive email communications, please use [our PGP key](http://framework.zend.com/zf-security-pgp-key.asc). | ||
If you are working on new features or refactoring | ||
[create a proposal](https://github.com/zendframework/zend-validator/issues/new). | ||
|
||
## RUNNING TESTS | ||
|
||
> ### Note: testing versions prior to 2.4 | ||
> | ||
> This component originates with Zend Framework 2. During the lifetime of ZF2, | ||
> testing infrastructure migrated from PHPUnit 3 to PHPUnit 4. In most cases, no | ||
> changes were necessary. However, due to the migration, tests may not run on | ||
> versions < 2.4. As such, you may need to change the PHPUnit dependency if | ||
> attempting a fix on such a version. | ||
To run tests: | ||
|
||
- Clone the repository: | ||
|
||
```console | ||
$ git clone git@github.com:zendframework/zend-validator.git | ||
$ cd | ||
$ git clone git://github.com/zendframework/zend-validator.git | ||
$ cd zend-validator | ||
``` | ||
|
||
- Install dependencies via composer: | ||
|
||
```console | ||
$ curl -sS https://getcomposer.org/installer | php -- | ||
$ ./composer.phar install | ||
$ composer install | ||
``` | ||
|
||
If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/ | ||
If you don't have `composer` installed, please download it from https://getcomposer.org/download/ | ||
|
||
- Run the tests via `phpunit` and the provided PHPUnit config, like in this example: | ||
- Run the tests using the "test" command shipped in the `composer.json`: | ||
|
||
```console | ||
$ ./vendor/bin/phpunit | ||
$ composer test | ||
``` | ||
|
||
You can turn on conditional tests with the phpunit.xml file. | ||
You can turn on conditional tests with the `phpunit.xml` file. | ||
To do so: | ||
|
||
- Copy `phpunit.xml.dist` file to `phpunit.xml` | ||
|
@@ -77,24 +47,22 @@ To do so: | |
|
||
## Running Coding Standards Checks | ||
|
||
This component uses [phpcs](https://github.com/squizlabs/PHP_CodeSniffer) for coding | ||
standards checks, and provides configuration for our selected checks. | ||
`phpcs` is installed by default via Composer. | ||
First, ensure you've installed dependencies via composer, per the previous | ||
section on running tests. | ||
|
||
To run checks only: | ||
To run CS checks only: | ||
|
||
```console | ||
$ composer cs-check | ||
``` | ||
|
||
`phpcs` also includes a tool for fixing most CS violations, `phpcbf`: | ||
|
||
To attempt to automatically fix common CS issues: | ||
|
||
```console | ||
$ composer cs-fix | ||
``` | ||
|
||
If you allow `phpcbf` to fix CS issues, please re-run the tests to ensure | ||
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. | ||
|
||
## Recommended Workflow for Contributions | ||
|
@@ -103,12 +71,12 @@ 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. | ||
|
||
1. Setup a [GitHub account](http://github.com/), if you haven't yet | ||
2. Fork the repository (http://github.com/zendframework/zend-validator) | ||
1. Setup a [GitHub account](https://github.com/), if you haven't yet | ||
2. Fork the repository (https://github.com/zendframework/zend-validator) | ||
3. Clone the canonical repository locally and enter it. | ||
|
||
```console | ||
$ git clone git://github.com:zendframework/zend-validator.git | ||
$ git clone git://github.com/zendframework/zend-validator.git | ||
$ cd zend-validator | ||
``` | ||
|
||
|
@@ -188,15 +156,7 @@ 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 | ||
"zendframework" as the recipient. | ||
|
||
If using your own repository - or even if using GitHub - you can use `git | ||
format-patch` to create a patchset for us to apply; in fact, this is | ||
**recommended** for security-related patches. If you use `format-patch`, please | ||
send the patches as attachments to: | ||
|
||
- [email protected] for patches without security implications | ||
- [email protected] for security patches | ||
"zendframework" (or whatever the upstream organization is) as the recipient. | ||
|
||
#### What branch to issue the pull request against? | ||
|
||
|
@@ -227,8 +187,3 @@ repository, we suggest doing some cleanup of these branches. | |
```console | ||
$ git push {username} :<branchname> | ||
``` | ||
|
||
|
||
## Conduct | ||
|
||
Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. |
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,19 @@ | ||
- [ ] I was not able to find an [open](https://github.com/zendframework/zend-validator/issues?q=is%3Aopen) or [closed](https://github.com/zendframework/zend-validator/issues?q=is%3Aclosed) issue matching what I'm seeing. | ||
- [ ] 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/).) | ||
|
||
Provide a narrative description of what you are trying to accomplish. | ||
|
||
### Code to reproduce the issue | ||
|
||
<!-- Please provide the minimum code necessary to recreate the issue --> | ||
|
||
```php | ||
``` | ||
|
||
### Expected results | ||
|
||
<!-- What do you think should have happened? --> | ||
|
||
### Actual results | ||
|
||
<!-- What did you actually observe? --> |
Oops, something went wrong.