title: How to create custom function/formatter nelmio/alice v.3?
body: <p>I'm new to symfony 4 and tried to write my own function for yml nelmio/alice, but after I ran <code>bin/console doctrine:fixtures:load</code> , I got this error:</p>
  
  <blockquote>
    <p>In DeepCopy.php line 177:</p>
    
    <p>The class "ReflectionClass" is not cloneable.</p>
  </blockquote>
  
  <p>Here is my fixtures.yml file:</p>
  
  <pre><code>App\Entity\Post:
  post_{1..10}:
      title: &lt;customFunction()&gt;
  </code></pre>
  
  <p>Here is my AppFixture.php file:</p>
  
  <pre><code>&lt;?php
  
  namespace App\DataFixtures;
  
  use Doctrine\Bundle\FixturesBundle\Fixture;
  use Doctrine\Common\Persistence\ObjectManager;
  use Nelmio\Alice\Loader\NativeLoader;
  
  
  
  class AppFixtures extends Fixture
  {
      public function load(ObjectManager $manager)
      {
          $loader = new NativeLoader();
  
          $objectSet = $loader-&gt;loadFile(__DIR__.'/Fixtures.yml',
              [
                  'providers' =&gt; [$this]
              ]
          )-&gt;getObjects();
  
          foreach($objectSet as $object) {
              $manager-&gt;persist($object);
          }
  
          $manager-&gt;flush();
      }
  
      public function customFunction() {
  
          // Some Calculations
  
          return 'Yep! I have got my bonus';
      }
  
  }
  </code></pre>