hisorange / browser-detect

Browser Detection for Laravel by hisorange!
https://browser-detect.com
MIT License
1.08k stars 143 forks source link

Class "Spyc" not found error #217

Closed tanero closed 6 months ago

tanero commented 6 months ago

When I wanto call Browser facade methods, I get the below error.

image

pixelplant commented 6 months ago

Can confirm this on version 5.0.3 running on php 8.2. We get the same error, it worked just fine before upgrading to PHP 8.2 (from PHP 8.1)

The error happens in our views, wherever the code Browser::isDesktop() is called, for example

pixelplant commented 6 months ago

might be linked to this recent issue: https://github.com/mustangostang/spyc/issues/90

pixelplant commented 6 months ago

seems to have been linked to the retag issue on the above package. after a retry it works now

Artem-Schander commented 6 months ago

@pixelplant what do you mean with "after a retry" I have the same issue but a retry does not help. also composer du does not help either

ramyelsabahy commented 6 months ago

The same here , laravel 9 & php 8.1 Did you find a solution ?

roborourke commented 6 months ago

This was a packagist issue that has now been resolved.

pixelplant commented 6 months ago

@pixelplant what do you mean with "after a retry" I have the same issue but a retry does not help. also composer du does not help either

Sorry I wasn't clear about it, by retry I meant removing the composer.lock and the vendor folder and just doing another composer install. It seems they retagged the latest version of mustangostang/spyc package and that fixed the issue

tanero commented 6 months ago

This problem seems to be fixed for now. After the composer update process, a new package was installed from the packagist repo and the library started to work without any problem.