Skip to content

Commit 15b063f

Browse files
authored
Merge pull request #22 from colinodell/misc-tweaks
Misc project maintenance
2 parents 5a3c083 + bd115ee commit 15b063f

File tree

13 files changed

+96
-71
lines changed

13 files changed

+96
-71
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/.gitignore export-ignore
99
/.scrutinizer.yml export-ignore
1010
/.styleci.yml export-ignore
11+
/.symfony.insight.yaml export-ignore
1112
/CODE_OF_CONDUCT.md export-ignore
1213
/CONTRIBUTING.md export-ignore
1314
/phpunit.xml.dist export-ignore

.github/workflows/tests.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ jobs:
2121

2222
- run: composer update --no-progress
2323

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

2626
phpunit:
2727
name: PHPUnit on ${{ matrix.php }} ${{ matrix.composer-flags }}
2828
runs-on: ubuntu-latest
2929
continue-on-error: ${{ !matrix.stable }}
3030
strategy:
3131
matrix:
32-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
32+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
3333
stable: [true]
3434
coverage: [true]
3535
composer-flags: ['']
@@ -38,10 +38,6 @@ jobs:
3838
stable: true
3939
coverage: false
4040
composer-flags: '--prefer-lowest'
41-
- php: '8.2'
42-
stable: false
43-
coverage: false
44-
composer-flags: '--ignore-platform-req=php'
4541

4642
steps:
4743
- uses: actions/checkout@v2
@@ -84,4 +80,4 @@ jobs:
8480

8581
- run: composer update --no-progress
8682

87-
- run: vendor/bin/phpstan analyse -l 3 src --no-progress
83+
- run: vendor/bin/phpstan analyse --no-progress

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
.idea
2+
.phpunit.result.cache
23
build
34
composer.lock
5+
phpcs.xml
6+
phpunit.xml
47
vendor

.symfony.insight.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SymfonyInsight seems to cache composer.lock against our wishes
2+
pre_composer_script: rm -rf composer.lock
3+
4+
rules:
5+
# We do want json5_decode() exposed as a global function
6+
php.use_global_variable_or_function:
7+
enabled: false

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
66

77
## [Unreleased][unreleased]
88

9+
## [2.3.0] - 2022-12-27
10+
11+
### Added
12+
- Added parameter and return types matching the existing docblocks
13+
14+
### Fixed
15+
- Fixed missing `@throws` docblocks needed for PhpStorm to recognize exceptions (#21)
16+
917
## [2.2.2] - 2022-02-21
1018

1119
### Fixed
@@ -68,7 +76,8 @@ This release contains massive performance improvements of 98% or more, especiall
6876
### Added
6977
- Initial commit
7078

71-
[unreleased]: https://github.com/colinodell/json5/compare/v2.2.2...HEAD
79+
[unreleased]: https://github.com/colinodell/json5/compare/v2.3.0...HEAD
80+
[2.3.0]: https://github.com/colinodell/json5/compare/v2.2.2...v2.3.0
7281
[2.2.2]: https://github.com/colinodell/json5/compare/v2.2.1...v2.2.2
7382
[2.2.1]: https://github.com/colinodell/json5/compare/v2.2.0...v2.2.1
7483
[2.2.0]: https://github.com/colinodell/json5/compare/v2.1.0...v2.2.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
146146

147147
[ico-version]: https://img.shields.io/packagist/v/colinodell/json5.svg?style=flat-square
148148
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
149-
[ico-build-status]: https://img.shields.io/github/workflow/status/colinodell/json5/Tests/main.svg?style=flat-square
149+
[ico-build-status]: https://img.shields.io/github/actions/workflow/status/colinodell/json5/tests.yml?branch=main&style=flat-square
150150
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/colinodell/json5.svg?style=flat-square
151151
[ico-code-quality]: https://img.shields.io/scrutinizer/g/colinodell/json5.svg?style=flat-square
152152
[ico-downloads]: https://img.shields.io/packagist/dt/colinodell/json5.svg?style=flat-square

composer.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
},
2626
"require-dev": {
2727
"mikehaertl/php-shellcommand": "^1.2.5",
28-
"phpstan/phpstan": "^0.12.58",
28+
"phpstan/phpstan": "^1.4",
2929
"scrutinizer/ocular": "^1.6",
30-
"squizlabs/php_codesniffer": "^2.3",
31-
"symfony/finder": "^4.4|^5.2",
32-
"symfony/phpunit-bridge": "^5.1"
30+
"squizlabs/php_codesniffer": "^2.3 || ^3.0",
31+
"symfony/finder": "^4.4|^5.4|^6.0",
32+
"symfony/phpunit-bridge": "^5.4|^6.0"
3333
},
3434
"conflict": {
3535
"scrutinizer/ocular": "1.7.*"
@@ -47,9 +47,15 @@
4747
},
4848
"bin": ["bin/json5"],
4949
"scripts": {
50-
"test": "simple-phpunit",
51-
"check-style": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src test",
52-
"fix-style": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src test"
50+
"test": [
51+
"@phpunit",
52+
"@check-style",
53+
"@phpstan"
54+
],
55+
"phpunit": "simple-phpunit",
56+
"phpstan": "phpstan analyse",
57+
"check-style": "phpcs",
58+
"fix-style": "phpcbf"
5359
},
5460
"extra": {
5561
"branch-alias": {

phpcs.xml.dist

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0"?>
2+
<ruleset>
3+
<arg name="basepath" value="."/>
4+
<arg name="extensions" value="php"/>
5+
<arg name="colors"/>
6+
7+
<!-- Ignore warnings, show progress of the run and show sniff names -->
8+
<arg value="nps"/>
9+
10+
<!-- Directories to be checked -->
11+
<file>src</file>
12+
<file>test</file>
13+
14+
<rule ref="PSR2"/>
15+
</ruleset>

phpstan.neon.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: 3
3+
paths:
4+
- src

0 commit comments

Comments
 (0)