Doctrine Proxy not working ?
Author: barbuslexCreated May 16, 2025Updated May 19, 2025
Hi,
I have a problem with Doctrine Proxy Matcher/Filter.
I have this code (from documentation) :
$duplicate = new DeepCopy(true);
$duplicate->addFilter(new ChainableFilter(new DoctrineProxyFilter()), new DoctrineProxyMatcher());
$duplicate->addFilter(new SetNullFilter(), new PropertyNameMatcher('id'));
$object = $demande->getResponsable();
$copy = $duplicate->copy($object);
dd($copy, $object);Here the result :
The id is not set to null...
Have you an idea ?
Thanks
Source: myclabs/DeepCopy