Note that there are some explanatory texts on larger screens.

plurals
  1. POInstalling Doctrine extensions in a Symfony 2 project causes Fatal Error
    primarykey
    data
    text
    <p>Here is the problem : I don't succeed to install doctrine extensions with symphony 2, especially timestampable. I follow <a href="http://0hlsson.se/2011/07/24/symfony-2-and-doctrineextensions/" rel="nofollow">this tutorial</a></p> <p>How I proceed :</p> <p>I add this lines in deps file :</p> <pre><code>[gedmo-doctrine-extensions] git=http://github.com/l3pp4rd/DoctrineExtensions.git [Stof-DoctrineExtensionsBundle] git=https://github.com/stof/StofDoctrineExtensionsBundle.git target=/bundles/Stof/DoctrineExtensionsBundle </code></pre> <p>Then I enter the line</p> <pre><code>./bin/vendors install --reinstall </code></pre> <p>All is fine.</p> <p>Then I activate extensions in concerned files</p> <pre><code># config.yml stof_doctrine_extensions: default_locale: fr_FR orm: default: timestampable: true # AppKernel.php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( [...] new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), [...] ); # autoload.php use Symfony\Component\ClassLoader\UniversalClassLoader; use Doctrine\Common\Annotations\AnnotationRegistry; $loader = new UniversalClassLoader(); $loader-&gt;registerNamespaces(array( 'Gedmo' =&gt; __DIR__.'/../vendor/gedmo-doctrine-extensions/lib', 'Stof' =&gt; __DIR__.'/../vendor/bundles', [...] )); </code></pre> <p>At last, I add annotate my entity</p> <pre><code>/** * @var datetime $updatedAt * * @ORM\Column(name="updated_at", type="datetime") * @Gedmo:Timestampable(on="update") */ private $updatedAt; </code></pre> <p>But I have this error :</p> <blockquote> <p>Fatal error: Class 'Gedmo\Timestampable\TimestampableListener' not found in /Symfony/app/cache/dev/appDevDebugProjectContainer.php on line 203</p> </blockquote> <p>What do I do wrong ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload