Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.styleci.yml export-ignore
/.symfony.insight.yaml export-ignore
/CODE_OF_CONDUCT.md export-ignore
/CONTRIBUTING.md export-ignore
/phpunit.xml.dist export-ignore
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:

- run: composer update --no-progress

- run: vendor/bin/phpcs --standard=psr2 -q --report=checkstyle src | cs2pr
- run: vendor/bin/phpcs -q --report=checkstyle src | cs2pr

phpunit:
name: PHPUnit on ${{ matrix.php }} ${{ matrix.composer-flags }}
runs-on: ubuntu-latest
continue-on-error: ${{ !matrix.stable }}
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
stable: [true]
coverage: [true]
composer-flags: ['']
Expand All @@ -38,10 +38,6 @@ jobs:
stable: true
coverage: false
composer-flags: '--prefer-lowest'
- php: '8.2'
stable: false
coverage: false
composer-flags: '--ignore-platform-req=php'

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -84,4 +80,4 @@ jobs:

- run: composer update --no-progress

- run: vendor/bin/phpstan analyse -l 3 src --no-progress
- run: vendor/bin/phpstan analyse --no-progress
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.idea
.phpunit.result.cache
build
composer.lock
phpcs.xml
phpunit.xml
vendor
7 changes: 7 additions & 0 deletions .symfony.insight.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SymfonyInsight seems to cache composer.lock against our wishes
pre_composer_script: rm -rf composer.lock

rules:
# We do want json5_decode() exposed as a global function
php.use_global_variable_or_function:
enabled: false
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip

## [Unreleased][unreleased]

## [2.3.0] - 2022-12-27

### Added
- Added parameter and return types matching the existing docblocks

### Fixed
- Fixed missing `@throws` docblocks needed for PhpStorm to recognize exceptions (#21)

## [2.2.2] - 2022-02-21

### Fixed
Expand Down Expand Up @@ -68,7 +76,8 @@ This release contains massive performance improvements of 98% or more, especiall
### Added
- Initial commit

[unreleased]: https://github.com/colinodell/json5/compare/v2.2.2...HEAD
[unreleased]: https://github.com/colinodell/json5/compare/v2.3.0...HEAD
[2.3.0]: https://github.com/colinodell/json5/compare/v2.2.2...v2.3.0
[2.2.2]: https://github.com/colinodell/json5/compare/v2.2.1...v2.2.2
[2.2.1]: https://github.com/colinodell/json5/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/colinodell/json5/compare/v2.1.0...v2.2.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio

[ico-version]: https://img.shields.io/packagist/v/colinodell/json5.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-build-status]: https://img.shields.io/github/workflow/status/colinodell/json5/Tests/main.svg?style=flat-square
[ico-build-status]: https://img.shields.io/github/actions/workflow/status/colinodell/json5/tests.yml?branch=main&style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/colinodell/json5.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/colinodell/json5.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/colinodell/json5.svg?style=flat-square
Expand Down
20 changes: 13 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
},
"require-dev": {
"mikehaertl/php-shellcommand": "^1.2.5",
"phpstan/phpstan": "^0.12.58",
"phpstan/phpstan": "^1.4",
"scrutinizer/ocular": "^1.6",
"squizlabs/php_codesniffer": "^2.3",
"symfony/finder": "^4.4|^5.2",
"symfony/phpunit-bridge": "^5.1"
"squizlabs/php_codesniffer": "^2.3 || ^3.0",
"symfony/finder": "^4.4|^5.4|^6.0",
"symfony/phpunit-bridge": "^5.4|^6.0"
},
"conflict": {
"scrutinizer/ocular": "1.7.*"
Expand All @@ -47,9 +47,15 @@
},
"bin": ["bin/json5"],
"scripts": {
"test": "simple-phpunit",
"check-style": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src test",
"fix-style": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src test"
"test": [
"@phpunit",
"@check-style",
"@phpstan"
],
"phpunit": "simple-phpunit",
"phpstan": "phpstan analyse",
"check-style": "phpcs",
"fix-style": "phpcbf"
},
"extra": {
"branch-alias": {
Expand Down
15 changes: 15 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<ruleset>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="colors"/>

<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>

<!-- Directories to be checked -->
<file>src</file>
<file>test</file>

<rule ref="PSR2"/>
</ruleset>
4 changes: 4 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
level: 3
paths:
- src
Loading