Skip to content

Commit

Permalink
Merge pull request #48 from peckadesign/php81
Browse files Browse the repository at this point in the history
PHP 8.1 support
  • Loading branch information
Jakub-Fajkus authored Mar 29, 2022
2 parents e05b23e + bed4d4c commit a8faa87
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/php-package-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 7.4, 8.0 ]
php: [ 7.4, 8.0, 8.1 ]
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
Expand All @@ -18,10 +18,10 @@ jobs:

- run: make composer

- if: matrix.php == '8.0'
- if: matrix.php == '8.1'
run: make cs

- if: matrix.php == '8.0'
- if: matrix.php == '8.1'
run: make phpstan

- run: make run-tests
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"nette/tester": "~2.3.2",
"mockery/mockery": "^1.0",
"pd/coding-standard": "1.27.*",
"phpstan/phpstan": "0.12.77"
"phpstan/phpstan": "^1.4.0"
},
"autoload": {
"psr-4": {
Expand All @@ -42,5 +42,10 @@
"psr-4": {
"PdTests\\": "tests"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "pd-forms",
"title": "pdForms",
"description": "Customization of netteForms for use in PeckaDesign.",
"version": "3.4.6",
"version": "3.5.0",
"author": "PeckaDesign, s.r.o <support@peckadesign.cz>",
"contributors": [
"Radek Šerý <radek.sery@peckadesign.cz>",
Expand Down
1 change: 1 addition & 0 deletions src/RuleOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ public function getNormalizedDependentInputs(): array
/**
* @return array<mixed>
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$serialized = [
Expand Down
1 change: 1 addition & 0 deletions src/Validation/ValidationResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function setMessage(?string $message): void
/**
* @return array<mixed>
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$valid = [
Expand Down
4 changes: 2 additions & 2 deletions src/assets/pdForms.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @name pdForms
* @author Radek Šerý <radek.sery@peckadesign.cz>
* @version 3.4.4
* @version 3.5.0
*
* Features:
* - live validation
Expand Down Expand Up @@ -45,7 +45,7 @@

var pdForms = window.pdForms || {};

pdForms.version = '3.4.4';
pdForms.version = '3.5.0';


/**
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Forms/RuleOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function testSerialization(): void
->addContext('gimme 2', ['fuel', 'fire'])
->addContext('class', new class () implements \JsonSerializable {

#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return ['serialized' => 'class'];
Expand Down

0 comments on commit a8faa87

Please sign in to comment.