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 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Imports the "xml2json" functionality from zend-json, so that it can be removed from that component.
- Loading branch information
0 parents
commit b366bb0
Showing
20 changed files
with
1,387 additions
and
0 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,8 @@ | ||
/test export-ignore | ||
/vendor export-ignore | ||
.coveralls.yml export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
phpcs.xml export-ignore | ||
phpunit.xml.dist 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.buildpath | ||
.DS_Store | ||
.idea | ||
.project | ||
.settings/ | ||
.*.sw* | ||
.*.un~ | ||
nbproject | ||
doc/html/ | ||
tmp/ | ||
vendor/ | ||
zf-mkdoc-theme/ | ||
|
||
clover.xml | ||
composer.lock | ||
coveralls-upload.json | ||
phpunit.xml |
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,62 @@ | ||
sudo: false | ||
|
||
language: php | ||
|
||
branches: | ||
except: | ||
- /^release-.*$/ | ||
- /^ghgfk-.*$/ | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
- $HOME/.local | ||
- zf-mkdoc-theme | ||
|
||
env: | ||
global: | ||
- SITE_URL=https://zendframework.github.io/zend-json-server | ||
- GH_USER_NAME="Matthew Weier O'Phinney" | ||
- [email protected] | ||
- GH_REF=github.com/zendframework/zend-json-server.git | ||
- secure: "KvztcHanoXLkqi+yL3o5el7ypu/jcyHqKy0VtOKGB483sg2wn6wJyAuVLBJscmzgazjPzQa57MBe9an7OOpuoJNPtE5m9huk41KByK2ibzMnC4F7D8lox5CUoV0jRaohYQmpZitbj/BKPlFbYaT42d+/R2o9CEQUJ4T3nYltzAydvB3T1CJE1u7HtZ8mB/Kgkfjqcyx+/bnmvmeGlwop4rDxHmEmrfApdWSUMSKUKjJqUlZt0ASpa2fJy3HL4don6WV1ufPcKVI7bQN1dkn+zZhW5zQ7PRg0hMEMxEMC8MLyLZvDXxL4rUmt2i3I0NtK6E357QdoX13NQKJZiH47jFpJA3DFQl2vE7Vu3kEkMqsrM2fbp9xTCyN9Gg5ZHueUd+iUxVCTy5Twlqt8MqBd2Z4tbljOsgBQkRuKxRg+JkNcWGM5RIWhA169nGY25867Bah/hh25blpsj77RVsvJdeUzAqCHWm5ey+2rNcUWbJXUK2nQdlonCLNsP0LweA5344GFFw+U+93btEw/5mpADbjhaYuZKXhMOcnqJgTGghxkp0cnExb7w5p6KxAsQ+E/C5X7RDwwhaTb6LUuKrTgar4/3RVUIqujdVVUntB1161S6Qnut1TqdaRHbgGOBSlCNWAB960icfdNbN+y4mtJZf9AVgvkoN8QGlncVPF+6GI=" | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 5.5 | ||
env: | ||
- EXECUTE_CS_CHECK=true | ||
- php: 5.6 | ||
env: | ||
- EXECUTE_TEST_COVERALLS=true | ||
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)" | ||
- PATH="$HOME/.local/bin:$PATH" | ||
- php: 7 | ||
- php: hhvm | ||
allow_failures: | ||
- php: hhvm | ||
|
||
notifications: | ||
irc: "irc.freenode.org#zftalk.dev" | ||
email: false | ||
|
||
before_install: | ||
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi | ||
- travis_retry composer self-update | ||
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi | ||
|
||
install: | ||
- travis_retry composer install --no-interaction --ignore-platform-reqs | ||
|
||
script: | ||
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer test-coverage ; fi | ||
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then composer test ; fi | ||
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then composer cs-check ; fi | ||
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi | ||
|
||
after_success: | ||
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi | ||
|
||
after_script: | ||
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer upload-coverage ; fi |
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 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file, in reverse chronological order by release. | ||
|
||
## 3.0.0 - TBD | ||
|
||
First release as a standalone component. Previous versions were shipped as | ||
`Zend\Json\Json::toXml()` within the [zend-json](https://github.com/zendframework/zend-json) | ||
package. | ||
|
||
### Added | ||
|
||
- Nothing. | ||
|
||
### 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Contributor Code of Conduct | ||
|
||
The Zend Framework project adheres to [The Code Manifesto](http://codemanifesto.com) | ||
as its guidelines for contributor interactions. | ||
|
||
## The Code Manifesto | ||
|
||
We want to work in an ecosystem that empowers developers to reach their | ||
potential — one that encourages growth and effective collaboration. A space that | ||
is safe for all. | ||
|
||
A space such as this benefits everyone that participates in it. It encourages | ||
new developers to enter our field. It is through discussion and collaboration | ||
that we grow, and through growth that we improve. | ||
|
||
In the effort to create such a place, we hold to these values: | ||
|
||
1. **Discrimination limits us.** This includes discrimination on the basis of | ||
race, gender, sexual orientation, gender identity, age, nationality, technology | ||
and any other arbitrary exclusion of a group of people. | ||
2. **Boundaries honor us.** Your comfort levels are not everyone’s comfort | ||
levels. Remember that, and if brought to your attention, heed it. | ||
3. **We are our biggest assets.** None of us were born masters of our trade. | ||
Each of us has been helped along the way. Return that favor, when and where | ||
you can. | ||
4. **We are resources for the future.** As an extension of #3, share what you | ||
know. Make yourself a resource to help those that come after you. | ||
5. **Respect defines us.** Treat others as you wish to be treated. Make your | ||
discussions, criticisms and debates from a position of respectfulness. Ask | ||
yourself, is it true? Is it necessary? Is it constructive? Anything less is | ||
unacceptable. | ||
6. **Reactions require grace.** Angry responses are valid, but abusive language | ||
and vindictive actions are toxic. When something happens that offends you, | ||
handle it assertively, but be respectful. Escalate reasonably, and try to | ||
allow the offender an opportunity to explain themselves, and possibly correct | ||
the issue. | ||
7. **Opinions are just that: opinions.** Each and every one of us, due to our | ||
background and upbringing, have varying opinions. The fact of the matter, is | ||
that is perfectly acceptable. Remember this: if you respect your own | ||
opinions, you should respect the opinions of others. | ||
8. **To err is human.** You might not intend it, but mistakes do happen and | ||
contribute to build experience. Tolerate honest mistakes, and don't hesitate | ||
to apologize if you make one yourself. |
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,234 @@ | ||
# CONTRIBUTING | ||
|
||
## RESOURCES | ||
|
||
If you wish to contribute to Zend Framework, 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 | ||
|
||
If you are working on new features or refactoring [create a proposal](https://github.com/zendframework/zend-xml2json/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). | ||
|
||
## 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 [email protected]:zendframework/zend-xml2json.git | ||
$ cd | ||
``` | ||
|
||
- Install dependencies via composer: | ||
|
||
```console | ||
$ curl -sS https://getcomposer.org/installer | php -- | ||
$ ./composer.phar install | ||
``` | ||
|
||
If you don't have `curl` installed, you can also download `composer.phar` from https://getcomposer.org/ | ||
|
||
- Run the tests via `phpunit` and the provided PHPUnit config, like in this example: | ||
|
||
```console | ||
$ ./vendor/bin/phpunit | ||
``` | ||
|
||
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 | ||
|
||
This component uses [php-cs-fixer](http://cs.sensiolabs.org/) for coding | ||
standards checks, and provides configuration for our selected checks. | ||
`php-cs-fixer` is installed by default via Composer. | ||
|
||
To run checks only: | ||
|
||
```console | ||
$ ./vendor/bin/php-cs-fixer fix . -v --diff --dry-run --config-file=.php_cs | ||
``` | ||
|
||
To have `php-cs-fixer` attempt to fix problems for you, omit the `--dry-run` | ||
flag: | ||
|
||
```console | ||
$ ./vendor/bin/php-cs-fixer fix . -v --diff --config-file=.php_cs | ||
``` | ||
|
||
If you allow php-cs-fixer to fix 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 | ||
|
||
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-xml2json) | ||
3. Clone the canonical repository locally and enter it. | ||
|
||
```console | ||
$ git clone git://github.com:zendframework/zend-xml2json.git | ||
$ cd zend-xml2json | ||
``` | ||
|
||
4. Add a remote to your fork; substitute your GitHub username in the command | ||
below. | ||
|
||
```console | ||
$ git remote add {username} [email protected]:{username}/zend-xml2json.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 | ||
``` | ||
|
||
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". | ||
|
||
### 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' | ||
``` | ||
|
||
... do some work ... | ||
|
||
|
||
```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}/zend-xml2json.git | ||
b5583aa..4f51698 HEAD -> master | ||
``` | ||
|
||
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 | ||
|
||
#### 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> | ||
``` | ||
|
||
- Remote branch removal | ||
|
||
```console | ||
$ git push {username} :<branchname> | ||
``` | ||
|
||
|
||
## Conduct | ||
|
||
Please see our [CONDUCT.md](CONDUCT.md) to understand expected behavior when interacting with others in the project. |
Oops, something went wrong.