phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

How to use version 1.6

Open arodiss opened this issue 10 years ago • 5 comments

Sorry for stupid question, but I don't understand how can I install version 1.6 of this bundle

On tag 1.6.1 bundle claims to require doctrine/orm 2.3 or higher. This is not actually true - it uses class Doctrine\ORM\Tools\AttachEntityListenersListener which is only available in doctrine/orm since version 2.5 That's not the story yet. Package doctrine/orm 2.5 requires doctrine/dbal or higher, while symfony itself requires doctrine/dbal to be strictly lower than 2.5 due to known issue with 2.5

So how do you ever use this? (Again, sorry for potentially stupid question)

arodiss avatar Dec 17 '15 09:12 arodiss

it uses it only if you enable the feature. If you use doctrine/orm 2.3, just don't configure the 2.5+ features

stof avatar Dec 17 '15 09:12 stof

and btw, Symfony can totally run with doctrine/orm 2.5 (Symfony 2.8 even ships with it by default).

The "known issue" you have has a known workaround: specify the server version explicitly instead of letting DBAL guess it (which indeed cannot be done if it cannot connect to the DB)

stof avatar Dec 17 '15 09:12 stof

@stof Thank you for your answer.

I don't see how can I "avoid using this feature" - as far as I see listener is called on loadClassMetadata which is not something avoidable :smile: So I think you should actually bump version constraint.

However, workaround you suggested helps, thank you. Issue can be closed.

arodiss avatar Dec 17 '15 09:12 arodiss

Have you checked the code 2 lines above ? This is enclosed in a if (version_compare(Version::VERSION, "2.5.0-DEV") >= 0) { check. so this is not called if you use older versions

stof avatar Dec 17 '15 09:12 stof

@stof Right you are

arodiss avatar Dec 17 '15 09:12 arodiss