[DoctrineBundle][YamlDriver] case sensitivity issue #3752

Closed
Venzon opened this Issue Apr 1, 2012 · 9 comments

Comments

Projects
None yet
4 participants

Venzon commented Apr 1, 2012

I switched to 2.1 recently and I noticed wierd thing on production env where case sensitivity is important (localy I work on windows)

I use yaml for entity mapping and configure lifecycleCallbacks:

lifecycleCallbacks:
    prePersist: [ prePersist ]
    preUpdate: [ preUpdate ]

then I go with doctrine:generate:entities to fill my entitiy class which gives me two methods:

/**
 * @ORM\prePersist
 */
public function prePersist()
{
    // Add your code here
}
/**
 * @ORM\preUpdate
 */
public function preUpdate()
{
    // Add your code here
}

problem is that annotations above cannot be found:

[Semantical Error] The annotation "@Doctrine\ORM\Mapping\prePersist" in method Acme\DemoBundle\Entity\Test::prePersist() does not exist, or could not be auto-loaded.

To fix this issue I had to manualy uppercase annotation name

Contributor

fixe commented Apr 1, 2012

This issue belongs to Doctrine2. I've just created a PR that fixes it.

@stof stof closed this Apr 1, 2012

Venzon commented Apr 1, 2012

thank you fixe

Hello, I seem to still get this issue. On my dev system it works great, but in the wild, i keep getting this issue. is there anything I'm overlooking?

Venzon commented Jul 31, 2012

what sf2 version do you use? 2.0.x or latest 2.1 ?

casoetan commented Aug 1, 2012

latest dev-master through composer but I removing annotations and using yaml configuration then it works

Member

stof commented Aug 1, 2012

which version of Doctrine are you using ? As the PR linked above is merged, it should at least be fixed in 2.3

casoetan commented Aug 1, 2012

2.2.*, is it safe to update doctrine to 2.3

Member

stof commented Aug 1, 2012

if you are using symfony 2.1, yes. It is even recommended. the next 2.1 release (beta5 or RC1 depending of its name) will use 2.3 by default

casoetan commented Aug 1, 2012

thanks. I think this fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment