File tree Expand file tree Collapse file tree 3 files changed +15
-5
lines changed
Expand file tree Collapse file tree 3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 112112 <file src =" src/Client/Schedule/Spec/ScheduleSpec.php" >
113113 <DeprecatedProperty >
114114 <code ><![CDATA[ $this->excludeCalendarList]]> </code >
115+ <code ><![CDATA[ $this->excludeCalendarList]]> </code >
115116 </DeprecatedProperty >
116117 </file >
117118 <file src =" src/Client/Update/UpdateHandle.php" >
Original file line number Diff line number Diff line change @@ -246,25 +246,31 @@ public function withAddedInterval(mixed $interval): self
246246 }
247247
248248 /**
249- * Does nothing .
249+ * Returns a new instance with the replaced exclude calendar list .
250250 *
251251 * @deprecated This method is deprecated and will be removed in the next major release.
252252 */
253253 public function withExcludeCalendarList (CalendarSpec ...$ calendar ): self
254254 {
255255 @\trigger_error ('ScheduleSpec::withExcludeCalendarList() is deprecated ' , E_USER_DEPRECATED );
256- return $ this ;
256+
257+ /** @see self::$excludeCalendarList */
258+ return $ this ->with ('excludeCalendarList ' , $ calendar );
257259 }
258260
259261 /**
260- * Does nothing .
262+ * Any timestamps matching any of exclude* will be skipped .
261263 *
262264 * @deprecated This method is deprecated and will be removed in the next major release.
263265 */
264266 public function withAddedExcludeCalendar (CalendarSpec $ calendar ): self
265267 {
266268 @\trigger_error ('ScheduleSpec::withAddedExcludeCalendar() is deprecated ' , E_USER_DEPRECATED );
267- return $ this ;
269+ $ value = $ this ->excludeCalendarList ;
270+ $ value [] = $ calendar ;
271+
272+ /** @see self::$excludeCalendarList */
273+ return $ this ->with ('excludeCalendarList ' , $ value );
268274 }
269275
270276 /**
Original file line number Diff line number Diff line change @@ -92,7 +92,10 @@ private function prepareSpec(array $result): ScheduleSpec
9292 $ result ['calendar ' ] ?? [],
9393 );
9494
95- unset($ result ['exclude_calendar ' ]);
95+ $ result ['exclude_calendar ' ] = \array_map (
96+ static fn (array $ item ): CalendarSpec => new CalendarSpec ($ item ),
97+ $ result ['exclude_calendar ' ] ?? [],
98+ );
9699
97100 $ result ['interval ' ] = \array_map (
98101 static fn (array $ item ): IntervalSpec => new IntervalSpec ($ item ),
You can’t perform that action at this time.
0 commit comments