I am trying to use the normalizer to convert the protected channel object to an array but I keep getting the following error:
Fatal error: Uncaught TypeError: Argument 1 passed to JoliCode\Slack\Api\Normalizer\ConversationsListGetResponse200Normalizer::setNormalizer() must implement interface Symfony\Component\Serializer\Normalizer\NormalizerInterface, null given, called in /vendor/jolicode/slack-php-api/generated/Normalizer/JaneObjectNormalizer.php on line 78 and defined in /vendor/symfony/serializer/Normalizer/NormalizerAwareTrait.php:24 Stack trace: #0 /vendor/jolicode/slack-php-api/generated/Normalizer/JaneObjectNormalizer.php(78): JoliCode\Slack\Api\Normalizer\ConversationsListGetResponse200Normalizer->setNormalizer() #1 /vendor/jolicode/slack-php-api/generated/Normalizer/JaneObjectNormalizer.php(72): JoliCode\Slack\Api\Normalizer\JaneObjectNormalizer->initN in /vendor/symfony/serializer/Normalizer/NormalizerAwareTrait.php on line 24
The code I am using is below:
use JoliCode\Slack\Api\Normalizer\JaneObjectNormalizer;
use JoliCode\Slack\Api\Model\ObjsUser;
use JoliCode\Slack\ClientFactory;
use JoliCode\Slack\Exception\SlackErrorResponse;
require_once __DIR__.'/vendor/autoload.php';
$client = ClientFactory::create("xoxb-123456789");
$normalizer = new JaneObjectNormalizer;
$channels = $client->conversationsList();
$channels = $normalizer->normalize($channels);
Hi,
I am trying to use the normalizer to convert the protected channel object to an array but I keep getting the following error: Fatal error: Uncaught TypeError: Argument 1 passed to JoliCode\Slack\Api\Normalizer\ConversationsListGetResponse200Normalizer::setNormalizer() must implement interface Symfony\Component\Serializer\Normalizer\NormalizerInterface, null given, called in /vendor/jolicode/slack-php-api/generated/Normalizer/JaneObjectNormalizer.php on line 78 and defined in /vendor/symfony/serializer/Normalizer/NormalizerAwareTrait.php:24 Stack trace: #0 /vendor/jolicode/slack-php-api/generated/Normalizer/JaneObjectNormalizer.php(78): JoliCode\Slack\Api\Normalizer\ConversationsListGetResponse200Normalizer->setNormalizer() #1 /vendor/jolicode/slack-php-api/generated/Normalizer/JaneObjectNormalizer.php(72): JoliCode\Slack\Api\Normalizer\JaneObjectNormalizer->initN in /vendor/symfony/serializer/Normalizer/NormalizerAwareTrait.php on line 24
The code I am using is below: