mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #9443] Introduce DoctrineSetup as a replacement for Setup
#11616
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/9443
State: closed
Merged: Yes
The
Setupclass is a collection of static methods for bootstrapping a ORM configuration with recommended settings. At least that's my understanding of that class. In applications where the ORM is configured through some kind of framework integration (like DoctrineBundle), that class is more or less irrelevant.The
Setupclass as of today operates on Doctrine Cache instances. Since the whole ORM is now able to operate on PSR-6 we should do something about it. Unfortunately, since theSetupclass is not final, altering all method signatures is quite difficult, so I decided to deprecate the whole class and add a new class namedDoctrineSetupas replacement.Key differences between the two setup classes:
finalwhich should make future changes to that class easier.useSimpleAnnotationReaderflag is not supported anymore.Furthermore, I decided to move the
newDefaultAnnotationDriver()method from theConfigurationclass to the newDoctrineSetupclass. That method does not really mutate the configuration, it is a simple factory for the annotation driver.DoctrineSetupfeels like the better place for it.