Skip to content

Commit

Permalink
BH-681: Update doctrine-bundle - fix DI
Browse files Browse the repository at this point in the history
  • Loading branch information
jmleroux committed Sep 3, 2021
1 parent 7251da2 commit 04fcc05
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
3 changes: 2 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ includes:
- vendor/phpstan/phpstan-webmozart-assert/extension.neon
parameters:
reportUnmatchedIgnoredErrors: false
checkGenericClassInNonGenericObjectType: false
symfony:
container_xml_path: %rootDir%/../../../var/cache/dev/srcKernelDevDebugContainer.xml
ignoreErrors:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Akeneo\Connectivity\Connection\Application\Webhook;

use Doctrine\Persistence\ObjectRepository;
use Akeneo\UserManagement\Component\Repository\UserRepositoryInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\User\UserInterface;
Expand All @@ -15,11 +15,11 @@
*/
class WebhookUserAuthenticator
{
private ObjectRepository $userRepository;
private UserRepositoryInterface $userRepository;

private TokenStorageInterface $tokenStorage;

public function __construct(ObjectRepository $userRepository, TokenStorageInterface $tokenStorage)
public function __construct(UserRepositoryInterface $userRepository, TokenStorageInterface $tokenStorage)
{
$this->userRepository = $userRepository;
$this->tokenStorage = $tokenStorage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Akeneo\Pim\Enrichment\Component\Product\Repository\ReferenceDataRepositoryResolverInterface;
use Akeneo\Pim\Structure\Component\ReferenceData\ConfigurationRegistryInterface;
use Doctrine\Persistence\ManagerRegistry;
use Doctrine\Persistence\ObjectRepository;

/**
* Resolves the repository given a reference data type
Expand All @@ -29,7 +30,7 @@ public function __construct(
/**
* {@inheritdoc}
*/
public function resolve($referenceDataType)
public function resolve(string $referenceDataType): ObjectRepository
{
$referenceDataConf = $this->configurationRegistry->get($referenceDataType);
$referenceDataClass = $referenceDataConf->getClass();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,5 @@
*/
interface ReferenceDataRepositoryResolverInterface
{
/**
* @param string $referenceDataType
*
* @return ObjectRepository
*/
public function resolve($referenceDataType);
public function resolve(string $referenceDataType): ObjectRepository;
}

0 comments on commit 04fcc05

Please sign in to comment.