kylekatarnls / business-time

Carbon mixin to handle business days and opening hours
MIT License
296 stars 14 forks source link

Problem with Laravel & Holidays #37

Closed heikokrebs closed 3 years ago

heikokrebs commented 3 years ago

Hey,

first of all: thanks for the awesome work!

I ran into a problem when using this package in a Laravel project. When i set holidaysAreClosed to true and use functions like nextBusinessOpen() i get an exception:

Error Class name must be a valid object or a string

BusinessTime\MixinBase::BusinessTime{closure} vendor/cmixin/business-time/src/BusinessTime/MixinBase.php:147

$carbonClass is supposed to be a class name or object but it is an array with some Carbon-Classnames.

kylekatarnls commented 3 years ago

Thanks, it regressed in 1.9.0, it's now fixed.

heikokrebs commented 3 years ago

That was super fast, thanks a lot @kylekatarnls!