Release 2.26 (#5189)

* bring back deprecated methods
* bump packages
* fix SAML redirect
* config flag for break times
* use class constant instead of string in attributes
* throw if all tags were not found - fixes #4792
This commit is contained in:
Kevin Papst
2024-12-05 10:42:07 +01:00
committed by GitHub
parent 70741eebfd
commit 82a3b99a31
39 changed files with 437 additions and 397 deletions

View File

@@ -37,6 +37,7 @@ use Symfony\Component\ExpressionLanguage\Expression;
use Symfony\Component\Form\FormError;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Validator\Constraints;
@@ -181,8 +182,11 @@ final class TimesheetController extends BaseApiController
/** @var array<string> $tags */
$tags = $paramFetcher->get('tags');
if (\is_array($tags) && \count($tags) > 0) {
$tags = $this->tagRepository->findTagsByName($tags, true);
foreach ($tags as $tag) {
$tagsByName = $this->tagRepository->findTagsByName($tags, true);
if (\count($tagsByName) === 0) {
throw new BadRequestHttpException('Given tags were not found');
}
foreach ($tagsByName as $tag) {
$query->addTag($tag);
}
}