public function preUpdate(LifecycleEventArgs $args): void
    {
        // Get the object and make sure it is what we need.
        $object = $args->getObject();
        if (!$object instanceof PublishableInterface) {
            return;
        }

        // Active unpublished objects should be published.
        if ($object->isActive() && !$object->isPublished()) {
            $object->setPublished(true);
        }
    }