public function enableValidation(array $validationGroups = []): self
    {
        $defaultValidationFailedEvent = $this->defaultValidationFailedEvent;
        $defaultThrowableEvent        = $this->defaultThrowableEvent;

        /**
         * @psalm-var class-string|null $defaultValidationFailedEvent
         * @psalm-var class-string|null $defaultThrowableEvent
         */

        return new self(
            $this->isEventListener,
            $this->isCommandHandler,
            true,
            $validationGroups,
            $defaultValidationFailedEvent,
            $defaultThrowableEvent
        );
    }