Skip to content

Commit 70dfbf5

Browse files
committed
Merge branch 'feature/directory-structure' into develop
2 parents 718d8c8 + 17b0a5b commit 70dfbf5

12 files changed

+81
-108
lines changed

Diff for: .editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; This file is for unifying the coding style for different editors and IDEs.
2-
; More information at http://editorconfig.org
2+
; More information at https://editorconfig.org
33

44
root = true
55

Diff for: .gitattributes

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
* text=auto
2+
13
# Path-based git attributes
24
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
35

46
# Ignore all test and documentation with "export-ignore".
7+
/.editorconfig export-ignore
58
/.gitattributes export-ignore
9+
/.github export-ignore
610
/.gitignore export-ignore
11+
/.styleci.yml export-ignore
712
/.travis.yml export-ignore
13+
/docs export-ignore
14+
/phpcs.xml.dist export-ignore
815
/phpunit.xml.dist export-ignore
9-
/.scrutinizer.yml export-ignore
1016
/tests export-ignore
11-
/docs export-ignore

Diff for: CODE_OF_CONDUCT.md renamed to .github/CODE_OF_CONDUCT.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at `[email protected]`. All
58+
reported by contacting the project team at `[email protected]`. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
6161
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -68,7 +68,7 @@ members of the project's leadership.
6868
## Attribution
6969

7070
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at [http://contributor-covenant.org/version/1/4][version]
71+
available at [https://contributor-covenant.org/version/1/4][version]
7272

73-
[homepage]: http://contributor-covenant.org
74-
[version]: http://contributor-covenant.org/version/1/4/
73+
[homepage]: https://contributor-covenant.org
74+
[version]: https://contributor-covenant.org/version/1/4

Diff for: CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

+2-15
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,16 @@ Contributions are **welcome** and will be fully **credited**.
44

55
We accept contributions via Pull Requests on [Github](https://github.com/pxgamer/php-json-g).
66

7-
87
## Pull Requests
98

109
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
1110

12-
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
11+
- **Add tests!** - If possible, try to add tests to support your patch.
1312

1413
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
1514

16-
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
15+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org). Randomly breaking public APIs is not an option.
1716

1817
- **Create feature branches** - Don't ask us to pull from your master branch.
1918

2019
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21-
22-
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23-
24-
25-
## Running Tests
26-
27-
``` bash
28-
$ composer test
29-
```
30-
31-
32-
**Happy coding**!
+3-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
<!-- Provide a general summary of the issue in the Title above -->
22

3-
## Detailed description
3+
## Description
44

55
Provide a detailed description of the change or addition you are proposing.
66

77
Make it clear if the issue is a bug, an enhancement or just a question.
88

9-
## Context
10-
11-
Why is this change important to you? How would you use it?
12-
13-
How can it benefit other users?
14-
159
## Possible implementation
1610

1711
Not obligatory, but suggest an idea for implementing addition or change.
@@ -20,8 +14,6 @@ Not obligatory, but suggest an idea for implementing addition or change.
2014

2115
Include as many relevant details about the environment you experienced the bug in and how to reproduce it.
2216

23-
* Version used (e.g. PHP 5.6, HHVM 3):
24-
* Operating system and version (e.g. Ubuntu 16.04, Windows 7):
25-
* Link to your project:
26-
* ...
17+
* Version used (e.g. PHP 7.3):
18+
* Operating system and version (e.g. Ubuntu 18.10, Windows 10):
2719
* ...

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
5+
...
6+
7+
## Types of changes
8+
9+
Put an `x` in all the boxes that apply:
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
14+
15+
## Checklist
16+
17+
Put an `x` in all the boxes that apply:
18+
19+
- [ ] I have read the **[CONTRIBUTING](CONTRIBUTING.md)** document.
20+
- [ ] My pull request addresses exactly one patch/feature.
21+
- [ ] I have created a branch for this patch/feature.
22+
23+
If you're unsure about any of these, don't hesitate to ask. We're here to help!

Diff for: .gitignore

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
build
2-
composer.lock
3-
vendor
1+
/build
2+
/vendor
3+
/composer.lock
4+
/phpcs.xml
5+
/phpunit.xml

Diff for: .travis.yml

+13-12
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,27 @@ dist: trusty
22
language: php
33

44
php:
5-
- 7.1
6-
- nightly
5+
- 7.2
6+
- 7.3
7+
- nightly
78

8-
# This triggers builds to run on the new TravisCI infrastructure.
9-
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
10-
sudo: false
9+
matrix:
10+
allow_failures:
11+
- php: nightly
1112

1213
## Cache composer
1314
cache:
14-
directories:
15+
directories:
1516
- $HOME/.composer/cache
1617

1718
before_script:
18-
- pecl channel-update pecl.php.net
19-
- printf "\n" | pecl install imagick
20-
- travis_retry composer update --no-interaction --prefer-dist
19+
- pecl channel-update pecl.php.net
20+
- printf "\n" | pecl install imagick
21+
- travis_retry composer update --no-interaction --prefer-dist
2122

2223
script:
23-
- vendor/bin/phpcs --standard=psr2 src/
24-
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
24+
- vendor/bin/phpcs --standard=psr2 src/
25+
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
2526

2627
after_success:
27-
- bash <(curl -s https://codecov.io/bash)
28+
- bash <(curl -s https://codecov.io/bash)

Diff for: PULL_REQUEST_TEMPLATE.md

-43
This file was deleted.

Diff for: README.md

+7-14
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,11 @@
99

1010
A PHP implementation of [JSON-G](https://github.com/Roadcrosser/JSON-G).
1111

12-
## Structure
13-
14-
```
15-
resources/
16-
src/
17-
tests/
18-
vendor/
19-
```
20-
2112
## Install
2213

2314
Via Composer
2415

25-
``` bash
16+
```bash
2617
$ composer require pxgamer/json-g
2718
```
2819

@@ -33,6 +24,7 @@ Use the `JsonG::toImageBlob()` or `JsonG::toJson()` to convert between a blob an
3324
#### Examples
3425

3526
**Converting an image via POST**
27+
3628
```php
3729
$base64 = base64_decode($_POST['in']);
3830

@@ -46,6 +38,7 @@ echo $json;
4638
```
4739

4840
**Converting a JSON-G string to image via POST**
41+
4942
```php
5043
$jsonArray = json_decode($_POST['in'], true);
5144

@@ -61,17 +54,17 @@ Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed re
6154

6255
## Testing
6356

64-
``` bash
57+
```bash
6558
$ composer test
6659
```
6760

6861
## Contributing
6962

70-
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.
63+
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) and [CODE_OF_CONDUCT](.github/CODE_OF_CONDUCT.md) for details.
7164

7265
## Security
7366

74-
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
67+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
7568

7669
## Credits
7770

@@ -96,4 +89,4 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
9689
[link-code-quality]: https://codecov.io/gh/pxgamer/php-json-g
9790
[link-downloads]: https://packagist.org/packages/pxgamer/json-g
9891
[link-author]: https://github.com/pxgamer
99-
[link-contributors]: ../../contributors
92+
[link-contributors]: ../../contributors

Diff for: phpcs.xml.dist

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="json-g">
3+
<description>The coding standard of json-g package</description>
4+
<arg value="p" />
5+
6+
<config name="ignore_warnings_on_exit" value="1" />
7+
<config name="ignore_errors_on_exit" value="1" />
8+
9+
<arg name="colors" />
10+
<arg value="s" />
11+
12+
<!-- Use the PSR2 Standard-->
13+
<rule ref="PSR2" />
14+
</ruleset>

Diff for: phpunit.xml.dist

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@
2020
</whitelist>
2121
</filter>
2222
<logging>
23-
<log type="tap" target="build/report.tap"/>
2423
<log type="junit" target="build/report.junit.xml"/>
25-
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
24+
<log type="coverage-html" target="build/coverage"/>
2625
<log type="coverage-text" target="build/coverage.txt"/>
2726
<log type="coverage-clover" target="build/logs/clover.xml"/>
2827
</logging>
29-
</phpunit>
28+
</phpunit>

0 commit comments

Comments
 (0)