Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[DoctrineBundle][YamlDriver] case sensitivity issue #3752

Closed
Venzon opened this Issue · 9 comments

4 participants

@Venzon

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

@fixe

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

@stof stof closed this
@Venzon

thank you fixe

@casoetan

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

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

@casoetan

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

@stof
Collaborator

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

@casoetan

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

@stof
Collaborator

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

thanks. I think this fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.