prepare release 1.25.0 (#3531)

* remove unused variable
* allow to set field name in form helper
* fix edge case permission check in menu
This commit is contained in:
Kevin Papst
2022-09-14 15:16:06 +02:00
committed by GitHub
parent 47d17af593
commit d705287510
6 changed files with 48 additions and 49 deletions

View File

@@ -17,11 +17,11 @@ class Constants
/**
* The current release version
*/
public const VERSION = '1.24.0';
public const VERSION = '1.25.0';
/**
* The current release: major * 10000 + minor * 100 + patch
*/
public const VERSION_ID = 12400;
public const VERSION_ID = 12500;
/**
* The current release status, either "stable" or "dev"
*/

View File

@@ -284,7 +284,7 @@ class Team
public function hasUser(User $user): bool
{
return (null !== ($member = $this->findMemberByUser($user)));
return (null !== $this->findMemberByUser($user));
}
public function hasUsers(): bool
@@ -305,7 +305,7 @@ class Team
public function addUser(User $user): void
{
if (null !== ($member = $this->findMemberByUser($user))) {
if (null !== $this->findMemberByUser($user)) {
return;
}

View File

@@ -63,9 +63,9 @@ abstract class AbstractToolbarForm extends AbstractType
]);
}
protected function addUsersChoice(FormBuilderInterface $builder)
protected function addUsersChoice(FormBuilderInterface $builder, string $field = 'users', array $options = [])
{
$builder->add('users', UserType::class, [
$builder->add($field, UserType::class, array_merge([
'documentation' => [
'type' => 'array',
'items' => ['type' => 'integer', 'description' => 'User ID'],
@@ -74,7 +74,7 @@ abstract class AbstractToolbarForm extends AbstractType
'label' => 'label.user',
'multiple' => true,
'required' => false,
]);
], $options));
}
protected function addTeamChoice(FormBuilderInterface $builder)

View File

@@ -102,11 +102,10 @@ final class TimesheetStatisticService
* @param DateTime $begin
* @param DateTime $end
* @param User[] $users
* @return array<int, DailyStatistic[]>
* @return array
*/
public function getDailyStatisticsGrouped(DateTime $begin, DateTime $end, array $users): array
{
/** @var DailyStatistic[] $stats */
$stats = [];
$usersById = [];
@@ -179,11 +178,10 @@ final class TimesheetStatisticService
* @param DateTime $begin
* @param DateTime $end
* @param User[] $users
* @return array<int, MonthlyStatistic[]>
* @return array
*/
public function getMonthlyStatisticsGrouped(DateTime $begin, DateTime $end, array $users): array
{
/** @var MonthlyStatistic[] $stats */
$stats = [];
$usersById = [];