Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency api-platform/core to v3.3.0 #4942

Merged
merged 7 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading