From bd318f728ed05b3ffafdb6742eaeef0359a7cf7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6rner?= Date: Wed, 7 Jul 2021 14:13:47 +0200 Subject: [PATCH 1/3] fixed bug in deprecated StringUtil::camelCaseToDashed() --- CHANGELOG.md | 3 +++ src/String/StringUtil.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c532ec7c..0156618c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. +## [2.196.2] - 2021-07-07 +- fixed bug in deprecated StringUtil::camelCaseToDashed() + ## [2.196.1] - 2021-07-05 - fixed install issue with symfony 5 diff --git a/src/String/StringUtil.php b/src/String/StringUtil.php index 90082994..02714249 100644 --- a/src/String/StringUtil.php +++ b/src/String/StringUtil.php @@ -87,7 +87,7 @@ public function endsWith($haystack, $needle) */ public function camelCaseToDashed($value) { - return $this->utils->string()->camelCaseToSnake($value); + return $this->utils->string()->camelCaseToDashed($value); } /** From 57387bedb3d7f67ec7f5dc60ade03963ad418630 Mon Sep 17 00:00:00 2001 From: Alexej Kossmann Date: Fri, 9 Jul 2021 11:34:40 +0200 Subject: [PATCH 2/3] see cl 2.196.3 --- CHANGELOG.md | 5 ++++- src/Dca/DcaUtil.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0156618c..c3280968 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. +## [2.196.3] - 2021-07-09 +- fixed bug in DcaUtil::aliasExist() + ## [2.196.2] - 2021-07-07 - fixed bug in deprecated StringUtil::camelCaseToDashed() @@ -2538,4 +2541,4 @@ instead - replaced `heimrichhannot/contao-request` with `heimrichhannot/contao-requets-bundle` -[#24]: https://github.com/heimrichhannot/contao-utils-bundle/pull/24 \ No newline at end of file +[#24]: https://github.com/heimrichhannot/contao-utils-bundle/pull/24 diff --git a/src/Dca/DcaUtil.php b/src/Dca/DcaUtil.php index db2d0e63..e4b0a94e 100644 --- a/src/Dca/DcaUtil.php +++ b/src/Dca/DcaUtil.php @@ -658,7 +658,7 @@ public function aliasExist(string $alias, int $id, string $table, $options = []) { $aliasField = $options['aliasField'] ?? 'alias'; - $stmt = $this->connection->prepare("SELECT id FROM {$table} WHERE ' . $aliasField . '=? AND id!=?"); + $stmt = $this->connection->prepare('SELECT id FROM '.$table.' WHERE '.$aliasField.'=? AND id!=?'); $stmt->execute([$alias, $id]); return $stmt->rowCount() > 0; From 0668e36247e430fc2f420a760f20f36aef3ec575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6rner?= Date: Mon, 12 Jul 2021 16:22:40 +0200 Subject: [PATCH 3/3] fixed typo --- src/Traits/UtilsTrait.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/Traits/UtilsTrait.php b/src/Traits/UtilsTrait.php index caa1e00a..d92fe5ca 100644 --- a/src/Traits/UtilsTrait.php +++ b/src/Traits/UtilsTrait.php @@ -1,27 +1,22 @@ - * @license http://www.gnu.org/licences/lgpl-3.0.html LGPL + * @license LGPL-3.0-or-later */ - namespace HeimrichHannot\UtilsBundle\Traits; - use HeimrichHannot\UtilsBundle\Util\Container\ContainerUtil; use HeimrichHannot\UtilsBundle\Util\Locale\LocaleUtil; use HeimrichHannot\UtilsBundle\Util\String\StringUtil; use Psr\Container\ContainerInterface; /** - * Trait UtilsTrait - * @package HeimrichHannot\UtilsBundle\Traits + * Trait UtilsTrait. * - * @internal This trait is only for usage in Utils class. It will be removed when symofony 3 support is dropped. + * @internal This trait is only for usage in Utils class. It will be removed when symfony 3 support is dropped. */ trait UtilsTrait { @@ -61,4 +56,4 @@ public static function getSubscribedServices() StringUtil::class, ]; } -} \ No newline at end of file +}