From 51101cce4414b88d9f2316e460ae6b033d2f4a4d Mon Sep 17 00:00:00 2001 From: "andaris.at" Date: Sun, 20 Feb 2022 11:21:29 +0100 Subject: [PATCH 1/3] Fix deprecation on PHP Fixes #345 --- src/Presentation/Component.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Presentation/Component.php b/src/Presentation/Component.php index 685713be..be203b22 100644 --- a/src/Presentation/Component.php +++ b/src/Presentation/Component.php @@ -15,6 +15,7 @@ use Generator; use IteratorAggregate; use ReturnTypeWillChange; +use Traversable; class Component implements IteratorAggregate { @@ -57,6 +58,9 @@ public function __toString(): string ); } + /** + * @return Traversable + */ #[ReturnTypeWillChange] public function getIterator() { From 8682535c0d7ffea76ef11b0d1905a09243267afe Mon Sep 17 00:00:00 2001 From: Markus Poerschke Date: Tue, 26 Apr 2022 13:55:10 +0200 Subject: [PATCH 2/3] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77d54f15..12db5a8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Deprecation message occuring on an OOTB Symfony 5.4 on PHP 7.4 [#382](https://github.com/markuspoerschke/iCal/pull/382) + ## [2.5.0] - 2022-02-13 ### Added From 0f4be7b2ccb85fc02263aeb962c58e347ff60178 Mon Sep 17 00:00:00 2001 From: Markus Poerschke Date: Tue, 26 Apr 2022 13:58:52 +0200 Subject: [PATCH 3/3] Use native return type hint instead of PHP doc block --- src/Presentation/Component.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Presentation/Component.php b/src/Presentation/Component.php index be203b22..74f4ee7a 100644 --- a/src/Presentation/Component.php +++ b/src/Presentation/Component.php @@ -58,11 +58,8 @@ public function __toString(): string ); } - /** - * @return Traversable - */ #[ReturnTypeWillChange] - public function getIterator() + public function getIterator(): Traversable { return $this->getContentLines(); }