persist($domain); $this->addReference('example_domain', $domain); $manager->persist(Domain::withAuthority('this_domain_is_detached.com')); $detachedWithRedirects = Domain::withAuthority('detached-with-redirects.com'); $detachedWithRedirects->configureNotFoundRedirects(NotFoundRedirects::withRedirects('foo.com', 'bar.com')); $manager->persist($detachedWithRedirects); $manager->flush(); } }