My point is to change code as follows:
```php
if (!$event->getForm()->isValid()) {
    return;
}

$subscription = $event->getData();