Merge pull request #4 from Icinga/fix/php-81-support

PHP 8.1 support
This commit is contained in:
Johannes Meyer 2022-06-14 14:13:39 +02:00 committed by GitHub
commit 2b056ffa5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 5 deletions

View File

@ -6,7 +6,7 @@ which can be integrated as library into Icinga Web 2.
## Requirements ## Requirements
* [Icinga Web 2](https://github.com/Icinga/icingaweb2) (>= 2.9) * [Icinga Web 2](https://github.com/Icinga/icingaweb2) (>= 2.9)
* PHP (>= 7.1.3) * PHP (>= 7.2)
## Installation ## Installation

View File

@ -8,4 +8,4 @@ e.g.
## Docker Example ## Docker Example
docker run -it -v $(pwd):/tmp/pwd -w /tmp/pwd -v $(realpath ~/.gitconfig):/tmp/user/.gitconfig -e "HOME=/tmp/user" -u $(id -u):$(id -g) dev-docker_web56 bin/make-release.sh 1.0.0 --no-tag docker run -it -v $(pwd):/tmp/pwd -w /tmp/pwd -v $(realpath ~/.gitconfig):/tmp/user/.gitconfig -e "HOME=/tmp/user" -u $(id -u):$(id -g) dev-docker_web72 bin/make-release.sh 1.0.0 --no-tag

View File

@ -7,14 +7,17 @@
"config": { "config": {
"sort-packages": true, "sort-packages": true,
"platform": { "platform": {
"php": "7.1.3" "php": "7.2"
},
"allow-plugins": {
"cweagans/composer-patches": true
} }
}, },
"support": { "support": {
"issues": "https://github.com/Icinga/icinga-php-thirdparty/issues" "issues": "https://github.com/Icinga/icinga-php-thirdparty/issues"
}, },
"require": { "require": {
"php": ">=7.1.3", "php": ">=7.2 <=8.1",
"ext-curl": "*", "ext-curl": "*",
"clue/block-react": "^1", "clue/block-react": "^1",
"clue/connection-manager-extra": "^1", "clue/connection-manager-extra": "^1",
@ -25,7 +28,8 @@
"clue/socket-raw": "^1", "clue/socket-raw": "^1",
"clue/socks-react": "^1", "clue/socks-react": "^1",
"clue/stdio-react": "^2", "clue/stdio-react": "^2",
"evenement/evenement": "^2", "cweagans/composer-patches": "~1.0",
"evenement/evenement": "^3",
"predis/predis": "^1", "predis/predis": "^1",
"psr/http-message": "^1", "psr/http-message": "^1",
"ramsey/uuid": "^3", "ramsey/uuid": "^3",
@ -53,5 +57,13 @@
"post-update-cmd": [ "post-update-cmd": [
"AssetLoader::update" "AssetLoader::update"
] ]
},
"extra": {
"composer-exit-on-patch-failure": true,
"patches": {
"ramsey/uuid": {
"Uuid: Add PHP 8.1 support": "patches/ramsey-uuid.patch"
}
}
} }
} }

10
patches/ramsey-uuid.patch Normal file
View File

@ -0,0 +1,10 @@
--- a/vendor/ramsey/uuid/src/Uuid.php
+++ b/vendor/ramsey/uuid/src/Uuid.php
@@ -212,6 +212,7 @@ class Uuid implements UuidInterface
* @return string
* @link http://php.net/manual/en/class.jsonserializable.php
*/
+ #[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toString();