Skip to content

Commit

Permalink
UndefinedClass - Class, interface or enum named Apigee\Edge\Normalize…
Browse files Browse the repository at this point in the history
…r\ArrayObject does not exist
  • Loading branch information
kedarkhaire committed Oct 18, 2024
1 parent dff231c commit 1eb177d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,14 @@ public function supportsNormalization($data, $format = null): bool
{
return $data instanceof AppGroupMembership;
}

/**
* {@inheritdoc}
*/
public function getSupportedTypes(?string $format): array
{
return [
AppGroupMembership::class => true,
];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function normalize($object, $format = null, array $context = []): array|s

// convert to ArrayObject as symfony normalizer throws error for std object.
// set ARRAY_AS_PROPS flag as we need entries to be accessed as properties.
return new ArrayObject($normalized, ArrayObject::ARRAY_AS_PROPS);
return new \ArrayObject($normalized, \ArrayObject::ARRAY_AS_PROPS);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Normalizer/CredentialProductNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function normalize($object, $format = null, array $context = []): array|s

// Need to convert to ArrayObject as symfony normalizer throws error for std object.
// Need to set ARRAY_AS_PROPS flag as we need Entries to be accessed as properties.
return new ArrayObject($asObject, ArrayObject::ARRAY_AS_PROPS);
return new \ArrayObject($asObject, \ArrayObject::ARRAY_AS_PROPS);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/ObjectNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ public function setSerializer(SerializerInterface $serializer): void
/**
* {@inheritDoc}
*/
public function convertToArrayObject($normalized, $array_as_props = ArrayObject::ARRAY_AS_PROPS)
public function convertToArrayObject($normalized, $array_as_props = \ArrayObject::ARRAY_AS_PROPS)
{
// default set ARRAY_AS_PROPS flag as we need entries to be accessed as properties.
return new ArrayObject($normalized, $array_as_props);
return new \ArrayObject($normalized, $array_as_props);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Normalizer/PropertiesPropertyNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function normalize($object, $format = null, array $context = []): array|s

// convert to ArrayObject as symfony normalizer throws error for std object.
// set ARRAY_AS_PROPS flag as we need entries to be accessed as properties.
return new ArrayObject($return, ArrayObject::ARRAY_AS_PROPS);
return new \ArrayObject($return, \ArrayObject::ARRAY_AS_PROPS);
}

/**
Expand Down

0 comments on commit 1eb177d

Please sign in to comment.