From bca5dcf0916c3f4f88edd48d0b17e089bb0bd57b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Goran=20Alkovi=C4=87?= <77000136+goranalkovic-infinum@users.noreply.github.com> Date: Thu, 3 Oct 2024 09:25:59 +0200 Subject: [PATCH 1/2] fix tailwind helper combinations output --- src/Helpers/TailwindTrait.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Helpers/TailwindTrait.php b/src/Helpers/TailwindTrait.php index ba05fa75..103e9fd8 100644 --- a/src/Helpers/TailwindTrait.php +++ b/src/Helpers/TailwindTrait.php @@ -412,12 +412,12 @@ private static function processCombination($partName, $combo, $attributes, $mani $optionValue = $optionValue ? 'true' : 'false'; } - if (\is_array($allowedValue) && !\in_array($optionValue, $allowedValue, true)) { + $isArrayCondition = \is_array($allowedValue); + + if ($isArrayCondition && !\in_array($optionValue, $allowedValue, true)) { $matches = false; break; - } - - if ($optionValue !== $allowedValue) { + } elseif (!$isArrayCondition && $optionValue !== $allowedValue) { $matches = false; break; } From ce0e7ae1cedf528986f2de3b1dc9ad99de3f0edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Goran=20Alkovi=C4=87?= <77000136+goranalkovic-infinum@users.noreply.github.com> Date: Thu, 3 Oct 2024 09:26:07 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0812c2f..321ba753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/). +## [9.2.1] + +### Fixed +- Bug with `combinations` output in `tailwindClasses` helper. + ## [9.2.0] ### Added @@ -672,6 +677,7 @@ Init setup [Unreleased]: https://github.com/infinum/eightshift-libs/compare/main...HEAD +[9.2.1]: https://github.com/infinum/eightshift-libs/compare/9.2.0...9.2.1 [9.2.0]: https://github.com/infinum/eightshift-libs/compare/9.1.6...9.2.0 [9.1.6]: https://github.com/infinum/eightshift-libs/compare/9.1.5...9.1.6 [9.1.5]: https://github.com/infinum/eightshift-libs/compare/9.1.4...9.1.5