Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
magicsunday committed Dec 16, 2021
1 parent a4fa3b1 commit 32d150d
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 11 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
26 changes: 26 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PHP_CodeSniffer

on: [push, pull_request]

jobs:
run:
runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
operating-system: [ubuntu-20.04]
php-version: ['7.4', '8.0', '8.1']

name: Testing PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }}

steps:
- uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
extensions: json,intl,mbstring

- uses: actions/checkout@v2

- run: composer validate
- run: composer install --no-progress
- run: vendor/bin/phpcs src/ --standard=PSR12
26 changes: 26 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PHPStan

on: [push, pull_request]

jobs:
run:
runs-on: ${{ matrix.operating-system }}

strategy:
matrix:
operating-system: [ubuntu-20.04]
php-version: ['7.4', '8.0', '8.1']

name: Testing PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }}

steps:
- uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
extensions: json,intl,mbstring

- uses: actions/checkout@v2

- run: composer validate
- run: composer install --no-progress
- run: vendor/bin/phpstan analyse -c phpstan.neon
6 changes: 2 additions & 4 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests
name: PHPUnit

on: [push, pull_request]

Expand All @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-20.04]
php-version: ['7.4', '8.0']
php-version: ['7.4', '8.0', '8.1']

name: Testing PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }}

Expand All @@ -23,7 +23,5 @@ jobs:
- uses: actions/checkout@v2

- run: composer validate

- run: composer install --no-progress

- run: vendor/bin/phpunit --coverage-clover=tests/coverage.xml
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[![License: GPL v3](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

[![PHPStan](https://img.shields.io/badge/PHPStan-level%208-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)
[![PHP_CodeSniffer](https://img.shields.io/badge/PHP_CodeSniffer-PSR12-brightgreen.svg?style=flat)](https://github.com/squizlabs/PHP_CodeSniffer)
[![Unit tests](https://github.com/magicsunday/jsonmapper/actions/workflows/phpunit.yml/badge.svg)](https://github.com/magicsunday/jsonmapper/actions/workflows/phpunit.yml)
[![PHPStan](https://github.com/magicsunday/jsonmapper/actions/workflows/phpstan.yml/badge.svg)](https://github.com/magicsunday/jsonmapper/actions/workflows/phpstan.yml)
[![PHP_CodeSniffer](https://github.com/magicsunday/jsonmapper/actions/workflows/phpcs.yml/badge.svg)](https://github.com/magicsunday/jsonmapper/actions/workflows/phpcs.yml)
[![PHPUnit](https://github.com/magicsunday/jsonmapper/actions/workflows/phpunit.yml/badge.svg)](https://github.com/magicsunday/jsonmapper/actions/workflows/phpunit.yml)

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/magicsunday/jsonmapper/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/magicsunday/jsonmapper/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/magicsunday/jsonmapper/badges/build.png?b=master)](https://scrutinizer-ci.com/g/magicsunday/jsonmapper/build-status/master)
[![Code Coverage](https://scrutinizer-ci.com/g/magicsunday/jsonmapper/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/magicsunday/jsonmapper/?branch=master)
Expand Down Expand Up @@ -101,7 +102,7 @@ $propertyAccessor = PropertyAccess::createPropertyAccessor();
Using the third argument you can pass a property name converter instance to the mapper. With this you can convert
the JSON property names to you desired format your PHP classes are using.
```php
$nameConverter = new \MagicSunday\CamelCasePropertyNameConverter();
$nameConverter = new \MagicSunday\JsonMapper\Converter\CamelCasePropertyNameConverter();
```

The last constructor parameter allows you to pass a class map to JsonMapper in order to change the default mapping
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^0.12",
"squizlabs/php_codesniffer": "^3.5"
"phpstan/phpstan": "^1.2",
"squizlabs/php_codesniffer": "^3.6"
},
"suggest": {
"phpdocumentor/reflection-docblock": "In order to use the PhpDocExtractor this library is required too."
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
# you can currently choose from 9 levels (0 is the loosest and 8 is the strictest).
# you can currently choose from 10 levels (0 is the loosest and 9 is the strictest).
level: 8

paths:
Expand Down

0 comments on commit 32d150d

Please sign in to comment.