Skip to content

Commit

Permalink
Fix composer dependencies and not used code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexz707 committed Feb 8, 2024
1 parent 2778ec3 commit 83ea88b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"php": "~8.1.0 || ~8.2.0",
"pimcore/enterprise-subscription-tools": "^1.3",
"pimcore/static-resolver-bundle": "^1.0",
"pimcore/generic-data-index-bundle": "^1.0",
"pimcore/pimcore": "^11.0",
"api-platform/core": "^3.2"
},
Expand Down
9 changes: 2 additions & 7 deletions src/Serializer/AssetNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace Pimcore\Bundle\StudioApiBundle\Serializer;

use Pimcore\Bundle\StudioApiBundle\Dto\Asset;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
Expand All @@ -25,10 +24,6 @@ final class AssetNormalizer implements NormalizerInterface, NormalizerAwareInter

private const ALREADY_CALLED = 'ASSET_NORMALIZER_ALREADY_CALLED';

public function __construct(private readonly RequestStack $requestStack)
{
}

public function normalize($object, $format = null, array $context = []): array
{
$context[self::ALREADY_CALLED] = true;
Expand All @@ -49,11 +44,11 @@ public function normalize($object, $format = null, array $context = []): array
public function supportsNormalization($data, $format = null, array $context = []): bool
{
return false;
if (isset($context[self::ALREADY_CALLED])) {
/*if (isset($context[self::ALREADY_CALLED])) {
return false;
}
return $data instanceof Asset;
return $data instanceof Asset;*/
}

public function getSupportedTypes(?string $format): array
Expand Down

0 comments on commit 83ea88b

Please sign in to comment.