Skip to content

Commit

Permalink
Merge pull request #17 from ingenerator/support-php81
Browse files Browse the repository at this point in the history
Support PHP 8.1
  • Loading branch information
craig410 authored Oct 17, 2022
2 parents 4fa7138 + 5f20a71 commit 860a8d7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ jobs:
fail-fast: false
matrix:
php_version:
- '7.4'
- '8.0'
- '8.1'
dependencies:
- 'default'
include:
- php_version: '7.4'
dependencies: 'lowest'
- php_version: '8.0'
dependencies: 'lowest'
- php_version: '8.1'
dependencies: 'lowest'

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### Unreleased

### v1.4.0 (2022-10-17)

* Support PHP 8.1

### v1.3.0 (2021-04-21)

* Support php8.0
Expand Down
23 changes: 13 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ingenerator/warden-ui-kohana",
"type": "library",
"description": "Front-end and kohana application integration for Warden",
"homepage": "http://github.com/ingenerator/warden-ui-kohana",
"homepage": "https://github.com/ingenerator/warden-ui-kohana",
"license": "BSD-3-Clause",
"authors": [
{
Expand All @@ -17,12 +17,12 @@
}
],
"require": {
"php": "^7.4 || ~8.0.0",
"php": "~8.0.0 || ~8.1.0",
"ext-json": "*",
"symfony/validator": "^3.0",
"ingenerator/warden-core": "^1.1",
"ingenerator/warden-validator-symfony": "^1.1",
"ingenerator/warden-persistence-doctrine": "^1.1",
"symfony/validator": "^5.4",
"ingenerator/warden-core": "^1.2",
"ingenerator/warden-validator-symfony": "^1.2",
"ingenerator/warden-persistence-doctrine": "^1.2",
"ingenerator/kohana-view": "^4.4",
"ingenerator/kohana-extras": "^2.0",
"ingenerator/kohana-core": "^4.7",
Expand All @@ -32,8 +32,8 @@
},
"require-dev": {
"kohana/koharness": "dev-master",
"johnkary/phpunit-speedtrap": "^3.0",
"phpunit/phpunit": "^9.0",
"johnkary/phpunit-speedtrap": "^3.3",
"phpunit/phpunit": "^9.5.5",
"egulias/email-validator": "^2.1.16"
},
"repositories": [
Expand All @@ -43,15 +43,18 @@
}
],
"suggest": {
"zeelot/kohana-dependencies": "Dependency container for kohana"
"ingenerator/kohana-dependencies": "Dependency container for kohana"
},
"autoload": {
"psr-4": {
"Ingenerator\\Warden\\UI\\Kohana\\": "src/"
}
},
"config": {
"preferred-install": "dist"
"preferred-install": "dist",
"allow-plugins": {
"composer/installers": true
}
},
"extra": {
"installer-paths": {
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
convertDeprecationsToExceptions="true"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<testsuites>
<testsuite name="Unit">
Expand Down
8 changes: 4 additions & 4 deletions src/Form/Fieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function __construct(array $values, array $errors)
$this->success_validation_class = empty($this->errors) ? NULL : 'has-success';
}

public function offsetExists($offset)
public function offsetExists($offset): bool
{
return TRUE;
}

public function offsetGet($offset)
public function offsetGet($offset): array
{
$value = \Arr::get($this->values, $offset);
$error = \Arr::get($this->errors, $offset);
Expand All @@ -45,12 +45,12 @@ public function offsetGet($offset)
];
}

public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
throw new \BadMethodCallException(\get_class($this).' is immutable, cannot call '.__METHOD__);
}

public function offsetUnset($offset)
public function offsetUnset($offset): void
{
throw new \BadMethodCallException(\get_class($this).' is immutable, cannot call '.__METHOD__);
}
Expand Down

0 comments on commit 860a8d7

Please sign in to comment.