Closed (fixed)
Project:
iCalendar Field
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2017 at 10:24 UTC
Updated:
9 Aug 2017 at 17:29 UTC
Jump to comment: Most recent
Found while storing a reference to the CalendarDownloadDefaultWidget in a form array: The widget contains an instance of CalendarPropertyProcessor, which contains injected services but is not itself a service. That causes Drupal to try to serialize the services, and fails by serializing the database connection.
Drupal's common pattern is to use DependencySerializationTrait in such classes, which looks for object variables that are injected services, and strips them out before serialization.
(I'm not sure how much of a problem this is, as I was making an error myself when I triggered it, but plugins in Drupal are usually serializable objects.)
Comments
Comment #2
cburschkaPR at https://github.com/ibrows/drupal_ics_field/pull/3
Comment #4
stefanos.petrakisCommited, thanks!