From 2886a4ca17fbdc71c8a3f42dd5713642ca082e4d Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 25 May 2022 09:25:14 +0200 Subject: [PATCH 1/4] Require PHP 7.2 to 8.1 --- README.md | 2 +- RELEASE.md | 2 +- composer.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 699256487..ffc7ab703 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ which can be integrated as library into Icinga Web 2. ## Requirements * [Icinga Web 2](https://github.com/Icinga/icingaweb2) (>= 2.9) -* PHP (>= 7.1.3) +* PHP (>= 7.2) ## Installation diff --git a/RELEASE.md b/RELEASE.md index c28863e28..db94aeb3b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -8,4 +8,4 @@ e.g. ## 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 diff --git a/composer.json b/composer.json index ce10ba385..ba412c903 100644 --- a/composer.json +++ b/composer.json @@ -7,14 +7,14 @@ "config": { "sort-packages": true, "platform": { - "php": "7.1.3" + "php": "7.2" } }, "support": { "issues": "https://github.com/Icinga/icinga-php-thirdparty/issues" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2 <=8.1", "ext-curl": "*", "clue/block-react": "^1", "clue/connection-manager-extra": "^1", From 4f885841100d32d45e06963daa781f67b0913bd3 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Wed, 1 Jun 2022 16:53:11 +0200 Subject: [PATCH 2/4] Require `cweagans/composer-patches` to automatically apply module patches --- composer.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/composer.json b/composer.json index ba412c903..ba9e0977e 100644 --- a/composer.json +++ b/composer.json @@ -8,6 +8,9 @@ "sort-packages": true, "platform": { "php": "7.2" + }, + "allow-plugins": { + "cweagans/composer-patches": true } }, "support": { @@ -25,6 +28,7 @@ "clue/socket-raw": "^1", "clue/socks-react": "^1", "clue/stdio-react": "^2", + "cweagans/composer-patches": "~1.0", "evenement/evenement": "^2", "predis/predis": "^1", "psr/http-message": "^1", @@ -53,5 +57,13 @@ "post-update-cmd": [ "AssetLoader::update" ] + }, + "extra": { + "composer-exit-on-patch-failure": true, + "patches": { + "ramsey/uuid": { + "Uuid: Add PHP 8.1 support": "patches/ramsey-uuid.patch" + } + } } } From b4c80ae7654f2888b35c83a8786e3b2ab94fdb60 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Wed, 1 Jun 2022 16:54:45 +0200 Subject: [PATCH 3/4] Add PHP 8.1 support for `ramsey/uuid` in version 3.x --- patches/ramsey-uuid.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 patches/ramsey-uuid.patch diff --git a/patches/ramsey-uuid.patch b/patches/ramsey-uuid.patch new file mode 100644 index 000000000..2715351ea --- /dev/null +++ b/patches/ramsey-uuid.patch @@ -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(); From ba3e373a37022c080680b9f2f467219cb1415bb3 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 14 Jun 2022 13:42:32 +0200 Subject: [PATCH 4/4] Require evenement/evenement in version 3.x --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ba9e0977e..a0ec7a052 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "clue/socks-react": "^1", "clue/stdio-react": "^2", "cweagans/composer-patches": "~1.0", - "evenement/evenement": "^2", + "evenement/evenement": "^3", "predis/predis": "^1", "psr/http-message": "^1", "ramsey/uuid": "^3",