php-ews icon indicating copy to clipboard operation
php-ews copied to clipboard

Cannot change CalendarView MaxEntriesReturned

Open gazben opened this issue 1 month ago • 0 comments

When I modify the getCalendarItems() options to return anything different than 100 a get an error:

call_user_func(): Argument #1 ($callback) must be a valid callback, class DateTime does not have a method "buildFromArray"

  TypeError 

 call_user_func(): Argument #1 ($callback) must be a valid callback, class DateTime does not have a method "buildFromArray"

 at vendor/garethp/php-ews/src/BuildableTrait.php:77
    73▕                     && $parameters[0]->hasType()
    74▕                     && $parameters[0]->getClass() !== null) {
    75▕                     $classToBuild = $parameters[0]->getClass()->getName();
    76▕ 
 ➜  77▕                     $newValue = call_user_func("$classToBuild::buildFromArray", $value, true);
    78▕                     $object->{ucfirst($key)} = $newValue;
    79▕                     continue;
    80▕                 }
    81▕             }

 1   vendor/garethp/php-ews/src/BuildableTrait.php:77

 2   vendor/garethp/php-ews/src/BuildableTrait.php:57

Is there a caveat about this? I did not find a related issue about this.

  • php version: PHP 8.4.14 (cli) (built: Oct 22 2025 14:58:39) (NTS)
  • package version: v0.11.1

gazben avatar Nov 05 '25 14:11 gazben