Skip to content

Commit

Permalink
fix: review soyuka
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireHebert committed Aug 3, 2023
1 parent 91a5c88 commit 6e9221b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"symfony/maker-bundle": "^1.24",
"symfony/mercure-bundle": "*",
"symfony/messenger": "^6.1",
"symfony/monolog-bundle": "^3.8",
"symfony/phpunit-bridge": "^6.1",
"symfony/routing": "^6.1",
"symfony/security-bundle": "^6.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Doctrine/Orm/Extension/EagerLoadingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private function joinRelations(QueryBuilder $queryBuilder, QueryNameGeneratorInt
}

$fetchEager = $propertyMetadata->getFetchEager();
$uriTemplate = $propertyMetadata->geturiTemplate();
$uriTemplate = $propertyMetadata->getUriTemplate();

if (false === $fetchEager || null !== $uriTemplate) {
continue;
Expand Down
8 changes: 6 additions & 2 deletions src/Serializer/AbstractItemNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,12 @@ protected function getAttributeValue(object $object, string $attribute, string $
$childContext = $this->createChildContext($context, $attribute, $format);
unset($childContext['iri'], $childContext['uri_variables'], $childContext['resource_class'], $childContext['operation']);

if (null !== $itemUriTemplate = $propertyMetadata->getUriTemplate()) {
$operation = $this->resourceMetadataCollectionFactory->create($resourceClass)->getOperation($itemUriTemplate, true, true);
if ($itemUriTemplate = $propertyMetadata->getUriTemplate()) {
$operation = $this->resourceMetadataCollectionFactory->create($resourceClass)->getOperation(
operationName: $itemUriTemplate,
forceCollection: true,
httpOperation: true
);
if ($operation instanceof GetCollection) {
return $this->iriConverter->getIriFromResource($object, UrlGeneratorInterface::ABS_PATH, $operation, $childContext);
}
Expand Down
12 changes: 0 additions & 12 deletions tests/Fixtures/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public function registerBundles(): array
new FriendsOfBehatSymfonyExtensionBundle(),
new FrameworkBundle(),
new MakerBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
];

if (class_exists(DoctrineMongoDBBundle::class)) {
Expand Down Expand Up @@ -245,17 +244,6 @@ class_exists(NativePasswordHasher::class) ? 'password_hashers' : 'encoders' => [
'paths' => ['%kernel.project_dir%/../TestBundle/Resources/config/api_resources_orm'],
],
]);

$c->prependExtensionConfig('monolog', [
'handlers' => [
'main' => [
'type' => 'stream',
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
'level' => 'debug',
'channels' => ['!event'],
],
],
]);
}

protected function build(ContainerBuilder $container): void
Expand Down

0 comments on commit 6e9221b

Please sign in to comment.