Skip to content

Commit

Permalink
Merge pull request #4942 from ecamp/renovate/api-platform-core-3.x
Browse files Browse the repository at this point in the history
fix(deps): update dependency api-platform/core to v3.3.0
  • Loading branch information
usu committed May 4, 2024
2 parents d8108f6 + 7be3004 commit 1ba3a15
Show file tree
Hide file tree
Showing 7 changed files with 8,620 additions and 12,723 deletions.
2 changes: 1 addition & 1 deletion api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"php": ">=8.1.0",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/core": "3.2.20",
"api-platform/core": "3.3.0",
"composer/package-versions-deprecated": "1.11.99",
"cweagans/composer-patches": "1.7.3",
"doctrine/doctrine-bundle": "2.12.0",
Expand Down
112 changes: 67 additions & 45 deletions api/composer.lock

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

1 change: 1 addition & 0 deletions api/config/packages/api_platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ api_platform:
title: eCamp v3
version: 1.0.0
show_webby: false
use_symfony_listeners: true
mapping:
paths:
- '%kernel.project_dir%/src/Entity'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace App\Serializer\Normalizer;

use ApiPlatform\Api\FilterInterface;
use ApiPlatform\Doctrine\Common\Filter\SearchFilterInterface;
use ApiPlatform\Doctrine\Common\PropertyHelperTrait;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Exception\ResourceClassNotFoundException;
Expand Down Expand Up @@ -239,7 +239,7 @@ private function exactSearchFilterExists(string $resourceClass, mixed $propertyN
$filterIds = OperationHelper::findOneByType($resourceMetadataCollection, GetCollection::class)?->getFilters() ?? [];

return 0 < count(array_filter($filterIds, function ($filterId) use ($resourceClass, $propertyName) {
/** @var FilterInterface $filter */
/** @var SearchFilterInterface $filter */
$filter = $this->filterLocator->get($filterId);
if (!$filter instanceof SearchFilter) {
return false;
Expand Down
8 changes: 4 additions & 4 deletions api/src/State/ResetPasswordCreateProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Component\PasswordHasher\PasswordHasherInterface;

/**
* @implements ProcessorInterface<ResetPassword,ResetPassword>
* @implements ProcessorInterface<ResetPassword,null>
*/
class ResetPasswordCreateProcessor implements ProcessorInterface {
public function __construct(
Expand All @@ -29,7 +29,7 @@ public function __construct(
/**
* @param ResetPassword $data
*/
public function process($data, Operation $operation, array $uriVariables = [], array $context = []): ResetPassword {
public function process($data, Operation $operation, array $uriVariables = [], array $context = []): null {
$resp = $this->reCaptcha->verify($data->recaptchaToken);
if (!$resp->isSuccess()) {
throw new HttpException(422, 'ReCaptcha failed');
Expand All @@ -38,7 +38,7 @@ public function process($data, Operation $operation, array $uriVariables = [], a
$user = $this->userRepository->loadUserByIdentifier($data->email);

if (null == $user) {
return $data;
return null;
}

$resetKey = IdGenerator::generateRandomHexString(64);
Expand All @@ -49,7 +49,7 @@ public function process($data, Operation $operation, array $uriVariables = [], a

$this->mailService->sendPasswordResetLink($user, $data);

return $data;
return null;
}

private function getResetKeyHasher(): PasswordHasherInterface {
Expand Down
Loading

0 comments on commit 1ba3a15

Please sign in to comment.