public function onStart(Event $event)
    {
        $obj = $event->getSubject();
        if ($obj instanceof \DateTime || $obj instanceof \DateTimeImmutable) {
            $event['stringified'] = $obj->format(\DateTime::ISO8601);
        } elseif ($obj instanceof \mysqli && ($obj->connect_errno || !$obj->stat)) {
            // avoid "Property access is not allowed yet"
            $event['collectPropertyValues'] = false;
        }
    }