Skip to content

Commit 7ab56d4

Browse files
author
dmitriy
committed
bug fixing
1 parent 0c8b7c8 commit 7ab56d4

File tree

12 files changed

+338
-248
lines changed

12 files changed

+338
-248
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
Dockerfile
1616
docker-compose.yml
1717
docker-compose-test-ci.yml
18+
docker-compose-staging.yml
1819
docker-compose-prod.yml

composer.lock

Lines changed: 94 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/commands.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,5 @@ After above command you will be inside symfony container and for display list of
112112
./bin/console db:wait # Waits for database availability (1 mins max)
113113
./bin/console utils:create-date-dimension-entities # Create 'DateDimension' entities
114114
./bin/console messenger:setup-transports # Initialize transports for Messenger component
115+
./bin/console logs:cleanup # Command to cleanup logs(log_login, log_request) in the database
115116
```

src/DTO/ApiKey/ApiKey.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ class ApiKey extends RestDto
3939
* @Assert\NotBlank()
4040
* @Assert\NotNull()
4141
*/
42-
protected string $description;
42+
protected string $description = '';
4343

4444
/**
4545
* @var string
4646
*/
47-
protected string $token;
47+
protected string $token = '';
4848

4949
/**
5050
* @var UserGroupEntity[]|array<int, UserGroupEntity>

src/EventSubscriber/AuthenticationSuccessSubscriber.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use App\Repository\UserRepository;
1212
use App\Doctrine\DBAL\Types\EnumLogLoginType;
1313
use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationSuccessEvent;
14+
use Lexik\Bundle\JWTAuthenticationBundle\Events;
1415
use Throwable;
1516

1617
/**
@@ -56,7 +57,7 @@ public function __construct(LoginLoggerService $loginLoggerService, UserReposito
5657
public static function getSubscribedEvents(): array
5758
{
5859
return [
59-
AuthenticationSuccessEvent::class => 'onAuthenticationSuccess',
60+
Events::AUTHENTICATION_SUCCESS => 'onAuthenticationSuccess', //AuthenticationSuccessEvent::class
6061
];
6162
}
6263

src/EventSubscriber/LockedUserSubscriber.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use App\Entity\User;
1414
use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationFailureEvent;
1515
use Lexik\Bundle\JWTAuthenticationBundle\Event\AuthenticationSuccessEvent;
16+
use Lexik\Bundle\JWTAuthenticationBundle\Events;
1617
use Symfony\Component\Security\Core\Exception\LockedException;
1718
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
1819
use Throwable;
@@ -62,7 +63,7 @@ public function __construct(UserRepository $userRepository, LogLoginFailureResou
6263
public static function getSubscribedEvents(): array
6364
{
6465
return [
65-
AuthenticationSuccessEvent::class => [
66+
Events::AUTHENTICATION_SUCCESS => [ //AuthenticationSuccessEvent::class
6667
'onAuthenticationSuccess',
6768
128,
6869
],

src/Repository/LogLoginFailureRepository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
use App\Entity\LogLoginFailure as Entity;
1010
use App\Entity\User;
11+
use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType;
1112

1213
/**
1314
* Class LogLoginFailureRepository
@@ -43,7 +44,7 @@ public function clear(User $user): int
4344
->createQueryBuilder('logLoginFailure')
4445
->delete()
4546
->where('logLoginFailure.user = :user')
46-
->setParameter('user', $user);
47+
->setParameter('user', $user->getId(), UuidBinaryOrderedTimeType::NAME);
4748

4849
// Return deleted row count
4950
return (int)$queryBuilder->getQuery()->execute();

src/Rest/Interfaces/RepositoryInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
/**
1919
* Interface RepositoryInterface
2020
*
21-
* TODO: Deprecated, see App\Repository\Interfaces\BaseRepositoryInterface
22-
*
2321
* @package App\Rest\Interfaces
2422
*/
2523
interface RepositoryInterface

tools/01_phpunit/composer.lock

Lines changed: 21 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)