AlexaCRM / dynamics-webapi-toolkit

Dynamics 365 Web API Toolkit for PHP
MIT License
75 stars 58 forks source link

Error with AlexaCRM\Cache\NullCacheItem::get() #108

Closed gurunathanrs closed 1 month ago

gurunathanrs commented 5 months ago

Declaration of AlexaCRM\Cache\NullCacheItem::get() must be compatible with Psr\Cache\CacheItemInterface::get(): mixed in /vendor/alexacrm/dynamics-webapi-toolkit/src/Cache/NullCacheItem.php on line 69

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior.

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

gurunathanrs commented 5 months ago

Hi Team,

Do you have any update on this?

mrudov commented 5 months ago

Hello, gurunathanrs. Could you please provide a bit more information about the issue? Do you use the latest version of the toolkit (it's 3.3.1 right now)? What version of php do you use? And did you manually install any of the required packages specified in the composer.json, like 'psr/cache'?

gurunathanrs commented 5 months ago
  1. The issue happened after updated to the latest version. We don't know how to downgrade.
  2. PHP version is 8.1.23.
  3. We didn't do any manual installation, we use composer.
mrudov commented 5 months ago

As a temporal solution try to use a previous stable version 3.2, like so: composer require -W 'alexacrm/dynamics-webapi-toolkit:3.2'

sallison117 commented 5 months ago

Also just got this issue after updating. Was working fine before I had to do a composer re-install of everything which gave the newest version and I got the same issue. PHP 8.3.3.

gurunathanrs commented 5 months ago

Hi mrudov,

I tried to downgrade by using the composer command you said. But i face conflict with psr/log. ⁠existing version of psr/log is 3.0.0. But dynamics-webapi-toolkit 3.2.0 requires psr/log ^1.0 || ^2.0.

How to resolve?

mrudov commented 5 months ago

Please try to update to the latest version 3.3.2, it should resolve the issue. composer require -W 'alexacrm/dynamics-webapi-toolkit:^3.3.2' You can also try to remove the toolkit and reinstall it from scratch.

If the issue is still persist please try to use a development version, but note it's still a work in progress: composer require -W 'alexacrm/dynamics-webapi-toolkit:v4.x-dev'

gurunathanrs commented 5 months ago

I downgraded to 3.3.0 and it's working fine. But the original issue with the latest version still exists. We will check it later.