SendinBlue\Client\Model\GetLists::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset)

Created on 25 July 2023, over 1 year ago
Updated 25 March 2024, 9 months ago

Problem/Motivation

I get this error when open a page with webform

    Deprecated function: Return type of SendinBlue\Client\Model\GetLists::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 43 of /var/www/html/vendor/sendinblue/api-v3-sdk/lib/Model/GetLists.php).

    include('/var/www/html/vendor/sendinblue/api-v3-sdk/lib/Model/GetLists.php') (Line: 582)
    Composer\Autoload\{closure}('/var/www/html/vendor/composer/../sendinblue/api-v3-sdk/lib/Model/GetLists.php') (Line: 433)
    Composer\Autoload\ClassLoader->loadClass('SendinBlue\Client\Model\GetLists')
    method_exists('\SendinBlue\Client\Model\GetLists', 'getAllowableEnumValues') (Line: 291)
    SendinBlue\Client\ObjectSerializer::deserialize(Object, '\SendinBlue\Client\Model\GetLists', Array) (Line: 5654)
    SendinBlue\Client\Api\ContactsApi->getListsWithHttpInfo(50, 0, 'desc') (Line: 5593)
    SendinBlue\Client\Api\ContactsApi->getLists(50, 0, 'desc') (Line: 526)
    Drupal\sendinblue_api\Service\SendinblueApi->getMailingLists() (Line: 719)
    Drupal\sendinblue_api\Service\SendinblueApi->getEnabledMailingLists() (Line: 64)
    Drupal\sendinblue_api\Plugin\Derivative\SendinblueApiBlockDerivative->getDerivativeDefinitions(Array) (Line: 101)
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 291)
    Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 181)
    Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 22)
    Drupal\Core\Plugin\DefaultPluginManager->getDefinition('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 16)
    Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array) (Line: 76)
    Drupal\Component\Plugin\PluginManagerBase->createInstance('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array) (Line: 62)
    Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 57)
    Drupal\block\BlockPluginCollection->initializePlugin('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 80)
    Drupal\Component\Plugin\LazyPluginCollection->get('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 45)
    Drupal\block\BlockPluginCollection->get('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 83)
    Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->setConfiguration(Array) (Line: 99)
    Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->addInstanceId('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array) (Line: 55)
    Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->__construct(Object, 'block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array) (Line: 34)
    Drupal\block\BlockPluginCollection->__construct(Object, 'block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array, 'customer_frontend_companyinformation') (Line: 156)
    Drupal\block\Entity\Block->getPluginCollection() (Line: 145)
    Drupal\block\Entity\Block->getPlugin() (Line: 144)
    Drupal\block\BlockAccessControlHandler->checkAccess(Object, 'view', Object) (Line: 105)
    Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, 1) (Line: 314)
    Drupal\Core\Entity\EntityBase->access('view', NULL, 1) (Line: 63)
    Drupal\block\BlockRepository->getVisibleBlocksPerRegion(Array) (Line: 137)
    Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 274)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
    Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
    Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 117)
    Drupal\cdn\StackMiddleware\DuplicateContentPreventionMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

    Deprecated function: Return type of SendinBlue\Client\Model\GetLists::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 43 of /var/www/html/vendor/sendinblue/api-v3-sdk/lib/Model/GetLists.php).

    include('/var/www/html/vendor/sendinblue/api-v3-sdk/lib/Model/GetLists.php') (Line: 582)
    Composer\Autoload\{closure}('/var/www/html/vendor/composer/../sendinblue/api-v3-sdk/lib/Model/GetLists.php') (Line: 433)
    Composer\Autoload\ClassLoader->loadClass('SendinBlue\Client\Model\GetLists')
    method_exists('\SendinBlue\Client\Model\GetLists', 'getAllowableEnumValues') (Line: 291)
    SendinBlue\Client\ObjectSerializer::deserialize(Object, '\SendinBlue\Client\Model\GetLists', Array) (Line: 5654)
    SendinBlue\Client\Api\ContactsApi->getListsWithHttpInfo(50, 0, 'desc') (Line: 5593)
    SendinBlue\Client\Api\ContactsApi->getLists(50, 0, 'desc') (Line: 526)
    Drupal\sendinblue_api\Service\SendinblueApi->getMailingLists() (Line: 719)
    Drupal\sendinblue_api\Service\SendinblueApi->getEnabledMailingLists() (Line: 64)
    Drupal\sendinblue_api\Plugin\Derivative\SendinblueApiBlockDerivative->getDerivativeDefinitions(Array) (Line: 101)
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) (Line: 87)
    Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() (Line: 291)
    Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() (Line: 181)
    Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() (Line: 22)
    Drupal\Core\Plugin\DefaultPluginManager->getDefinition('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 16)
    Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array) (Line: 76)
    Drupal\Component\Plugin\PluginManagerBase->createInstance('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array) (Line: 62)
    Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->initializePlugin('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 57)
    Drupal\block\BlockPluginCollection->initializePlugin('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 80)
    Drupal\Component\Plugin\LazyPluginCollection->get('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 45)
    Drupal\block\BlockPluginCollection->get('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05') (Line: 83)
    Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->setConfiguration(Array) (Line: 99)
    Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->addInstanceId('block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array) (Line: 55)
    Drupal\Core\Plugin\DefaultSingleLazyPluginCollection->__construct(Object, 'block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array) (Line: 34)
    Drupal\block\BlockPluginCollection->__construct(Object, 'block_content:7cafe8b9-132b-45cd-be3f-d52066477d05', Array, 'customer_frontend_companyinformation') (Line: 156)
    Drupal\block\Entity\Block->getPluginCollection() (Line: 145)
    Drupal\block\Entity\Block->getPlugin() (Line: 144)
    Drupal\block\BlockAccessControlHandler->checkAccess(Object, 'view', Object) (Line: 105)
    Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, 1) (Line: 314)
    Drupal\Core\Entity\EntityBase->access('view', NULL, 1) (Line: 63)
    Drupal\block\BlockRepository->getVisibleBlocksPerRegion(Array) (Line: 137)
    Drupal\block\Plugin\DisplayVariant\BlockPageVariant->build() (Line: 274)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 191)
    Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 128)
    Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 82)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 117)
    Drupal\cdn\StackMiddleware\DuplicateContentPreventionMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
    Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

🐛 Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

🇮🇹Italy trickfun

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @trickfun
  • 🇺🇸United States bradhawkins

    This seems to be related to the SDK (v7.4) and its compatibility with PHP 8. On a Drupal 10 install, I was able to manually update the SDK via composer, and the error message did not appear:

    composer require sendinblue/api-v3-sdk:^8.4

    However, when working with Drupal 9.5 it's not possible to update the SDK to 8.0 or above because of a conflict with guzzlehttp/guzzle which is locked by Drupal core to v6.5.8.

    Because of this, it seems like it might be necessary to create a 2.0 branch of the module which is only compatible with D10+ and then update the composer.json to include the SDK 8.4+.

  • Status changed to Fixed 9 months ago
  • 🇮🇹Italy finex

    Fixed on release 1.2.0 . Now the module uses getbrevo/brevo-php which is fully compatible with latest PHP8/D10.

  • Status changed to Fixed 9 months ago
Production build 0.71.5 2024